http://www.developer.com/java/other/article.php/1367671/Real-time-Specification-for-Java-RTSJ.htm
Some features of the Java language specification, particularly the non-deterministic runtime garbage collections and threading, have
hindered the adoption of Java in industries for Real-Time Systems and software applications. Both industry representatives and academics
understand this limitation of the application of Java in Real-Time so a workshop at the National Institute of Standards and Technology (NIST)
was organized to discuss and propose a draft for Real-Time Specification for Java (RTSJ).
This requirement lead to the formation of an expert group in the Java Community Process (JCP) to draft a specification for Java in Real-Time.
The first proposal for operating a computer in real time, as in control systems, was published in 1950.
This publication shows a computer in both feedback (feeding the output to the input) and
feed-forward (feeding the input to the output) loops. It was assumed that analog-computing elements
would be used but digital computing was not excluded. The first digital computers developed specifically
for real time control were for airborne operation. By 1954 a Digitrac digital computer was successfully
used to provide an automatic flight and weapons control systems. The emergence of Real Time Operating Systems (RTOS) in industrial applications started in the 1960s.
Process Fortran compilers also made their appearance. The advent of microprocessor in the 1970s and
the increase of fast memory began to force attention more on the problems of writing correct and dependable
computer control software. The definition of real time systems seemed to vary amongst different groups, such as vendors, software developers,
practitioners, academics, researchers and so forth. Here are some of the definitions. The above definition covers different types of systems, from workstations running under Unix operating systems where
the user expects to receive a response within a few seconds to aircraft engine control systems which must respond
within a specified time and failure to do so could cause the loss of control and possibility of loss of passengers lives. Here is another definition that is defined in the Journal of Systems and Control Engineering: The following is an alternative definition to the above: Real-Time Systems and embedded computers are connected to the environment, which it is working in,
by a wide range of interface devices that receive and send stimuli. External processes all operate in
their own time-scales and the computer is said to operate in real time if actions carried out in the
computer relate to the time-scales of the external processes. Synchronization between the external processes and the internal actions or tasks carried out by the
computer may be defined by: Real-Time Systems can be further divided into two main categories according to their time constraints. A hard time constraint obviously represents a much more severe constraint on the performance of the system as
compared to a soft time constraint and such systems present a difficult challenge both to hardware and to
software developers. Most of real-time systems contain a mixture of activities that can be classified as
clock based, event based or interactive based with both hard-time and soft-time constraints. The division of activities carried out by a computer control systems into real-time and non-real-time tasks,
with further subdivision of real-time tasks into two different types (based on time constraints), arises from
the different levels of difficulty in designing and implementing the different types of computer program. Programs
involving real-time and interface operations, are substantially more difficult to construct than, for instance
standard data processing programs. The following are the main types of programs: There were issues in Java language specification that slows its adoption in real-time control industries.
The major problem issues were: It is vital for critical mission real-time control systems software as in a Nuclear Power Plant,
Aircraft Control, Submarine Control, Factory Automation, Airport Aviation Flight Control, Energy and Power Systems Supply,
Telecommunication Satellite and so forth to have a deterministic scheduling of events not in an indeterminate state.
The risks associated with writing such critical mission real-time software in Java far outweighs the other benefits of Java. In 1998 a group of experts in real-time computer control was formed and coordinated by the
National Institute of Standards and Technology (NIST) to draft requirements for real-time Java.
The members were representatives from 50 different companies, government institutes and researchers
from academic institutions. The main aim of the group was to develop a cross-disciplinary specification
for real-time functionality that is expected to be needed by real-time applications written in Java
programming language and being executed on various platforms. The group workshops at NIST produced
nine core requirements for a Real-Time Java specification, together with number of derived sub-core
requirements. This is the basis of the Real-Time Specification for Java (RTSJ). The weaknesses of the
Java language specification for writing real-time applications are addressed in the core requirements. The Real-Time Java Expert Group (RTJEG), where the specification leader from IBM produced a set of guiding
principles for the design of RTSJ (Real-Time Specification for Java): There is a Java Specification Request (JSR-1) for Real-Time in the Java Community Process (JCP).
The package name of this API for Real-Time Java is called "javax.realtime" and it has already had a
final release in January of 2002. Real-Time Java (RTSJ) targets the EmbeddedJava, PersonalJava, JavaOS
for Business, JavaOS for Consumer, and Enterprise Java (when implemented on an RTOS) platforms. JSR-1 extends the Java Platform with an industry standard set of extensions that enables the construction of
systems that exhibit real-time behaviour. It also targets both "hard real-time" and "soft real-time" systems.
The "javax.realtime" API addressed the deterministic guarantees and/or control in the areas of thread scheduling,
synchronization overhead, lock queuing order, class initialization, maximum interrupt response latency, and
GC (garbage collector) characteristics. Real-Time JVM guarantees deterministic run-time behaviour such as a real-time garbage collector. This JVM would
only be implementable atop suitable target platforms, such as a real-time operating system (RTOS). There are seven functional areas of focus for Real-Time Java: thread scheduling and dispatching, memory management,
synchronization and resource sharing, asynchronous event handling, asynchronous transfer of control, thread terminations,
and physical memory access. There is an extension to the RTSJ, which is the Java Specification Requests (JSR-50) for Distributed Real-Time.
The Distributed Real-Time Specification for Java extends RMI in the Real-Time Specification for Java (RTSJ), to
provide support for predictability of end-to-end timeliness of transnode activities. An Industrial Automation Extension
draft (JSR-7) is a specification for a distributed real-time systems for the Java platform that will be utilized in
factory automation environments as well as other automation application domains. JSR-7 will require the
Real-Time Java (RTSJ) for application development. The JSR-7 specification will target the basic Java Platform with potential extension to both the Embedded and
Personal Java platforms. The specification will result in an industry standard for factory floor automation based
on Java technologies as well as addressing the needs of an industrial conglomerate with dispersed global offices
and manufacturing locations. Real-Time Computer control software for large-scale operations is more complex to develop than database application
development and the job of developing real-time systems in Java would be easier because there is already an API that
is fully implemented. The reason for this complexity stems from the multi-disciplinary nature of real-time computer
control. It covers Mechanical and Electrical Engineering, Electronics, Artificial Intelligence, Machine Learning,
Mathematical Modelling, Optimizations and Applications, Physics Digital Control and Computer Science. We will see
Java make a gigantic leap into all areas of automation and control from the small, as in a washing machine or
dishwasher, or the medium, as in office assistant robot, to the huge and complex computer control systems used
in Aircraft carrier, Shuttle Spacecraft, Electrical Power Stations, Telecommunication Networks, and so on. The autonomous rover vehicle, known as Sojourner explored the Martian surface on a mission in 1997. Both
A.M.E.S Research and J.P.L (Jet Propulsion Laboratory) are laboratories where NASA's rocket scientists design
real-time computer control software for planetary autonomous vehicle such as the Sojourner. One of their current
tools for developing intelligent real-time computer control is the most popular Java Expert Systems Shell (JESS)
from Sandia National Laboratory. Dr. Ernest Friedman-Hill from Sandia and author of JESS has been giving
lectures to the engineers and scientists at both AMES and JPL about intelligent application using JESS. The weaknesses and deficiencies of the Java language for Real-Time Systems has been addressed in JSR-1 which
is the API for Java Real-Time, package name "javax.realtime". The real-time JVM was a result of small modifications
to the Java specification language. As you see that there are other Java Specification Requests (JSR) that will
depend on "javax.realtime" , and the lists will grow over time. We will see Java dominate the softwares for the
automation and real-time computer control industries over the coming years. Downloads (RTSJ) Reference Implementation: Web links: Books: Journal Publications:
Sione Palu has developed software for Publishing Systems, Imaging, and
Web Applications. Currently, Palu develops (Swing-based) his own software application in Symbolic Algebra Systems
with Visualization Mathematics for high-school level. Palu graduated from the University of Auckland, New Zealand,
with a science degree in mathematics and computing. He has a personal interest in applying Java and mathematics in
the fields of mathematical modelling and simulations, symbolic AI and soft-computing, wavelets, digital signal processing,
and control systems.
Real-time Specification for Java (RTSJ)
June 18, 2002
Introduction
Origin of Real-Time Systems
Definition of Real-Time Systems
Classification
Time Constraints of Real-Time Systems
Types of Programs
Java Weaknesses for Real-Time Application
Requirement Group for Real-Time Java
Guiding Principles
Java Specification Request for Real-Time
Design and Implementation
Dependent Specifications with implications in Control Industries
Conclusion
Resources
About the author