Limits of Parallel Marking Garbage Collection
Fridtjof Siebert


8 Jun 2008
ISMM'08 - International Symposium on Memory Management - Tucson, Arizona, USA



More and more, parallel multicore systems will be used even in low-end devices such as embedded controllers that require realtime guarantees. When garbage collection is used in these systems, parallel or concurrent garbage collection brings important performance advantages. In the context of realtime systems, it has to be shown that a parallel garbage collector implementation not only performs well in most cases, but guarantees on its performance in the worst case are required.

This paper analyses the difficulties a parallel mark-and-sweep garbage collector faces during a parallel mark phase. The performance of such a garbage collector degrades when only some of the available processors can perform scanning work in the mark phase. Whenever the $grey$ set contains fewer elements than the number of available processors, some processors may be stalled waiting for new objects to be added to the $grey$ set. This paper gives an upper bound for the number of stalls that may occur as a function of simple properties of the memory graph.

This upper bound is then determined for the Java applications that are part of the SPECjvm98 benchmark suite and the theoretical worst-case scalability of a parallel mark phase is analysed. The presented approach is then applied to a Java virtual machine that has uniform mark steps, which at first results in poor worst-case scalability. A small change in the implementation is then proposed and analysed to achieve good scalability even in the worst case.

Download: PDF icon PDF (231kB)