Reducing generational copy reserve overhead with fallback compaction

As programming languages with managed runtimes become increasingly popular, it is essential that virtual machines are implemented efficiently. The performance of the memory management subsystem can be a defining factor in the performance of the virtualachine as a whole. We present a technique by which garbage collector performance can be improved. We describe an algorithm that combines a standard generational copying collector with a mark and compact collector. We observe that, since most objects do not survive a garbage collection, it is not necessary to reserve space to copy them all. The result is a generational copying collector that operates with a smaller copy reserve overhead than traditional Appel-style collectors. We maintain correctness in the worst case through the use of mark and compact collection. When the reduced copy reserve overflows, a compacting phase ensures that all data are accommodated. We have implemented this algorithm within the framework of Jikes RVM and MMTk. For most benchmarks examined, our experiments show that performance is comparable to or better than a standard generational copying collector.

[1]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[2]  Emery D. Berger,et al.  MC2: high-performance garbage collection for memory-constrained environments , 2004, OOPSLA.

[3]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[4]  Perry Cheng,et al.  Oil and water? High performance garbage collection in Java with MMTk , 2004, Proceedings. 26th International Conference on Software Engineering.

[5]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

[6]  Bowen Alpern,et al.  Implementing jalapeño in Java , 1999, OOPSLA '99.

[7]  William M. Waite,et al.  A Compaction Procedure for Variable-Length Storage Elements , 1967, Comput. J..

[8]  Alexandru Nicolau,et al.  Comparison of Compacting Algorithms for Garbage Collection , 1983, TOPL.

[9]  Chandra Krintz,et al.  Dynamic selection of application-specific garbage collectors , 2004, ISMM '04.

[10]  H. B. M. Jonkers,et al.  A Fast Garbage Compaction Algorithm , 1979, Inf. Process. Lett..

[11]  David A. Fisher,et al.  Bounded Workspace Garbage Collection in an Address-Order Preserving List Processing Environment , 1974, Information Processing Letters.

[12]  Tony Printezis,et al.  Hot-Swapping Between a Mark&Sweep and a Mark&Compact Garbage Collector in a Generational Environment , 2001, Java Virtual Machine Research and Technology Symposium.

[13]  Henry Lieberman,et al.  A real-time garbage collector based on the lifetimes of objects , 1983, CACM.

[14]  Henry G. Baker,et al.  The treadmill: real-time garbage collection without motion sickness , 1992, SIGP.

[15]  Francisco Tirado,et al.  Adaptive Tuning of Reserved Space in an Appel Collector , 2004, ECOOP.

[16]  Kathryn S. McKinley,et al.  Beltway: getting around garbage collection gridlock , 2002, PLDI '02.

[17]  David A. Fisher Copying cyclic list structures in linear time using bounded workspace , 1975, CACM.

[18]  Andrew W. Appel,et al.  Simple generational garbage collection and fast allocation , 1989, Softw. Pract. Exp..