An efficient distributed garbage collection algorithm
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.
Keywords:Declarative Languages Garbage Collection General Purpose Parallel Computer G-Machine Lazy Functional Languages
Unable to display preview. Download preview PDF.
- 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
- 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
- G.L. Burn. Overview of a parallel reduction machine project ii. In In these Proceedings, Eindhoven, The Netherlands, 1989.Google Scholar
- 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
- 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
- F. Harary. Graph Theory. Addison-Wesley Publishing Co., Reading, Massachusetts, 1969.Google Scholar
- P.H. Hartel. A comparative study of four garbage collection algorithms. Technical report, Computing Science Department, University of Amsterdam, February 1988.Google Scholar
- 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
- 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
- T. Johnsson. Compiling Lazy Functional Languages. Doctoral thesis, Chalmers Tekniska Högskola, Göteborg, Sweden, 1987.Google Scholar
- 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
- D.R. Lester. Combinator Graph Reduction: A Congruence and its Applications. Doctoral thesis, Oxford University, 1988.Google Scholar
- 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
- 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
- N. Wirth. Programming in Modula-2. Springer-Verlag, Heidelberg, West Germany, 2nd edition, 1983. ISBN 3-540-12206-0.Google Scholar