The virtues of the Java language for writing reliable and portable code have also raised the desire to use it for the programming of embedded systems with real-time constraints. Such applications are supported by the Real-Time Specification for Java (RTSJ), for which various (mostly commercial) implementations have been developed.
This paper discloses an implementation of RTSJ on top of the open-source Java Virtual Machine Ovm, which was created at Purdue University in order to run the control software PRiSMj of the unmanned aerial vehicle ScanEagle, developed by Boeing. The resulting software passed Boeing’s qualification tests and was successfully applied in test flights; it received the Java 2005 Duke’s Choice award.
The authors give very interesting, clear, and detailed insight into the architecture of Ovm, the basic development strategy (based on the ahead-of-time translation of Java programs to C++ code and the management of threads in user space), as well as the challenges that had to be met with respect to thread scheduling, memory management, synchronization, and input/output (I/O). The most complex issue was the implementation of the RTSJ memory model, which involves “scoped areas” to overcome the unpredictability of garbage collection of the standard heap. Performance benchmarks demonstrate the efficiency of the system; finally, its deployment in ScanEagle and the lessons learned from the project are described.
The paper is wholeheartedly recommended to anyone interested in learning about the current state of the art in Java technology for developing real-time software for large-scale embedded systems.