Guest OS

Real-time Java

Guest OS

Real-time Java

Today, Java is the common language for desktop and server application development. With the emergence of real-time Java technology, Java is now enabled to make its way into the embedded market.

General Information

Over the past decade, Java has proven to be a language and platform of choice in desktop, web, and mobile applications, widely displacing C and C++ in those application areas. The use of Java has resulted in substantial improvements in both quality and productivity, fueled by the wide availability of Java-trained engineers and off-the-shelf components. However, additional work was needed to define a Java-based solution that would be appropriate for the specialized needs and requirements of real-time and embedded developers.

Standards become mature

Beginning in 1997, the National Institute of Standards and Technology coordinated the activities of an expert group in defining the requirements for the use of Java in real-time and embedded development. The NIST group, comprised of over 50 major technology companies including Sun, IBM, Microsoft, Aonix, and Motorola, drew the following conclusion:
The Requirements Group considers these Java traits to provide a basis for the real-time requirements and motivation for Java´s use by the real-time community:

  • Java´s higher level of abstraction allows for increased programmer productivity (although recognizing that the tradeoff is runtime efficiency).
  • Java is relatively easier to master than C++.
  • Java is relatively secure, keeping software components (including the JVM itself) protected from one another.
  • Java supports dynamic loading of new classes.
  • Java is highly dynamic, supporting object and thread creation at runtime.
  • Java is designed to support component integration and reuse.
  • The Java technologies have been developed with careful consideration, erring on the conservative side using concepts and techniques that have been scrutinized by the community.
  • The Java programming language and Java platforms support application portability.
  • The Java technologies support distributed applications.
  • Java provides well-defined execution semantics.

Following the conclusion of the NIST efforts, several years of specification, research, and development efforts were undertaken to develop the first solutions for real-time Java developers. Different approaches have been taken, placing differing emphasis on key important needs for the real-time and embedded community, including the needs to:

  • Achieve small memory footprint
  • Achieve fast latency times
  • Achieve high execution throughput
  • Access low level devices
  • Manage increasingly complex applications
  • Reduce error incidence
  • Facilitate error detection and removal

Resulting technologies have included solutions based on standard Java semantics and libraries, as well as a generalized specification for real-time extensions to Java, called RTSJ, and developed under the Java Community Process (JCP). Note that it was the first JSR (Java Specification Request) issued under the JCP, giving evidence of the early interest of the real-time community in Java technology. Today another JSR (JSR 302) is being discussed to address safety critical requirements.

RTSJ Specification

RTSJ is designed to support both hard and soft real-time applications. Among its major features are: scheduling properties suitable for real-time applications with provisions for periodic and sporadic tasks, support for deadlines and CPU time budgets, and tools to let tasks avoid garbage collection delays.

The RTSJ is the specification resulting from JSR-1, the first specification launched through the Java Community Process. The specification was approved in January 2002. The first commercial implementation followed in Spring of 2003. The second release of the reference implementation (RI) was in Spring 2004, and version 1.0.1 of the RTSJ was released (with updates to the RI and Technology Compatibility Suite) in June 2005.