Advertisement

Uniprocessor garbage collection techniques

  • Paul R. Wilson
Surveys
Part of the Lecture Notes in Computer Science book series (LNCS, volume 637)

Abstract

We survey basic garbage collection algorithms, and variations such as incremental and generational collection. The basic algorithms include reference counting, mark-sweep, mark-compact, copying, and treadmill collection. Incremental techniques can keep garbage collection pause times short, by interleaving small amounts of collection work with program execution. Generational schemes improve efficiency and locality by garbage collecting a smaller area more often, while exploiting typical lifetime characteristics to avoid undue overhead from long-lived objects.

Keywords

Garbage Collection Virtual Memory Garbage Collector Free List Live Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [AEL88]
    Andrew W. Appel, John R. Ellis, and Kai Li. Real-time concurrent garbage collection on stock multiprocessors. In SIGPLAN Symposium on Programming Language Design and Implementation, pages 11–20, Atlanta, Georgia, June 1988.Google Scholar
  2. [AL91]
    Andrew W. Appel and Kai Li. Virtual memory primitives for user programs. In Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS IV), pages 96–107, Santa Clara, California, April 1991.Google Scholar
  3. [And86]
    David L. Andre. Paging in Lisp programs. Master's thesis, University of Maryland, College Park, Maryland, 1986.Google Scholar
  4. [App87]
    Andrew W. Appel. Garbage collection can be faster than stack allocation. Information Processing Letters, 25(4):275–279, June 1987.CrossRefGoogle Scholar
  5. [App89a]
    Andrew W. Appel. Runtime tags aren't necessary. Lisp and Symbolic Computation, 2:153–162, 1989.CrossRefGoogle Scholar
  6. [App89b]
    Andrew W. Appel. Simple generational garbage collection and fast allocation. Software Practice and Experience, 19(2):171–183, February 1989.Google Scholar
  7. [App91]
    Andrew W. Appel. Garbage collection. In Peter Lee, editor, Topics in Advanced Language Implementation Techniques, pages 89–100. MIT Press, Cambridge, MA, 1991.Google Scholar
  8. [Bak78]
    Henry G. Baker, Jr. List processing in real time on a serial computer. Communications of the ACM, 21(4):280–294, April 1978.CrossRefGoogle Scholar
  9. [Bak92]
    Henry G. Baker, Jr. The Treadmill: Real-time garbage collection without motion sickness. ACM SIGPLAN Notices, 27(3):66–70, March 1992.CrossRefGoogle Scholar
  10. [Bar88]
    Joel F. Bartlett. Compacting garbage collection with ambiguous roots. Technical Report 88/2, Digital Equipment Corporation Western Research Laboratory, Palo Alto, California, February 1988.Google Scholar
  11. [BDS91]
    Hans-Juergen Boehm, Alan J. Demers, and Scott Shenker. Mostly parallel garbage collection. In SIGPLAN Symposium on Programming Language Design and Implementation, pages 157–164, Toronto, Ontario, Canada, June 1991.Google Scholar
  12. [Bla83]
    Ricki Blau. Paging on an object-oriented personal computer for Smalltalk. In ACM SIGMETRICS Conference on Measurement and Modeling of Computer Systems, Minneapolis, Minnesota, August 1983. Also appears as Technical Report UCB/CSD 83/125, University of California at Berkeley, Computer Science Division (EECS), Berkeley, California, August 1983.Google Scholar
  13. [Bob80]
    Daniel G. Bobrow. Managing reentrant structures using reference counts. ACM Transactions on Programming Languages and Systems, 2(3):269–273, July 1980.CrossRefGoogle Scholar
  14. [Boe91]
    Hans-Juergen Boehm. Hardware and operating system support for conservative garbage collection. In IEEE International Workshop on Object Orientation In Operating Systems, Palo Alto, California, October 1991. IEEE Press.Google Scholar
  15. [Bro84]
    Rodney A. Brooks. Trading data space for reduced time and code space in real-time collection on stock hardware. In SIGPLAN Symposium on LISP and Functional Programming, pages 108–113, Austin, Texas, August 1984.Google Scholar
  16. [BW88]
    Hans-Juergen Boehm and Mark Weiser. Garbage collection in an uncooperative environment. Software Practice and Experience, 18(9):807–820, September 1988.Google Scholar
  17. [CG77]
    Douglas W. Clark and C. Cordell Green. An empirical study of list structure in LISP. Communications of the ACM, 20(2):78–87, February 1977.CrossRefGoogle Scholar
  18. [Cha92]
    Craig Chambers. The Design and Implementation of the SELF Compiler, an Optimizing Compiler for an Object-Oriented Programming Language. PhD thesis, Stanford University, March 1992.Google Scholar
  19. [Che70]
    C. J. Cheney. A nonrecursive list compacting algorithm. Communications of the ACM, 13(11):677–678, November 1970.CrossRefGoogle Scholar
  20. [Cla79]
    Douglas W. Clark. Measurements of dynamic list structure use in Lisp. IEEE Transactions on Software Engineering, 5(1):51–59, January 1979.Google Scholar
  21. [CN83]
    Jacques Cohen and Alexandru Nicolau. Comparison of compacting algorithms for garbage collection. ACM Transactions on Programming Languages and Systems, 5(4):532–553, October 1983.CrossRefGoogle Scholar
  22. [Coh81]
    Jacques Cohen. Garbage collection of linked data structures. Computing Surveys, 13(3):341–367, September 1981.CrossRefGoogle Scholar
  23. [Col60]
    George E. Collins. A method for overlapping and erasure of lists. Communications of the ACM, 2(12):655–657, December 1960.CrossRefGoogle Scholar
  24. [Cou88]
    Robert Courts. Improving locality of reference in a garbage-collecting memory management system. Communications of the ACM, 31(9):1128–1138, September 1988.CrossRefGoogle Scholar
  25. [CWB86]
    Patrick J. Caudill and Allen Wirfs-Brock. A third-generation Smalltalk-80 implementation. In Norman Meyrowitz, editor, ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA '86), pages 119–130, September 1986. Also published as ACM SIGPLAN Notices 21(11):119–130, November, 1986.Google Scholar
  26. [Daw82]
    Jeffrey L. Dawson. Improved effectiveness from a real-time LISP garbage collector. In SIGPLAN Symposium on LISP and Functional Programming, pages 159–167, August 1982.Google Scholar
  27. [DB76]
    L. Peter Deutsch and Daniel G. Bobrow. An efficient, incremental, automatic garbage collector. Communications of the ACM, 19(9):522–526, September 1976.CrossRefGoogle Scholar
  28. [DeT90]
    John DeTreville. Experience with concurrent garbage collectors for modula-2+. Technical Report 64, Digital Equipment Corporation Systems Research Center, Palo Alto, California, August 1990.Google Scholar
  29. [DLM+78]
    Edsger W. Dijkstra, Leslie Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. On-the-fly garbage collection: An exercise in cooperation. Communications of the ACM, 21(11):966–975, November 1978.CrossRefGoogle Scholar
  30. [DWH+90]
    Alan Demers, Mark Weiser, Barry Hayes, Daniel Bobrow, and Scott Shenker. Combining generational and conservative garbage collection: Framework and implementations. In Conf. Record of the Seventeeth Annual ACM Symposium on Principles of Programming Languages, pages 261–269, Las Vegas, Nevada, January 1990.Google Scholar
  31. [Ede90]
    Daniel Ross Edelson. Dynamic storage reclamation in C++. Technical Report UCSC-CRL-90-19, University of California at Santa Cruz, June 1990.Google Scholar
  32. [FY69]
    Robert R. Fenichel and Jerome C. Yochelson. A LISP garbage-collector for virtual-memory computer systems. Communications of the ACM, 12(11):611–612, November 1969.CrossRefGoogle Scholar
  33. [Gol91]
    Benjamin Goldberg. Tag-free garbage collection for strongly-typed programming languages. In SIGPLAN Symposium on Programming Language Design and Implementation, pages 165–176, June 1991. Toronto, Ontario, Canada.Google Scholar
  34. [Gre84]
    Richard Greenblatt. The LISP Machine. McGraw Hill, 1984. D.R. Barstow, H.E. Shrobe, E. Sandewall, eds.Google Scholar
  35. [Hay91]
    Barry Hayes. Using key object opportunism to collect old objects. In ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA '91), pages 33–46, Phoenix, Arizona, October 1991. ACM Press.Google Scholar
  36. [JJ92]
    Neils-Christian Juul and Eric Jul. Comprehensive and robust garbage collection in a distributed system. In International Workshop on Memory Management, St. Malo, France, September 1992. Springer-Verlag Lecture Notes in Computer Science series.Google Scholar
  37. [Joh91]
    Douglas Johnson. The case for a read barrier. In Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS IV), pages 96–107, Santa Clara, California, April 1991.Google Scholar
  38. [Joh92]
    Ralph E. Johnson. Reducing the latency of a real-time garbage collector. ACM Letters on Programming Languages and Systems, 1(1):46–58, March 1992.CrossRefGoogle Scholar
  39. [Knu69]
    Donald E. Knuth. The Art of Computer Programming, Volume 1: Fundamental Algorithms, chapter 2.3.5, pages 406–422. Addison-Wesley, Reading, Massachusetts, 1969.Google Scholar
  40. [KS77]
    H.T. Kung and S.W. Song. An efficient parallel garbage collection system and its correctness proof. In IEEE Symposum on Foundations of Computer Science, pages 120–131, Providence, Rhode Island, October 1977.Google Scholar
  41. [Lar77]
    R. G. Larson. Minimizing garbage collection as a function of region size. SIAM Journal on Computing, 6(4):663–667, December 1977.CrossRefGoogle Scholar
  42. [LH83]
    Henry Lieberman and Carl Hewitt. A real-time garbage collector based on the lifetimes of objects. Communications of the ACM, 26(6):419–429, June 1983.Google Scholar
  43. [LQP92]
    Bernard Lang, Christian Queinnec, and José Piquer. Garbage collecting the world. In ACM Symposium on Principles of Programming, pages 39–50, Albuquerque, New Mexico, January 1992.Google Scholar
  44. [McB63]
    J. Harold McBeth. On the reference counter method. Communications of the ACM, 6(9):575, September 1963.CrossRefGoogle Scholar
  45. [McC60]
    John McCarthy. Recursive functions of symbolic expressions and their computation by machine. Communications of the ACM, 3(4):184–195, April 1960.CrossRefGoogle Scholar
  46. [Min63]
    Marvin Minsky. A LISP garbage collector algorithm using serial secondary storage. A.I Memo 58, Project MAC, MIT, Cambridge, Massachusetts, 1963.Google Scholar
  47. [Moo84]
    David Moon. Garbage collection in a large Lisp system. In Conference Record of the 1984 ACM Symposium on Lisp and Functional Programming, pages 235–246, Austin, Texas, August 1984.Google Scholar
  48. [Nil88]
    Kelvin Nilsen. Garbage collection of strings and linked data structures in real time. Software, Practice and Experience, 18(7):613–640, July 1988.Google Scholar
  49. [NR87]
    S. C. North and J. H. Reppy. Concurrent Garbage Collection on Stock Hardware, pages 113–133. Number 274 in Lecture Notes in Computer Science. Springer-Verlag, September 1987.Google Scholar
  50. [PS92]
    David Plainfosse and Marc Shapiro. Experience with fault tolerant garbage collection in a distributed Lisp system. In International Workshop on Memory Management, St. Malo, France, September 1992. Springer-Verlag Lecture Notes in Computer Science Series.Google Scholar
  51. [RMA92]
    G. Ringwood, E. Miranda, and S. Abdullahi. Distributed garbage collection. In International Workshop on Memory Management, St. Malo, France, September 1992. Springer-Verlag Lecture Notes in Computer Science series.Google Scholar
  52. [Rov85]
    Paul Rovner. On adding garbage collection and runtime types to a stronglytyped, statically checked, concurrent language. Technical Report CSL-84-7, Xerox Palo Alto Research Center, Palo Alto, California, July 1985.Google Scholar
  53. [Sha88]
    Robert A. Shaw. Empirical Analysis of a Lisp System. PhD thesis, Stanford University, Stanford, California, February 1988. Also appears as Technical Report CSL-TR-88-351, Stanford University Computer Systems Laboratory, 1988.Google Scholar
  54. [Sob88]
    Patrick G. Sobalvarro. A lifetime-based garbage collector for LISP systems on general-purpose computers. B.S. thesis, Massachusetts Institute of Technology, Electrical Engineering and Computer Science Department, Cambridge, Massachusetts, 1988.Google Scholar
  55. [SS91]
    Ravi Sharma and Mary Lou Soffa. Parallel generational garbage collection. In ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA '91), pages 16–32, Phoenix, Arizona, October 1991.Google Scholar
  56. [Sta84]
    James William Stamos. Static grouping of small objects to enhance performance of a paged virtual memory. ACM Transactions on Programming Languages and Systems, 2(2):155–180, May 1984.Google Scholar
  57. [Ste75]
    Guy L. Steele Jr. Multiprocessing compactifying garbage collection. Communications of the ACM, 18(9):495–508, September 1975.CrossRefGoogle Scholar
  58. [UJ88]
    David Ungar and Frank Jackson. Tenuring policies for generation-based storage reclamation. In ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA '88), pages 1–17, San Diego, California, September 1988. ACM. Also published as ACM SIGPLAN Notices 23(11):1–17, November, 1988.Google Scholar
  59. [Ung84]
    David M. Ungar. Generation scavenging: A non-disruptive high-performance storage reclamation algorithm. In ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, pages 157–167, Pittsburgh, Pennsylvania, April 1984. Also distributed as ACM SIGPLAN Notices 19(5):157–167, May, 1987.Google Scholar
  60. [Wen90]
    E.P. Wentworth. Pitfalls of conservative garbage collection. Software, Practice and Experience, 20(7):719–727, July 1990.Google Scholar
  61. [WH91]
    Paul R. Wilson and Barry Hayes. The 1991 OOPSLA workshop on garbage collection in object oriented systems. In Addendum to the proceedings of OOPSLA '91, Phoenix, Arizona, 1991.Google Scholar
  62. [Wil90]
    Paul R. Wilson. Some issues and strategies in heap management and memory hierarchies. In OOPSLA/ECOOP '90 Workshop on Garbage Collection in Object-Oriented Systems, Ottawa, Ontario, Canada, October 1990. Also in SIGPLAN Notices 23(1):45–52, January 1991.Google Scholar
  63. [Wil91]
    Paul R. Wilson. Operating system support for small objects. In IEEE International Workshop on Object Orientation In Operating Systems, Palo Alto, California, October 1991. IEEE Press. Revised version to appear in Computing Systems. Google Scholar
  64. [WLM91]
    Paul R. Wilson, Michael S. Lam, and Thomas G. Moher. Effective static-graph reorganization to improve locality in garbage-collected systems. In SIGPLAN Symposium on Programming Language Design and Implementation, pages 177–191, Toronto, Canada, June 1991.Google Scholar
  65. [WLM92]
    Paul R. Wilson, Michael S. Lam, and Thomas G. Moher. Caching considerations for generational garbage collection. In SIGPLAN Symposium on LISP and Functional Programming, San Francisco, California, 1992.Google Scholar
  66. [WM89]
    Paul R. Wilson and Thomas G. Moher. Design of the opportunistic garbage collector. In ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages and Applications (OOPSLA '89), pages 23–35, New Orleans, Louisiana, October 1989.Google Scholar
  67. [Yua90]
    Taichi Yuasa. Real-time garbage collection on general-purpose machines. Journal of Systems and Software, 11:181–198, 1990.CrossRefGoogle Scholar
  68. [Zor89]
    Benjamin Zorn. Comparative Performance Evaluation of Garbage Collection Algorithms. PhD thesis, University of California at Berkeley, Electrical Engineering and Computer Science Department, Berkeley, California, December 1989. Also appears as Technical Report UCB/CSD 89/544, University of California at Berkeley.Google Scholar
  69. [Zor90]
    Benjamin Zorn. Comparing mark-and-sweep and stop-and-copy garbage collection. In 1990 ACM Conference on Lisp and Functional Programming, pages 87–98, Nice, France, June 1990.Google Scholar
  70. [Zor91]
    Benjamin Zorn. The effect of garbage collection on cache performance. Technical Report CU-CS-528-91, University of Colorado at Boulder, Dept. of Computer Science, Boulder, Colorado, May 1991.Google Scholar
  71. [Zor92]
    Benjamin Zorn. The measured cost of conservative garbage collection. Technical report, University of Colorado at Boulder, Dept. of Computer Science, Boulder, Colorado, 1992.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Paul R. Wilson
    • 1
  1. 1.University of TexasAustinUSA

Personalised recommendations