Lock-Free Parallel Garbage Collection

  • H. Gao
  • J. F. Groote
  • W. H. Hesselink
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3758)


This paper presents a lock-free parallel algorithm for garbage collection in a realistic model using synchronization primitives offered by machine architectures. Mutators and collectors can simultaneously operate on the data structure. In particular no strict alternation between usage and cleaning up is necessary, contrary to what is common in most other garbage collection algorithms.

We first design and prove an algorithm with a coarse grain of atomicity and subsequently apply the reduction theorem developed in [11] to implement the higher-level atomic steps by means of the low-level primitives.


Source Node Garbage Collection Liveness Property Reduction Theorem Black Node 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barnes, G.: A method for implementing lock-free data structures. In: Proceedings of the 5th ACM Symposium on Parallel Algorithms and Architectures, June 1993, pp. 261–270 (1993)Google Scholar
  2. 2.
    Ben-Ari, M.: Algorithms for on-the-fly garbage collection. ACM Transactions on programming Languages and Systems 6(3), 333–344 (1984)MATHCrossRefGoogle Scholar
  3. 3.
    Bershad, B.N.: Practical considerations for non-blocking concurrent objects. In: Proceedings of the Thirteenth International Conference on Distributed Computing Systems, pp. 264–274 (1993)Google Scholar
  4. 4.
    Cohen, E., Lamport, L.: Reduction in TLA. In: Proceedings of the 9th International Conference on Concurrency Theory, pp. 317–331 (1998)Google Scholar
  5. 5.
    Detlefs, D.L., Martin, P.A., Moir, M., Steele Jr, G.L.: Lock-free reference counting. Distributed Computing 15(4), 255–271 (2002)CrossRefGoogle Scholar
  6. 6.
    Dijkstra, E.W., Lamport, L., Martin, A.J., Scholten, C.S., Steffens, E.F.M.: On-the-fly garbage collection: An exercise in cooperation. Communications of the ACM 21(11), 966–975 (1978)MATHCrossRefGoogle Scholar
  7. 7.
    Endo, T., Taura, K., Yonezawa, A.: A scalable mark-sweep garbage collector on large-scale shared-memory machines. In: Proceedings of the 1997 ACM/IEEE conference on Supercomputing, pp. 1–14. ACM Press, New York (1997) (CDROM)CrossRefGoogle Scholar
  8. 8.
    Flood, C., Detlefs, D., Shavit, N., Zhang, C.: Parallel garbage collection for shared memory multiprocessors. In: Usenix Java Virtual Machine Research and Technology Symposium (JVM 2001), Monterey, CA (April 2001)Google Scholar
  9. 9.
    Gao, H., Groote, J.F., Hesselink, W.H.: Almost wait-free resizable hashtables (extended abstract). In: Proceedings of 18th International Parallel & Distributed Processing Symposium (IPDPS) (April 2004)Google Scholar
  10. 10.
    Gao, H., Groote, J.F., Hesselink, W.H.: Lock-free parallel garbage collection by mark&sweep. Technical Report CS-Report CSR-04-31, Eindhoven University of Technology, The Netherlands (2004)Google Scholar
  11. 11.
    Gao, H., Hesselink, W.H.: A formal reduction for lock-free parallel algorithms. In: Proceedings of the 16th conference on Computer Aided Verification (CAV) (July 2004)Google Scholar
  12. 12.
    Herlihy, M.: A methodology for implementing highly concurrent data objects. ACM Transactions on Programming Languages and Systems 15(5), 745–770 (1993)CrossRefGoogle Scholar
  13. 13.
    Herlihy, M.P., Moss, J.E.B.: Lock-free garbage collection for multiprocessors. IEEE Transactions on Parallel and Distributed Systems 3(3), 304–311 (1992)CrossRefGoogle Scholar
  14. 14.
  15. 15.
    Hesselink, W.H., Groote, J.F.: Wait-free concurrent memory management by Create, and Read until Deletion. Distributed Computing 14(1), 31–39 (2001)CrossRefGoogle Scholar
  16. 16.
    Jensen, E.H., Hagensen, G.W., Broughton, J.M.: A new approach to exclusive data access in shared memory multiprocessors. Technical Report UCRL-97663, Lawrence Livemore National Laboratory (January 1987)Google Scholar
  17. 17.
    Kanellakis, P.C., Shvartsman, A.A.: Fault-Tolerant Parallel Computation. Kluwer Academic Publishers, Dordrecht (1997)MATHGoogle Scholar
  18. 18.
    Luchangco, V., Moir, M., Shavit, N.: Nonblocking k-compare-single-swap. In: Proceedings of the fifteenth annual ACM symposium on Parallel algorithms and architectures, pp. 314–323. ACM Press, New York (2003)CrossRefGoogle Scholar
  19. 19.
    Lynch, N.A.: Distributed Algorithms. Morgan Kaufmann, San Francisco (1996)MATHGoogle Scholar
  20. 20.
    Michael, M.M.: Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In: Proceedings of the twenty-first annual symposium on Principles of distributed computing, pp. 21–30. ACM Press, New York (2002)CrossRefGoogle Scholar
  21. 21.
    Sundell, H., Tsigas, P.: Scalable and lock-free concurrent dictionaries. In: Proceedings of the 2004 ACM Symposium on Applied computing, pp. 1438–1445 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • H. Gao
    • 1
  • J. F. Groote
    • 2
  • W. H. Hesselink
    • 1
  1. 1.University of GroningenGroningenThe Netherlands
  2. 2.Eindhoven University of TechnologyEindhovenThe Netherlands

Personalised recommendations