Jump to content

Real-time Java

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 63.147.78.26 (talk) at 17:36, 16 November 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Java supported threaded programming from the very beginning. However, it was not immediately suitable for Real time systems for two critical reasons:

1) The threading behavior was largely unspecified. This, reputedly, was a concession to Microsoft to allow for the weak threading models underlying the Windows operating system at the time.

2) More critically, the garbage collector behavior introduces unbounded delays in computation, immediately destroying any chance of making real-time guarantees for programs written in Java.

Because Java is such an elegant language for programming, and because it supports threading generally and several language features that promote correcntness, it is a good prospect for real-time systems. To produce a specification for Java that would allow its use in such environments, JSR001 was created. As of 2005, a number of implementations of the resulting Real-Time Specification for Java (RTSJ) have emerged, including a reference implementation (from Timesys, I think) and a full fledged product from Sun Microsystems.

The RTSJ addresses the critical issues by mandating a minimum specification for the threading model (and allowing other models to be plugged into the VM) and by providing for areas of memory that are not subject to garbage collection, along with threads that are not preemptable by the garbage collector.

In addition, many other enhancements to the Java system have been included resulting in a specification that provides realistic support for writing real-time systems in Java.