HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

When Sun Microsystems introduced the Java programming language in May 1995, it handed developers the programmer's equivalent of the holy grail. Java's promise of write once, run anywhere proved real. For the first time, developers could write their source code just once, run it across multiple platforms without modification and generate bit-for-bit identical results. Now, less than three years later, Java technology has become more than just a wildly popular development environment; it has enabled the creation of a whole class of new computing devices called "thin-clients" that were not imaginable three years ago.

The Java Model
Following a close examination of the Java environment, Sun concluded that it could significantly enhance the Java paradigm by migrating the execution of bytecode instructions from software in the Java Virtual Machine to hardware in a Java processor. Even with this Java processor implementation, however, the Java Virtual Machine and its overhead remains. Indeed, it is required to execute Java code, because the Java Virtual Machine is a fairly complex piece of code that does far more than simply execute bytecode instructions. Its functions also include:

  • Verification: Prior to passing the code along for execution, the Java Virtual Machine establishes that the program is legal and well behaved. This is an important part of the overall Java security model, making the transmission of computer viruses impractical in Java programs.
  • Class loader and garbage collection: The Java programming language loads and purges code as necessary. These modules provide the runtime memory management operations necessary to keep the system running efficiently.
  • Thread Manager: The Java Virtual Machine keeps track of the various specific concurrent strands of operation and sees that they execute without bumping into each other.
Java Without Execution Overhead
The Java Virtual Machine executes Java programs through a translation mechanism, using either an Interpreter or a just-in-time (JIT) compiler to convert bytecode instructions into machine instructions that the underlying CPU can understand and execute. This conversion process inevitably adds some overhead to the task of program execution, that is, it takes time (affecting performance) and consumes resources (affecting cost).

Fortunately, the burden of overhead is not fixed; it may be shifted depending on circumstances. If ample time is available for program execution (because, e.g., the application is I/O bound), a simple interpreter that consumes little in the way of machine resources can be used to translate bytecode programs. If ample hardware resources are available (e.g., in a power desktop or server system), an advanced JIT compiler that enables high-performance execution can be used.

The bottom line for program translation, however, is that it involves overhead in some form or other, either time (if resources are not available) or resources (if time is not available). The difficulty comes when both are in short supply, as is often the case in embedded applications. Under these circumstances developers generally regard Java programming as impractical, however desirable the principle might be for using the technology.

Java processors were developed to address precisely this problem. They are based on a new core CPU technology called picoJava, that reads and executes bytecode instructions directly in hardware. Consequently, Java programs execute on a Java processor without translation. In effect, for a Java processor, bytecode instructions are already machine instructions. Direct execution of bytecode instructions completely eliminates the requirement to sacrifice either time or machine resources. Java programs running on a Java processor execute as efficiently as possible, combining the high performance of quality JIT compilers with the negligible resource requirements of the simplest interpreters.

Java processors, therefore, enable a new breed of thin clients powered by Java that are more powerful and less expensive than would otherwise be possible. These devices are able to run Java code at machine speeds without using the expensive combination of a high-performance CPU, a sophisticated JIT compiler and an expansive memory subsystem. Eliminating these otherwise essential costs without compromising performance delivers the optimum in price/performance to the customer.

Legacy Code Compatability
Even with the wide acceptance and popularity of Java technology, Sun recognizes that Java is a new development environment, and that as a result even emerging, thin-client systems, such as network computers, may have to run some amount of existing code written in other languages. To make it easier for thin clients to handle legacy code, the picoJava technology at the core of Sun's JavaChip processor has been designed, not only with the capability to execute code written in any programming language, but also non-Java code as well as any comparable RISC processor. As a result, Java processors can extend the life of legacy applications, letting companies leverage their existing software resources while simultaneously easing their transition to Java.

Picking the Right Time to Transition to Java Processors
Given the ability of Java processors to execute Java and non-Java code, there is no reason to wait until all, or almost all, of the code base has migrated to the Java language before switching to a Java processor. You don't have to wait until a majority of the code base consists of Java programs. Rather, it makes sense to start thinking about using a JavaChip processor as soon as Java programs make up any noticeable fraction of the application workload — especially if the you expect that more and more of the future workload will consist of Java programs and less and less code will be written in other languages. The non-Java programs will run as well as they would on any other processor, and the Java programs will run much better.

Java Processors: The Best Choice for the New Computing Environment
Java is enabling the creation of a whole host of new computing devices, including network computers and other thin clients such as set-top boxes, smart phones and home automation systems. Because all of these devices are meant to be high-volume, low-cost products, relatively small differences in price and performance can mean the difference between success and failure in the mass market. When unit volumes are measured in the millions, there is no such thing as a "minor" cost savings — every penny saved is millions of pennies saved, every dollar saved adds up to millions of dollars. An MB of RAM can be purchased for as little as $4 today, and no doubt still less tomorrow. But while memory may be cheap and getting cheaper, it will never be free. Since JavaChips enable Java programs to run faster using less memory, a JavaChip can provide critical efficiency for high volume devices, returning many millions of dollars to the bottom line of those companies with the foresight to adopt them.

Java processors, then, are ideal to power an emerging generation of new, high-volume computing devices. Indeed, they have been designed with these types of devices in mind, delivering the kind of economy, power and compatibility critical to their success. If Java was the fuel that ignited the explosion of new computing devices, JavaChips will be the engines that drive them into the future.

The picoJava architecture has been licensed from Sun by IBM, LG Semicon, Fujitsu, Rockwell and NEC. Siemens Semiconductor has licensed the Instruction Set Architecture for use in Smart Cards. In addition, Sun has recently received an endorsement from Visa International regarding a Java specification for smartcard applications. In a round-table discussion at the JavaOne conference, Fujitsu, Siemens and IBM all predicted that products would be available by the end of 1998.

About the Author
Harlan McGhan is the group manager of architecture marketing for Sun Microelectronics, responsible for product roadmaps, product definitions, competitive analysis, and both SPARC and JavaChip processor evangelism. McGhan has a BA in philosophy from Michigan State University and an MA and ABD in logic and history of science from Princeton University. You can e-mail him at [email protected]


All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.