We study an incorporation of generations into a modern reference counting collector. We start with the two on-the-fly collectors
suggested by Levanoni and Petrank: a reference counting collector and a tracing (mark and sweep) collector. We then propose
three designs for combining them so that the reference counting collector collects the young generation or the old generation
or both. Our designs maintain the good properties of the Levanoni-Petrank collector. In particular, it is adequate for multithreaded
environment and a multiprocessor platform, and it has an effcient write barrier with no synchronization operations. To the
best of our knowledge, the use of generations with reference counting has not been tried before.
We have implemented these algorithms with the Jikes JVM and compared them against the concurrent reference counting collector
supplied with the Jikes package. As expected, the best combination is the one that lets the tracing collector work on the
young generation (where most objects die) and the reference counting work on the old generation (where many objects survive).
Matching the expected survival rate with the nature of the collector yields a large improvement in throughput while maintaining
the pause times around a couple of milliseconds.
Keywords Runtime systems - Memory management - Garbage collection - Generational Garbage Collection
Most of this work was done while the author was at the Computer Science Dept., Technion - Israel Institue of Technology.
This research was supported by the E. AND J. BISHOP RESEARCH FUND and by the FUND FOR PROMOTION OF RESEARCH at the Technion.