Real-time Java for on-board systems

The Java language has several attractive features but cannot at present be used in on-board systems primarily because it lacks support for hard real-time operation. This shortcoming is in being addressed: some suppliers are already providing implementations of Java that are RTcompliant; Sun Microsystem has approved a formal specification for a real-time extension of the language; and an independent consortium is working on an alternative specification for real-time Java. It is therefore expected that, within a year or so, standardized commercial implementations of real-time Java will be on the market. Availability of real-time implementations now opens the way to its use on-board. Within this context, this paper has two objectives. Firstly, it discusses the suitability of Java for on-board applications. Secondly, it reports the results of an ESA study to port a software framework for on-board control systems to a commercial real-time version of Java. 1 Standard Java and On-Board Applications The attractive features of the Java language from the point of view of on-board applications include: greater safety; higher productivity; built-in support for multi-tasking; built-in support for networking operations; support for code documentation to be performed within the language; a wide user base and hence lower costs; and facilities for dynamical loading of code. There are three major obstacles to the use of Java in on-board applications. The first is the memory and timing overheads introduced by the Java Virtual Machine or JVM. This is a problem because on-board systems are often memoryand CPU-constrained. The second obstacle is the lack of certifiable tools for developing Java applications. This is a problem because many on-board applications – typically the platform software – are mission-critical and therefore need to have very high quality levels. The final obstacle was already mentioned in the abstract and is the poor support offered by Java for hard real-time applications. This is a problem because on-board software often has hard real-time constraints (this is for instance the case of the data handling and attitude control software). This paper begins with a brief overview of the first two problems and will the concentrate on the third one. There is general agreement that Java programs run more slowly than functionally equivalent programs written in languages like Fortran or C/C++ but there is much disagreement over the extent to which Java programs are slower. Results reported in published studies have slow-down factors in a range that goes from nearly acceptable values of 2-3 to clearly unacceptable values of 100 or more [Sch01, Mor00]. Java is a mixed compiled and interpreted language. Java source code is compiled to an intermediate form, the so-called bytecodes, and the bytecodes are interpreted by the JVM. Interpretation of high-level code takes more time than execution of compiled machine language and this was the primary factor influencing the performance of Java applications soon after the language was introduced. In recent years, Just-In-Time or JIT compilation was introduced. In a JIT JVM, bytecodes are not directly interpreted but are compiled to machine code and then executed. Compilation is therefore