Derivation and Evaluation of Concurrent Collectors

  • Martin T. Vechev
  • David F. Bacon
  • Perry Cheng
  • David Grove
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3586)

Abstract

There are many algorithms for concurrent garbage collection, but they are complex to describe, verify, and implement. This has resulted in a poor understanding of the relationships between the algorithms, and has precluded systematic study and comparative evaluation. We present a single high-level, abstract concurrent garbage collection algorithm, and show how existing snapshot and incremental update collectors, can be derived from the abstract algorithm by reducing precision. We also derive a new hybrid algorithm that reduces floating garbage while terminating quickly. We have implemented a concurrent collector framework and the resulting algorithms in IBM’s J9 Java virtual machine product and compared their performance in terms of space, time, and incrementality. The results show that incremental update algorithms sometimes reduce memory requirements (on 3 of 5 benchmarks) but they also sometimes take longer due to recomputation in the termination phase (on 4 of 5 benchmarks). Our new hybrid algorithm has memory requirements similar to the incremental update collectors while avoiding recomputation in the termination phase.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Appel, A.W., Ellis, J.R., Li, K.: Real-time concurrent collection on stock multiprocessors. In: Proceedings of the SIGPLAN’88 Conference on Programming Language Design and Implementation, Atlanta, Georgia, June 1988. SIGPLAN Notices, vol. 23(7), pp. 11–20 (1988)Google Scholar
  2. 2.
    Azatchi, H., Levanoni, Y., Paz, H., Petrank, E.: An on-the-fly mark and sweep garbage collector based on sliding views. In: Proceedings of the 18th ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 2003, pp. 269–281. ACM Press, New York (2003)CrossRefGoogle Scholar
  3. 3.
    Bacon, D.F., Attanasio, C.R., Lee, H.B., Rajan, V.T., Smith, S.: Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In: Proc. of the SIGPLAN Conference on Programming Language Design and Implementation, Snowbird, Utah, June 2001. SIGPLAN Notices, Vol. 36(5), pp. 92–103 (2001)Google Scholar
  4. 4.
    Bacon, D.F., Cheng, P., Rajan, V.T.: A real-time garbage collector with low overhead and consistent utilization. In: Proceedings of the 30th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, New Orleans, Louisiana, Jan 2003. SIGPLAN Notices, vol. 38(1), pp. 285–298 (2003)Google Scholar
  5. 5.
    Bacon, D.F., Cheng, P., Rajan, V.T.: A unified theory of garbage collection. In: Proceedings of the ACM Conference on Object-Oriented Systems, Languages, and Applications, Vancouver, British Columbia, October 2004, pp. 50–68 (2004)Google Scholar
  6. 6.
    Baker, H.G.: List processing in real-time on a serial computer. Commun. ACM 21(4), 280–294 (1978)MATHCrossRefGoogle Scholar
  7. 7.
    Baker, H.G.: The Treadmill, real-time garbage collection without motion sickness. SIGPLAN Notices 27(3), 66–70 (1992)CrossRefGoogle Scholar
  8. 8.
    Barth, J.M.: Shifting garbage collection overhead to compile time. Commun. ACM 20(7 ), 513–518 (1977)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Ben-Ari, M.: Algorithms for on-the-fly garbage collection. ACM Trans. Program. Lang. Syst. 6(3), 333–344 (1984)MATHCrossRefGoogle Scholar
  10. 10.
    Boehm, H.-J., Demers, A.J., Shenker, S.: Mostly parallel garbage collection. In: PLDI ’91: Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, pp. 157–164. ACM Press, New York (1991)CrossRefGoogle Scholar
  11. 11.
    Brooks, R.A.: Trading data space for reduced time and code space in real-time garbage collection on stock hardware. In: Steele, G.L. (ed.) Conference Record of the 1984 ACM Symposium on Lisp and Functional Programming, Austin, Texas, August 1984, pp. 256–262 (1984)Google Scholar
  12. 12.
    Cheadle, A.M., Field, A.J., Marlow, S., Peyton Jones, S.L., While, R.L.: Non-stop Haskell. In: Proc. of the Fifth International Conference on Functional Programming, Montreal, Quebec, September 2000. SIGPLAN Notices, vol. 35(9), pp. 257–267 (2000)Google Scholar
  13. 13.
    Cheng, P., Blelloch, G.E.: A parallel, real-time garbage collector. In: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, June 2001, pp. 125–136. ACM Press, New York (2001)CrossRefGoogle Scholar
  14. 14.
    Dijkstra, E.W., Lamport, L., Martin, A.J., Scholten, C.S., Steffens, E.F.M.: On-the-fly garbage collection: an exercise in cooperation. Commun. ACM 21(11), 966–975 (1978)MATHCrossRefGoogle Scholar
  15. 15.
    Domani, T., Kolodner, E.K., Lewis, E., Salant, E.E., Barabash, K., Lahan, I., Levanoni, Y., Petrank, E., Yanorer, I.: Implementing an on-the-fly garbage collector for java. In: Proceedings of the second international symposium on Memory management, October 2000, pp. 155–166. ACM Press, New York (2000)CrossRefGoogle Scholar
  16. 16.
    Domani, T., Kolodner, E.K., Petrank, E.: A generational on-the-fly garbage collector for Java. In: Proc. of the SIGPLAN Conference on Programming Language Design and Implementation, June 2000. SIGPLAN Notices, vol. 35(6), pp. 274–284 (2000)Google Scholar
  17. 17.
    Henriksson, R.: Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund Institute of Technology (July 1998)Google Scholar
  18. 18.
    Hudson, R.L., Moss, E.B.: Incremental garbage collection for mature objects. In: Bekkers, Y., Cohen, J. (eds.) IWMM-GIAE 1992. LNCS, vol. 637. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  19. 19.
    Johnstone, M.S.: Non-Compacting Memory Allocation and Real-Time Garbage Collection. PhD thesis, University of Texas at Austin (Dec. 1997)Google Scholar
  20. 20.
    Lamport, L.: Garbage collection with multiple processes: an exercise in parallelism. In: Proc. of the 1976 International Conference on Parallel Processing, pp. 50–54 (1976)Google Scholar
  21. 21.
    Larose, M., Feeley, M.: A compacting incremental collector and its performance in a production quality compiler. In: pp. 1–9., doi:10.1145/286860.286861Google Scholar
  22. 22.
    Levanoni, Y., Petrank, E.: An on-the-fly reference counting garbage collector for java. In: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, October 2001, pp. 367–380. ACM Press, New York (2001)CrossRefGoogle Scholar
  23. 23.
    Nettles, S., O’Toole, J.: Real-time garbage collection. In: Proc. of the SIGPLAN Conference on Programming Language Design and Implementation, June 1993. SIGPLAN Notices, vol. 28(6), pp. 217–226 (1993)Google Scholar
  24. 24.
    North, S.C., Reppy, J.H.: Concurrent garbage collection on stock hardware. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 113–133. Springer, Heidelberg (1987)Google Scholar
  25. 25.
    Pixley, C.: An incremental garbage collection algorithm for multi-mutator systems. Distributed Computing 3(1), 41–49 (1988)MATHCrossRefGoogle Scholar
  26. 26.
    Roth, D.J., Wise, D.S.: One-bit counts between unique and sticky, pp. 49–56. Google Scholar
  27. 27.
    Steele, G.L.: Multiprocessing compactifying garbage collection. Commun. ACM 18(9), 495–508 (1975)MATHCrossRefGoogle Scholar
  28. 28.
    Steele, G.L.: Corrigendum: Multiprocessing compactifying garbage collection. Commun. ACM 19(6), 354 (1976)Google Scholar
  29. 29.
    Yuasa, T.: Real-time garbage collection on general-purpose machines. JSYSSOFT 11(3), 181–198 (1990)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Martin T. Vechev
    • 1
  • David F. Bacon
    • 2
  • Perry Cheng
    • 2
  • David Grove
    • 2
  1. 1.Computer LaboratoryCambridge UniversityCambridgeU.K
  2. 2.IBM T.J. Watson Research CenterYorktown HeightsU.S.A

Personalised recommendations