In the last few years, a new approach for dealing with WCET analysis in Java has emerged. Rather than fight the increasingly unpredictable behavior of virtual machines and superscalar processors, an alternative strategy eliminates them entirely. The approach relies on specialized processors that understand Java bytecode as their native instruction set. Examples include the aJ-100, the Cjip, and the JOP (see Figure 1.4). These Java-specific processors offer several advantages for real-time systems:
Predictability Running bytecode directly on the processor eliminates just-in-time compilation, making execution time far less variable. Java's stack addressing scheme also helps to reduce variability. In JOP, for example, bytecode is translated into microcode that executes in a four-state pipeline, mitigating the need for branch prediction and the uncertainty it would introduce. Cache analysis in Java microprocessors is simpler, as well. Jump instructions are guaranteed never to target beyond the address range of the declaring method; therefore, a method-based cache, such as the one employed by JOP, makes every non-invocation instruction a cache hit. These characteristics yield a much tighter bound when performing static WCET analysis.
Easier certification A subtler benefit of Java microprocessors is important when considering safety- and mission-critical real-time systems. Such systems must obtain certification, such as the DO-178B standard for avionics software, to ensure traceability through design, code, and test. In a traditional real-time Java application, multiple layers must be certified: the operating system, the virtual machine, and the application itself. When the application runs on a Java processor, however, the OS and VM layers disappear, removing tens of thousands of lines of code and making the certification process faster and cheaper.
The Java language Moving a real-time system to a Java processor brings advantages due to the nature of the source language: stronger type safety, easier portability, and so on.
These qualities make Java processors an attractive platform for hard real-time systems. Although moving to such a novel and unique architecture may seem drastic, developers of real-time systems have a tradition of adopting new platforms when special needs arise, as evidenced by the popularity of ARM and PowerPC architectures in embedded devices.