Older-First Garbage Collection in Practice

Garbage collection is a technology that solves a practical programming problem , namely that of reclaiming unused heap storage. Manual management of heap storage is notoriously error prone and garbage collection can help to simplify programming signiicantly. Most new programming languages incorporate garbage collection, and despite advances in computer hardware, the performance of garbage collection continues to matter. So-called generational collection has helped to improve the eeciency of garbage collection in fast-allocating programs by focusing on collecting young garbage, but has done little to reduce the cost of collecting a heap containing large amounts of older data. A new generational technique, older-rst collection, shows promise in its ability to manage also older data. This dissertation reports on an implementation study that compares two older-rst collectors to traditional (younger-rst) generational collectors. In general, the older-rst collectors perform adequately and are often eeective at reducing the rst-order cost of collection relative to younger-rst collectors. Older-rst collectors are particularly eeective at managing data with queue-like or random lifetimes and heaps containing large amounts of live data. However, the older-rst collectors are brittle in the sense that their performance may degrade quickly on some kinds of large linked data structures. My implementations incorporate techniques that restore robustness by eeectively disabling older-rst collection in cases where degradation occurs, and this disser-tation discusses further measures the collectors may take to avoid performance degradation. i I thank my committee members, Mitchell Wand, Rajmohan Rajaraman and Eliot Moss, and particularly my advisor, Will Clinger, for their participation, comments and help. Will Clinger also contributed in many ways over many years to Larceny, my experimental system, most obviously by writing the Twobit compiler for Scheme. The benchmarks used in this dissertation were written or modiied by or in other ways contributed to The most profound thanks still go to my wife Lynn, who provided boundless amounts of encouragement and support, and to my parents, who have always let me do what I want to and then helped me do it.

[1]  Jorge Stolfi,et al.  Pessimal algorithms and simplexity analysis , 1984, SIGA.

[2]  R. Kent Dybvig,et al.  Don't Stop the BIBOP: Flexible and Ecient Storage Management for Dynamically Typed Languages , 1994 .

[3]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[4]  Steffen Grarup,et al.  Incremental Mature Garbage Collection Using the Train Algorithm , 1995, ECOOP.

[5]  Richard P. Gabriel,et al.  Performance and evaluation of Lisp systems , 1985 .

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

[7]  Joel F. Bartlett,et al.  Compacting garbage collection with ambiguous roots , 1988, LIPO.

[8]  Damien Doligez,et al.  A concurrent, generational garbage collector for a multithreaded implementation of ML , 1993, POPL '93.

[9]  William D. Clinger,et al.  Generational garbage collection and the radioactive decay model , 1997, PLDI '97.

[10]  Henry G. Baker,et al.  Infant mortality and generational garbage collection , 1993, SIGP.

[11]  David L Weaver,et al.  The SPARC architecture manual : version 9 , 1994 .

[12]  David R. Hanson,et al.  Storage management for an implementation of SNOBOL4 , 1977, Softw. Pract. Exp..

[13]  Daniel G. Bobrow,et al.  An efficient, incremental, automatic garbage collector , 1976, CACM.

[14]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[15]  Darko Stefanovic,et al.  A comparative performance evaluation of write barrier implementation , 1992, OOPSLA '92.

[16]  Paul R. Wilson,et al.  Design of the opportunistic garbage collector , 1989, OOPSLA '89.

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

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

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

[20]  Darko Stefanovic,et al.  Properties of age-based automatic memory reclamation algorithms , 1999 .

[21]  Jacques Cohen,et al.  Garbage Collection of Linked Data Structures , 1981, CSUR.

[22]  William D. Clinger,et al.  Lambda, the ultimate label or a simple optimizing compiler for Scheme , 1994, LFP '94.

[23]  David A. Moon,et al.  Garbage collection in a large LISP system , 1984, LFP '84.

[24]  Kathryn S. McKinley,et al.  Age-based garbage collection , 1999, OOPSLA '99.

[25]  Jonathan Rees,et al.  Revised3 report on the algorithmic language scheme , 1986, SIGP.

[26]  Richard D. Greenblatt,et al.  LISP Machine Progress Report. , 1977 .