Key Objects in Garbage Collection

When the cost of global garbage collection in a system grows large, the system can be redesigned to use generational collection. The newly-created objects usually have a much shorter half-life than average, and by concentrating the collector's efforts on them a large fraction of the garbage can be collected at a tiny fraction of the cost. The objects that survive generational collection may still become garbage, and the current practice is to perform occasional global garbage collections to purge these objects from the system, and again, the cost of doing these collections may become prohibitive when the volume of memory increases. Previous research has noted that the objects that survive generational collection often are born, promoted, and collected in large clusters. In this dissertation I show that carefully selected semantically or structurally important key objects can be drawn from the clusters and collected separately; when a key object becomes unreachable, the collector can take this as a hint to collect the cluster from which the key was drawn. To gauge the effectiveness of key objects, their use was simulated in ParcPlace's Object-works/Smalltalk system. The objects selected as keys were those that, as young objects, had pointers to them stored into old objects. The collector attempts to create a cluster for each key by gathering together all of the objects reachable from that key and from no previous key. Using this simple heuristic for key objects, the collector finds between 41% and 92% of the clustered garbage in a suite of simple test programs. Except for one program in the suite, about 95% of the time these key objects direct the collector to a cluster that is garbage. The exception should be heeded in improving the heuristics. In a replay of an interactive session, key object collection finds 59% of the clustered garbage and 66% of suggested targets are indeed garbage.

[1]  Hans-Juergen Boehm,et al.  Garbage collection in an uncooperative environment , 1988, Softw. Pract. Exp..

[2]  Benjamin G. Zorn,et al.  Comparing mark-and sweep and stop-and-copy garbage collection , 1990, LISP and Functional Programming.

[3]  J. White,et al.  Address/memory management for a gigantic LISP environment or, GC considered harmful , 1987, LIPO.

[4]  Benjamin G. Zorn,et al.  Comparative performance evaluation of garbage collection algorithms , 1989 .

[5]  Janak H. Patel,et al.  Parallel Garbage Collection on a Virtual Memory System , 1987, ICPP.

[6]  J. Eliot B. Moss,et al.  Incremental Collection of Mature Objects , 1992, IWMM.

[7]  Paul R. Wilson,et al.  Effective “static-graph” reorganization to improve locality in garbage-collected systems , 1991, PLDI '91.

[8]  George E. Collins,et al.  A method for overlapping and erasure of lists , 1960, CACM.

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

[10]  John DeTreville Heap Usage in the Topaz Environment , 1990 .

[11]  Daniel G. Bobrow,et al.  Combining generational and conservative garbage collection: framework and implementations , 1989, POPL '90.

[12]  Guy L. Steele,et al.  Multiprocessing compactifying garbage collection , 1975, CACM.

[13]  P. Thompson,et al.  Lazy garbage collection , 1987, Softw. Pract. Exp..

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

[15]  S. L. Graham,et al.  List Processing in Real Time on a Serial Computer , 1978 .

[16]  Paul R. Wilson,et al.  Some issues and strategies in heap management and memory hierarchies , 1991, SIGP.

[17]  Scott Shenker,et al.  Mostly parallel garbage collection , 1991, PLDI '91.

[18]  James W. Stamos,et al.  Static grouping of small objects to enhance performance of a paged virtual memory , 1984, TOCS.

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

[20]  Richard J. Beach,et al.  A structural view of the Cedar programming environment , 1986, TOPL.

[21]  Robert Fenichel,et al.  A LISP garbage-collector for virtual-memory computer systems , 1969, CACM.

[22]  Henry G. Baker,et al.  The treadmill: real-time garbage collection without motion sickness , 1992, SIGP.

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

[24]  Leslie Lamport,et al.  On-the-fly garbage collection: an exercise in cooperation , 1975, CACM.

[25]  Barry Hayes,et al.  Using key object opportunism to collect old objects , 1991, OOPSLA '91.

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

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

[28]  Peter Boehler Bishop,et al.  Computer systems with a very large address space and garbage collection , 1977 .

[29]  Dirk Grunwald,et al.  Empirical measurements of six allocation-intensive C programs , 1992, SIGP.

[30]  Frank Jackson,et al.  An adaptive tenuring policy for generation scavengers , 1992, TOPL.

[31]  Daniel G. Bobrow,et al.  Managing Reentrant Structures Using Reference Counts , 1980, ACM Trans. Program. Lang. Syst..

[32]  Barry Hayes Finalization in the Collector Interface , 1992, IWMM.

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

[34]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

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