The previous articles in this series discuss how IBM WebSphere real time solves the uncertainty problem by obtaining extremely low timescale values (latency values). This feature extends the scope and benefits of the Java platform to areas that were intended to be used only for specific real-time (RT) programming languages such as Ada. RT Hardware and operating systems are often customized and difficult to understand. In contrast, WebSphere real time runs on LINUX®RT versions compatible with IBM BLADECENTER®LS20 (see Resources) and similar hardware. It supports the needs of typical RT applications:
Low latency: Ensures response to signals within a limited time.
Certainty: There is no infinite pause for garbage collection (GC).
Predictability: The number of execution times for thread-priority monitoring is consistent.
No precedence inversion: High priority threads are not blocked by low-priority threads holding their required locks because the middle priority thread is running.
Access to physical storage: RT applications such as device drivers always need to trace the source.
This article shows how to write and deploy RT Java applications using the tools provided by the WebSphere real time. This article references the previous articles in this series to show how to make the program perform at a higher level of RT certainty. (This can be helpful, but it's not necessary to read the article before.) You will see how to use an RT GC policy (such as metronome) to improve predictability in the Lunar Lander sample application that comes with WebSphere real time. You will also learn how to precompile (AOT) your application to improve certainty in an RT environment. Finally, you will design and implement an RT application using storage that is not controlled by the garbage collector and discover tips and tricks for maximizing your RT Java application.
If you want to run some of the programs described in this article--preferably, ideally, write your own RT Java application--then you will need to access a system that has the WebSphere real time installed (see Resources for more information on obtaining this technology).
Advantages of metronome garbage collector
Metronome is the garbage collector for WebSphere real time. You can observe its advantages by starting the sample application that is included with the WebSphere real time. After you install WebSphere real time, you can find the sample application at the installation directory/sdk/demo/realtime/sample_application.zip.
The sample application simulates the unmanned Lunar Lander Lunar Module control technology. To achieve a safe landing, the rocket thrusters of the lunar module must be properly deployed:
A vertical propeller that lowers the rate of descent.
Horizontal thrusters aimed at the landing site.
In order to calculate the position of the lander lunar Module, Controller returns this position using the time obtained for the radar pulse. Figure 1 shows this simulation:
Figure 1. Lunar Lander