Real-time Linux and Java
Novell has recently introduced SUSE Linux Enterprise Real Time (SLERT) version 10 (http://www.novell.com/products/realtime/), and has been showcasing it at its Brainshare 2008 conference (http://www.novell.com/brainshare/) in Salt Lake City this week.
This version of SUSE Linux contains kernel updates and POSIX real-time (http://www.xtrj.org/collection/posix_rtos.htm) support to run applications with temporal correctness conditions (TCC). For instance, if your application is required to respond to events within a certain timeframe (by a deadline), then you need to run in an environment that supports real-time application execution.
Requirements include true thread priority implementation with pre-emption, as well as priority inversion control, just to name two. Standard Linux does not guarantee that a thread with a higher priority will always pre-empt a thread with a lower priority. Also with standard Linux, and just about any other general purpose OS, there is a chance that a lower priority will block higher priority threads due to locking if shared resources are involved. SLERT fixes both of these, and guarantees that higher-priority threads will always pre-empt lower priority threads.
SLERT implements advanced features such as adaptive locking, and CPU shielding, to further improve overall system throughput and latency while obeying applications' real-time requirements.
Novell was also able to demonstrate two important features in SLERT:
1) CPU shielding: A process, or an individual thread of a process, can be assigned to a processor or processor set, even while the process is running. That set of processors (or cores) can then be shielded from running any other applications except the one you assign it. Additionally, you can assign the shielded process to the processors or cores that are not handling interrupts. (In the Linux kernel, one processor, or core, is assigned to handle interrupts at startup, and this cannot be changed while the system is running.) You can dynamically make changes to the settings while the process is running, and save the settings to be remembered the next time the process is launched.
2) On-the-fly priority assignment: With a running process, threads can be identified and have their priorities set to any level, even the highest the system supports. The priority settings can then be saved, and the system will automatically set them accordingly the next time the process is launched.
At Brainshare 2008, Sun joined Novell and demonstrated their Java Real-Time System for Linux on SLERT (http://java.sun.com/javase/technologies/realtime/index.jsp). In conjunction with the OS implementation for real-time support, to run a Java application, the underlying virtual machine must also conform to POSIX real-time requirements. Sun's Java RTS complies with the Real-Time for Java (RTSJ) Specification, and includes a real-time scheduler, real-time garbage collector, new memory models for non-heap implementations, and so on, to achieve real-time behavior in your Java applications.
The combination of Java RTS on Solaris, and now on SLERT, offers application developers with real-time requirements, such as those in the financial, industrial automation, and military space, a choice to meet their TCCs.