Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Embedded

Following different roads to real-time Java

Posted: 01 Feb 2001 ?? ?Print Version ?Bookmark and Share

Keywords:jvm? java systems? osgi? real time system? java?

It appears that the days of "wait and see" may be over on the question of whether Java is right for embedded real-time systems. Though Java's migration into embedded applications was far from an overnight success, dogged as it was by serious technical issues that make Java problematic for real-time, "we see developers ready to move on and use the technology and put it in their products," said Kelvin Nilsen, chief technology officer at Java virtual machine vendor NewMonics Inc.

Java technology, Nilsen said, "has had four and a half years to mature, and that is probably another aspect of why it is finding its way into commercial deployment." Strategies for overcoming the technical roadblocks have emerged, thanks to the work of individual vendors as well as industry groups like the Real-Time for Java Experts Group and the J-Consortium. Among those players, varying opinions exist on the best way to overcome the real-time barriers.

Vendors of Java virtual machine (JVM) products such as NewMonics and IBM, for example, take dramatically different approaches. Each company released new versions of their Java solutions this fall. Both NewMonics' Perc software and IBM's VisualAge Micro Edition are built on clean-room implementations of a Java virtual machine.

For its part, the J-Consortium, a group formed to build application programming interfaces addressing the particular needs of individual niche-market segments, has reached a maturity milestone of its own. The ISO/IEC JTC 1 gave the 66-member J-Consortium the go-ahead to submit embedded and real-time Java specifications under the Publicly Available Specification status.

That approval opens the door for the J-Consortium to turn its specifications into international standards. The International Standards Organization looked at the procedures the consortium has used to create its specs and decided they are fair and equitable and the process open to all that are interested to participate. So far, the J-Consortium's Java API standard itself is not yet approved. The consortium's Real-Time Java Working Group has completed several public reviews of its basic real-time, or Real-Time Core specification, which delivers real-time programming extensions for the Java platform. Some working-group members are now developing applications based on this API.

Meanwhile, a separate consortium, the Real-Time for Java Experts Group, is narrowing in on a real-time specification of its own. Chartered by the Sun-organized Java Community Process, the Real-Time for Java Experts Group has been working on a Java standard for the past 18 months. It is now at a final definition of the standard and is working to get a reference implementation that is also part of the standard.

IBM's real-time beta

For its part, IBM has participated in helping to define that standard and was the first to submit its beta implementation of real-time components for consideration as one of the possible reference implementations.

Among the most vexing real-time issues in Java is the problem of garbage collection. "Garbage" in Java parlance is memory in the system that is no longer being used by the application. The Java virtual machine has responsibility for finding all of the garbage and reclaiming memory so that it can serve other applications. Most JVMs make a conservative estimate of which memory is garbage. If there is any uncertainty, the JVM essentially says it will not reclaim the memory because some applications may be trying to use it.

NewMonics' JVM takes a more rigorous approach to hauling out the trash. It uses real-time garbage collection, offering what the company characterizes as 200?s preemption latency. "That means that even if the garbage collector is running, if something has to happen in real-time, the VM can preempt the garbage collection within 200?s," said Nilsen. "Almost every other product we can test shows behavior where it takes up to several seconds to preempt the garbage collector if the garbage collector is in a certain mode."

NewMonics' latest version of its JVM, Perc 3.1, extends Perc's memory management capabilities with a new "treeshaker" feature. Treeshaker automates method and class pruning, reducing application footprint by as much as 40 percent, the company said. Through enhanced control of garbage collection, developers can optimize the priority, collection rate and scheduling of garbage collection on the fly. By adding priority inheritance to Perc, embedded developers can control thread execution, ensuring predictable execution of high-priority threads.

Offering another way to tackle the dumpster, Marc Erickson, project manager for embedded software at IBM, pointed out a whole series of real-time extensions used in IBM's Java product that he deems pretty significant. "One real-time extension allows a task to run above the garbage collector," he said. "It has priority over the collector so it interrupts the garbage collector when it needs to."

IBM's JVM also provides an ability to get what the company calls "scoped memory." As long as a task is alive, an area of memory is maintained for it. Developers can do their own memory management inside that area. "It's kind of like a memory object factory," said Erickson. Memory is made available and held, so it does not go "out of scope" when an object finishes. It is always available for the user.

Version 1.2 of IBM's VisualAge Micro Edition embeds changes that can boost performance, including Open Service Gateway Initiative (OSGi) bundle management, support for real-time Java components and configurations that add an Abstract Window Toolkit, access to relational databases, remote-method invocation and an applet viewer.

With version 1.2, IBM is making available an interactive integrated development environment-based tool for creating OSGi bundles. This Bundle Builder complements VisualAge Micro Edition components designed to comply with OSGi standards for remote management of software. The new version incorporates the beta implementation of a real-time Java spec, also refereed to as JSR 000001. As the spec is finalized, the IBM implementation of the real-time extensions will follow it, the company said.

? Jeff Child

EE Times

Article Comments - Following different roads to real-ti...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top