Hard real-time garbage collection for a Java chip multi-processor

Garbage collection is a well known technique to increase program safety and developer productivity. Within the past few years, it has also become feasible for uniprocessor hard real-time systems. However, garbage collection for multi-processors does not yet meet the requirements of hard real-time systems. In this paper, we present a hard real-time garbage collector for a Java chip multi-processor that provides non-disruptive and analyzable behavior. For retrieving the references in local variables of threads, we propose a protocol that minimizes disruptions for high-priority tasks while still providing good bounds on the time until stack scanning finishes. Also, we developed a hardware unit that enables transparent, preemptible copying of objects, which eliminates the need to block tasks while copying objects. Evaluation of the hardware shows that the copy unit introduces only little overhead and does not limit the critical path. Measurements resulted in release jitter for high-priority tasks of 224 μs or less on an embedded multi-processor with 8 cores clocked at 100 MHz. This indicates that with the proposed garbage collector, high scheduling quality and garbage collection do not contradict each other on chip multi-processors.

[1]  Wolfgang Puffitsch,et al.  Data caching, garbage collection, and the Java memory model , 2009, JTRES '09.

[2]  Pascal Sainrat,et al.  PapaBench: a Free Real-Time Benchmark , 2006, WCET.

[3]  Martin Schoeberl,et al.  Nonblocking real-time garbage collection , 2010, TECS.

[4]  Giuseppe Lipari,et al.  A comparison of MPCP and MSRP when sharing resources in the Janus multiple-processor on a chip platform , 2003, The 9th IEEE Real-Time and Embedded Technology and Applications Symposium, 2003. Proceedings..

[5]  Taiichi Yuasa,et al.  Real-time garbage collection on general-purpose machines , 1990, J. Syst. Softw..

[6]  Joshua S. Auerbach,et al.  Tax-and-spend: democratic scheduling for real-time garbage collection , 2008, EMSOFT '08.

[7]  Peter Lee,et al.  Generational stack collection and profile-driven pretenuring , 1998, PLDI.

[8]  Damien Doligez,et al.  A concurrent, generational garbage collector for a multithreaded implementation of ML , 1993, POPL '93.

[9]  Benedikt Huber,et al.  Worst‐case execution time analysis‐driven object cache design , 2012, Concurr. Comput. Pract. Exp..

[10]  Martin Schoeberl,et al.  Non-blocking root scanning for real-time garbage collection , 2008, JTRES '08.

[11]  Filip Pizlo,et al.  Stopless: a real-time garbage collector for multiprocessors , 2007, ISMM '07.

[12]  David F. Bacon,et al.  Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java , 2003 .

[13]  Martin Schoeberl,et al.  Exhaustive testing of safety critical Java , 2010, JTRES '10.

[14]  Jan Vitek,et al.  Schism: fragmentation-tolerant real-time garbage collection , 2010, PLDI '10.

[15]  Robert I. Davis,et al.  A Survey of Hard Real-Time Scheduling Algorithms and Schedulability Analysis Techniques for Multiprocessor Systems , 2009 .

[16]  Benedikt Huber,et al.  Towards Time-Predictable Data Caches for Chip-Multiprocessors , 2009, SEUS.

[17]  Henry G. Baker,et al.  List processing in real time on a serial computer , 1978, CACM.

[18]  Leslie Lamport,et al.  On-the-fly garbage collection: an exercise in cooperation , 1975, Language Hierarchies and Interfaces.

[19]  James Gosling,et al.  The Real-Time Specification for Java , 2000, Computer.

[20]  Peter Reichel,et al.  Secure, Real-Time and Multi-Threaded General-Purpose Embedded Java Microarchitecture , 2007, 10th Euromicro Conference on Digital System Design Architectures, Methods and Tools (DSD 2007).

[21]  Joshua S. Auerbach,et al.  Design and implementation of a comprehensive real-time java virtual machine , 2007, EMSOFT '07.

[22]  Fridtjof Siebert Limits of parallel marking garbage collection , 2008, ISMM '08.

[23]  Roger Henriksson,et al.  Scheduling Garbage Collection in Embedded Systems , 1998 .

[24]  Kelvin D. Nilsen,et al.  Cost-effective object space management for hardware-assisted real-time garbage collection , 1992, LOPL.

[25]  J. Eliot B. Moss,et al.  Sapphire: copying garbage collection without stopping the world , 2003, Concurr. Comput. Pract. Exp..

[26]  Benedikt Huber,et al.  Worst-Case Analysis of Heap Allocations , 2010, ISoLA.

[27]  Fridtjof Siebert,et al.  Concurrent, parallel, real-time garbage-collection , 2010, ISMM '10.

[28]  Tomas Kalibera Replicating real-time garbage collector for Java , 2009, JTRES '09.

[29]  Martin Schoeberl,et al.  Scheduling of hard real-time garbage collection , 2010, Real-Time Systems.

[30]  Martin Schoeberl,et al.  JOP Reference Handbook: Building Embedded Systems with a Java Processor , 2009 .

[31]  Damien Doligez,et al.  Portable, unobtrusive garbage collection for multiprocessor systems , 1994, POPL '94.