The Sun Java Real-Time
System
is the first commercial implementation by Sun
Microsystems of JSR-1,
the Real-Time Specification for Java (RTSJ), which combines
industrial-strength real-time functionality with the usability,
abstraction, and standards-based advantages of Java technology. Java
RTS supports hard real-time, soft real-time, and non-real-time
functionality concurrently within a single Java Virtual Machine (JVMTM).
Java RTS Features and Benefits
New Real-Time Threads, Scheduling, and Synchronization
The RTSJ introduces the concept of two new threads: real-time
threads and no-heap real-time threads. (A no-heap real-time thread
cannot be
interrupted by garbage collection.) These threads offer more precise
scheduling than standard Java threads. They have 28 levels of
priority and, unlike standard Java threads, their priority is strictly
enforced.
Real-time threads are synchronized and are not subject to
so-called
priority inversion situations, where a lower priority thread has a
block
on a resource needed by a higher priority thread and thus prevents the
higher priority thread from running.
New Memory Management Schemes
The RTSJ defines two new types of memory areas that allow
real-time
applications to avoid unpredictable delays commonly caused by
traditional garbage collectors:
Immortal memory holds objects without destroying them, except
when
the program ends. This means that objects created in immortal memory
must be carefully allocated and managed.
Scoped memory is used only while a process works within a
particular section, or scope, of the program, such as in a method.
Objects are automatically destroyed when the process leaves the scope.
This is a useful feature akin to garbage collection in that discrete
creation and deletion is not required as in the immortal memory case.
However, the process must exit the scope to ensure that the memory is
reclaimed.
Immortal memory and scoped memory are not garbage collected, so
using
them avoids problems of garbage collection (GC) interference.
Asynchronous Events Handling & Asynchronous Transfer of
Control
The RTSJ provides two mechanisms for asynchronous communication:
asynchronous event handling, and asynchronous transfer of control.
Asynchronous event handlers deal with external events (known as
"happenings") which can occur outside the JVM. The RTSJ is unique in
that it allows developers to schedule the response to asynchronous
events in order to avoid disrupting the temporal integrity of the rest
of the real-time application.
Asynchronous Transfer of Control (ATC) provides a carefully
controlled way for one thread to interrupt another thread in a safe
manner.
Time & Timers
The RTSJ specifies several ways to specify high-resolution
(nanosecond accuracy) time, including absolute time and relative time.
Direct Access to Physical Memory
While maintaining security protections, the RTSJ allows
direct
access to physical memory. This means that device drivers can be
created that are written entirely in the Java language. Previously,
Java applications had to
link to native code to communicate directly with the hardware.
The Sun Java RTS product is available through Sun OEM Sales.
Contact them at:
or by telephone at +1-800-786-0404, Prompt 1, Prompt 3.
To install the module suite, download and
unzip the modules from this location. Then choose
Tools | Update Center, select Install Manually Downloaded Modules, and
click Next. Specify the location of the modules and complete the
wizard. Important Note: You must install all three modules to
get a complete
and functional Java RTS NetBeans module installation.
Requirements
The module has been tested on the Solaris 10 Operating System, and
on the Windows XP Professional SP2
and Linux platforms. Note that MacOS is not supported at this point.
The system requirements to install and run the module are as follows: