Data caching, garbage collection, and the Java memory model

Multiprocessors often feature weaker memory models than sequential consistency. Relaxed memory models can be implemented more efficiently and allow more optimizations. The Java memory model is a relaxed memory model that is a natural choice for a Java processor. In this paper, we show that a data cache that obeys the restrictions of the Java memory model can be implemented efficiently. The proposed implementation requires only local actions to ensure data consistency and is therefore timing analysis friendly. Furthermore, we investigate the impact of the proposed data cache design on the correctness of real-time garbage collection. Relaxed memory models must to be taken into account when initializing and moving objects during heap compaction. Also, write barriers and the start of a garbage collection cycle require careful design under the Java memory model.

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

[2]  Jan Reineke,et al.  Timing predictability of cache replacement policies , 2007, Real-Time Systems.

[3]  Martin Schoeberl,et al.  Time-predictable Cache Organization , 2009, 2009 Software Technologies for Future Dependable Distributed Systems.

[4]  V. T. Rajan,et al.  A real-time garbage collector with low overhead and consistent utilization , 2003, POPL '03.

[5]  Leslie Lamport,et al.  On-the-fly garbage collection: an exercise in cooperation , 1975, CACM.

[6]  Jeremy Manson,et al.  The Java memory model , 2005, POPL '05.

[7]  Erez Petrank,et al.  An on-the-fly mark and sweep garbage collector based on sliding views , 2003, OOPSLA '03.

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

[9]  No License,et al.  Intel ® 64 and IA-32 Architectures Software Developer ’ s Manual Volume 3 A : System Programming Guide , Part 1 , 2006 .

[10]  Alexander Knapp,et al.  The Java Memory Model: Operationally, Denotationally, Axiomatically , 2007, ESOP.

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

[12]  Reinhard Wilhelm,et al.  The influence of processor architecture on the design and the results of WCET tools , 2003, Proceedings of the IEEE.

[13]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[14]  Sarita V. Adve,et al.  Shared Memory Consistency Models: A Tutorial , 1996, Computer.

[15]  Martin Schoeberl,et al.  A Java processor architecture for embedded real-time systems , 2008, J. Syst. Archit..

[16]  James Gosling,et al.  The Java Language Specification, 3rd Edition , 2005 .

[17]  Anoop Gupta,et al.  Memory consistency and event ordering in scalable shared-memory multiprocessors , 1990, ISCA '90.

[18]  Anoop Gupta,et al.  Memory consistency and event ordering in scalable shared-memory multiprocessors , 1990, [1990] Proceedings. The 17th Annual International Symposium on Computer Architecture.

[19]  David Aspinall,et al.  On Validity of Program Transformations in the Java Memory Model , 2008, ECOOP.

[20]  Erez Petrank,et al.  An on-the-fly mark and sweep garbage collector based on sliding views , 2003, OOPSLA 2003.

[21]  Martin Schoeberl Real-time garbage collection for Java , 2006, Ninth IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC'06).

[22]  Guy E. Blelloch,et al.  Scalable real-time parallel garbage collection for symmetric multiprocessors , 2001 .

[23]  Alan L. Cox,et al.  Lazy release consistency for software distributed shared memory , 1992, ISCA '92.

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

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

[26]  Erez Petrank,et al.  A parallel, incremental, mostly concurrent garbage collector for servers , 2005, TOPL.