An efficient distributed garbage collection algorithm

  • David R. Lester
Submitted Presentations
Part of the Lecture Notes in Computer Science book series (LNCS, volume 365)


General purpose parallel computers can be expected to become widely available shortly; compilers for such machines need to be developed now. Declarative languages provide an excellent foundation for software development on such machines. One of the critical areas for an efficient implementation of a declarative language is the memory allocator and its associated garbage collector.

In a sequential implementation of a high level language, Appel has shown that the asymptotically most efficient garbage collector is a copying collector. For parallel implementations, we would like a distributed algorithm for allocation and garbage collection. A reasonably efficient solution to this problem is weighted reference counting, which was discovered independently by Bevan and Watson and Watson.

This paper builds on their work, by providing a composite garbage collector; it incorporates the best features of both a copying and a reference counting collector. For non-local heap operations, the collector is fully distributed; it is as efficient as copying collection for heap operations local to a single processor. The garbage collector is proved to be correct and an analysis of the space complexity of the algorithm is given.


Declarative Languages Garbage Collection General Purpose Parallel Computer G-Machine Lazy Functional Languages 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1987]
    A.W. Appel. Garbage collection can be faster than stack allocation. Information Processing Letters, 25(4):275–279, 1987.CrossRefGoogle Scholar
  2. [1987]
    D.I. Bevan. Distributed garbage collection using reference counting. In J.W. de Bakker, A.J. Nijman, and P.C. Treleaven, editors, PARLE Parallel Architectures and Languages Europe, volume 2, pages 176–187, Eindhoven, The Netherlands, June 1987.Google Scholar
  3. [1988]
    G.L. Burn. A shared memory parallel G-machine based on the evaluation transformer model of computation. In Proceedings of the Workshop on the Implementation of Lazy Functional Languages, Aspenäs, Göteborg, Sweden, 5–8, September 1988.Google Scholar
  4. [1989]
    G.L. Burn. Overview of a parallel reduction machine project ii. In In these Proceedings, Eindhoven, The Netherlands, 1989.Google Scholar
  5. [1988]
    G.L. Burn, S.L. Peyton Jones, and J.D. Robson. The spineless G-machine. In Proceedings of the 1988 ACM Symposium on Lisp and Functional Programming, Snowbird, Utah, 1988.Google Scholar
  6. [1988]
    J.R. Ellis, K. Li, and A.W. Appel. Real-time concurrent collection on stock multiprocessors Technical Report 25, Digital Systems Research Center, Palo Alto, California 94301, February 1988.Google Scholar
  7. [1969]
    R. Fenichel and J. Yochelson. A lisp garbage-collector for virtual memory computer systems. Communications of the ACM, 12(11):611–612, November 1969.CrossRefGoogle Scholar
  8. [1969]
    F. Harary. Graph Theory. Addison-Wesley Publishing Co., Reading, Massachusetts, 1969.Google Scholar
  9. [1988]
    P.H. Hartel. A comparative study of four garbage collection algorithms. Technical report, Computing Science Department, University of Amsterdam, February 1988.Google Scholar
  10. [1983]
    R.J.M. Hughes. The Design and Implementation of Programming languages. Doctoral thesis, Oxford University Computing Laboratory, Programming Research Group, July 1983. Also published as Technical Monograph PRG-40.Google Scholar
  11. [1983]
    T. Johnsson. The G-machine. An abstract machine for graph reduction. In Declarative Programming Workshop, pages 1–20, University College London, April 1983.Google Scholar
  12. [1987]
    T. Johnsson. Compiling Lazy Functional Languages. Doctoral thesis, Chalmers Tekniska Högskola, Göteborg, Sweden, 1987.Google Scholar
  13. [1989]
    H. Kingdon, D.R. Lester, and G.L. Burn. The HDG-Machine: A Highly Distributed Graph Reducer for a Transputer Network. ACM SIGPLAN Notices, London, U.K., 11–13 September 1989.Google Scholar
  14. [1988]
    D.R. Lester. Combinator Graph Reduction: A Congruence and its Applications. Doctoral thesis, Oxford University, 1988.Google Scholar
  15. [1988]
    L.G. Valiant. General purpose parallel architectures. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science. North Holland, Amsterdam, The Netherlands, 1988.Google Scholar
  16. [1987]
    P. Watson and I. Watson. An efficient garbage collection scheme for parallel computer architectures. In J.W. de Bakker, A.J. Nijman, and P.C. Treleaven, editors, PARLE Parallel Architectures and Languages Europe, volume 2, pages 432–443, Eindhoven, The Netherlands, June 1987.Google Scholar
  17. [1983]
    N. Wirth. Programming in Modula-2. Springer-Verlag, Heidelberg, West Germany, 2nd edition, 1983. ISBN 3-540-12206-0.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • David R. Lester
    • 1
  1. 1.GEC Hirst Research CentreWembleyUnited Kingdom

Personalised recommendations