JamaicaVM -- User Documentation: The Virtual Machine for Real-time and Embedded Systems | ||
---|---|---|
Prev | Chapter 8. Realtime Specification for Java | Next |
In JamaicaVM, a system that supports realtime garbage collection, this strict separation into realtime and non-realtime threads is not necessary. The strict splitting of an application is consequently not required. Threads are activated only depending on their priorities.
The JamaicaVM is a Java implementation that provides realtime behaviour for all threads.
The realtime garbage collector performs its work predictably within the application threads. It is activated when memory is allocated. The work done on an allocation must be pre-emptible, such that more urgent threads can become active.
The implementation of a realtime garbage collector has to solve a number of technical challenges. Garbage collector activity must be performed in very small single increments of work. In JamaicaVM, one increment consists of garbage collecting only 32 bytes of memory. On every allocation, the allocating thread "pays" for the memory by performing a small number of these increments. The number of increments can be analyzed, such that this is possible even in realtime code.
The RTSJ provides a powerful extension to the Java specification. Its full power, however, is achieved only by the combination with a realtime garbage collector that helps to overcome its restrictions.