Johns Hopkins EN 600 446 - Papers and Presentations on Embedded Java

Unformatted text preview:

Challenges to Embedded JavaTechnical Overview of Embedded Java TechnologyConclusionPapers and Presentations on Embedded JavaMichael Wortley,Computer Integrated Surgery 446Java is a high-level language that Sun, Java’s creator, likes to characterize with the slogan “write once, run anywhere.” It is a simple, object oriented, and highly portable because it is an interpreted language. Java .class files are run through a Java Virtual Machine (JVM), which takes Java byte code and Just-In-Time (JIT) compiles it into the host computer’s machine language.The Java language has a lot of potential for corporate use. Since the language is so simple and so similar to C++ just about anyone can learn to use it in a few days, its object oriented nature promotes code reuse, and thanks to the JVM it runs on almost every platform. The bottom line for most businesses is that Java promotes faster and cheaper code development.Fast and cheap is exactly what embedded computer system manufacturers want. In recent years, embedded systems (computers embeddedwithin another product) have gone from be 4-bit controllers to 8-bit and 16-bit controllers. And as the demand for more functionality in these products grows, 32-bit and 64-bit controllers are expected. Since embedded system manufacturers often use several different types of processors and have production runs in the millions, it is essential for these businesses to have cost efficient software development. Java sounds like it could be the answer for embedded systems, but there are still problems with the Java environment that need to be dealt with. In the first presentation I will review, “Challenges to Embedded Java” (1998), Charlie McDowell of the University of California Santa Cruz attempts to point out and suggest ways to fix Java’s shortcomings. After that I will review the technical overview of Sun’s Embedded Java to see how they have addressed some of the issues McDowell raised.Challenges to Embedded JavaMcDowell assumes that Java is superior to C and C++ from a software engineering perspective because it is easier to develop and maintain, andbecause it is highly portable. In the embedded systems arena, however, it has four major shortcomings: memory requirements, speed of execution, automatic garbage collection, and real-time support.The Java platform consists of two parts: the Java Application Programming Interface (API) and the JVM. Just storing these two can eat up a significant portion of an embedded system’s memory. In JDK1.1, the API was larger than 9 MB, and the JVM could be anywhere from 300 to 800 KB depending on your machine. In addition, there is also some memory overhead involved in garbage collection.There are several properties of interpreted languages that make them slower to execute than compiled languages. Since code is compiled as it runs, late binding will cause some runtime overhead. Dynamic dispatch of methods is another cause of the Java slowdown. Also, the garbage collection routine requires processor time to run, slowing down the execution of the program.One of Java’s features that makes it so simple is the automatic garbage collection, but as you’ve already heard it has several drawbacks. Garbage collection puts extra pressure on memory and the processor, and generally results in slow performance. This is especially problematic for real-time applications, which make up a significant portion of the embedded systems market.Finally, real-time systems have several needs that present forms of Java don’t address. There is still some difficulty measuring CPU time and memory usage, and it is difficult to predict the worst case execution time of many applications. Java needs better ways to enforce time and space budgets, and real-time garbage collection.Due to all of these drawbacks, Sun’s Java has gone unchallenged. Microsoft, Hewlett Packard, NewMonics, Transvirtual, and many others have developed their own versions of embedded Java, often with improvements relevant to embedded systems. Although these new versions usually end up in acourtroom instead of a consumer product, McDowell has done a thorough comparison of several top competitors. UCSC has also developed their ownversion of embedded Java, called JN, which attempts to implement some of the suggestions made in the presentation.All the different versions of embedded Java addressed the memory problem by only including a subset of the API. Usually this managed to shrink class file storage space down to about 2 MB, but in some cases, such as JN, the resultant API needed only 300 KB. In order to speed up run time, many of the new JVMs only support final and static methods, eliminating dynamic dispatch. In all cases except NewMonics’ PERC, automatic garbage collection was done away with. PERC has features that budget memory to real-time “activities”, and uses an incremental copying collector to achieve real-time garbage collection.The significance of all this is both good and bad. In the real world, embedded applications are generally required to perform a specialized task, often in real-time. With new competitors to Sun’s embedded Java coming out all the time, it offers more options to manufacturers that are specialized to the needsof their particular embedded system. The down side of this is that specialization often requires changes to the Java API, threatening to do away with the portability that makes Java such an attractive commercial language. This problem of trading portability for specialization is one that is still being resolved, often by Sun’s lawyers instead programmers.Technical Overview of Embedded Java TechnologySun isn’t totally oblivious to the needs of embedded system manufacturers. In the last year Sun has released its new Embedded Java standards, which are much more lenient than the former standards, and also address many of the key criticisms. One the most important changes Sun has made is to allow embedded Java platforms to use a configurable set of class libraries instead of the entire Java API. This is what most of Sun’s competitors have been doing anyway, but this change in essence makes the use of reduced API legal in commercial products. Sun has also made the JVM configurable, allowing for more specialization.Additionally, Sun has released three tools for programming embedded applications. The JavaFilter, which looks at program elements and produces a list of required


View Full Document

Johns Hopkins EN 600 446 - Papers and Presentations on Embedded Java

Download Papers and Presentations on Embedded Java
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Papers and Presentations on Embedded Java and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Papers and Presentations on Embedded Java 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?