Home

Caching considerations for generational garbage collection


Author(s) : Thomas G. Moher Michael S. Lam Paul R. Wilson, 
Publisher : N/A
Publication Date : 1992
ISSN : N/A
Abstract : Garbage-collected systems allocate and reuse memory cyclically; this imposes a cyclic pattern on memory accesses that has its own distinctive locality characteristics. The cyclic reuse of memory tends to defeat caching strategies if the reuse cycle is too large to fit in fast memory. Generational garbage collectors allow a smaller amount of memory to be reused more often. This improves virtual memory performance, because the frequently-reused area stays in main memory. The same principle can be applied at the level of highspeed cache memories, if the cache is larger than the youngest generation. Because of the repeated cycling through a fixed amount of memory, however, generational garbage collection interacts with cache design in unusual ways, and modestly set-associative caches can significantly outperform direct-mapped caches. While our measurements show do not show very high miss rates for garbage collected systems, they indicate that performance problems are likely in faster nextgeneration systems, where second-level cache misses may cost scores of cycles. Software techniques can improve cache performance of garbage-collected systems, by decreasing the cache "footprint " of the youngest generation; compiler techniques that reduce the amount of heap allocation also improve locality. Still, garbagecollected systems with a high rate of heap allocation require somewhat more cache capacity and/or main memory bandwidth than conventional systems.,