Packer: An innovative space-time-efficient parallel garbage collection algorithm based on virtual spaces

The fundamental challenge of garbage collector (GC) design is to maximize the recycled space with minimal time overhead. For efficient memory management, in many GC designs the heap is divided into large object space (LOS) and non-large object space (non-LOS). When one of the spaces is full, garbage collection is triggered even though the other space may still have a lot of free room, thus leading to inefficient space utilization. Also, space partitioning in existing GC designs implies different GC algorithms for different spaces. This not only prolongs the pause time of garbage collection, but also makes collection not efficient on multiple spaces. To address these problems, we propose Packer, a space-and-time-efficient parallel garbage collection algorithm based on the novel concept of virtual spaces. Instead of physically dividing the heap into multiple spaces, Packer manages multiple virtual spaces in one physically shared space. With multiple virtual spaces, Packer offers the advantage of efficient memory management. At the same time, with one physically shared space, Packer avoids the problem of inefficient space utilization. To reduce the garbage collection pause time of Packer, we also propose a novel parallelization method that is applicable to multiple virtual spaces. We reduce the compacting GC parallelization problem into a tree traversal parallelization problem, and apply it to both normal and large object compaction.

[1]  Scott Nettles,et al.  A study of large object spaces , 1998, ISMM '98.

[2]  Xiao-Feng Li,et al.  Task-pushing: a Scalable Parallel GC Marking Algorithm without Synchronization Operations , 2007, 2007 IEEE International Parallel and Distributed Processing Symposium.

[3]  Toshio Endo,et al.  A Scalable Mark-Sweep Garbage Collector on Large-Scale Shared-Memory Machines , 1997, ACM/IEEE SC 1997 Conference (SC'97).

[4]  Erez Petrank,et al.  An efficient parallel heap compaction algorithm , 2004, OOPSLA.

[5]  Nir Shavit,et al.  Parallel Garbage Collection for Shared Memory Multiprocessors , 2001, Java Virtual Machine Research and Technology Symposium.

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

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

[8]  Benjamin G. Zorn,et al.  Garbage collection using a dynamic threatening boundary , 1995, PLDI '95.

[9]  Chandra Krintz,et al.  The mapping collector: virtual memory support for generational, parallel, and concurrent compaction , 2008, ASPLOS.

[10]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[11]  Erez Petrank,et al.  The Compressor: concurrent, incremental, and parallel compaction , 2006, PLDI '06.

[12]  Erez Petrank,et al.  Implementing an on-the-fly garbage collector for Java , 2000, ISMM '00.

[13]  Allen Wirfs-Brock,et al.  A Third Generation Smalltalk-80 Implementation , 1986, OOPSLA.