Abstract
This paper presents a concurrent garbage collection method for functional programs running on a multicore processor. It is a concurrent extension of our bitmap-marking non-moving collector with Yuasa's snapshot-at-the-beginning strategy. Our collector is unobtrusive in the sense of the Doligez-Leroy-Gonthier collector; the collector does not stop any mutator thread nor does it force them to synchronize globally. The only critical sections between a mutator and the collector are the code to enqueue/dequeue a 32 kB allocation segment to/from a global segment list and the write barrier code to push an object pointer onto the collector's stack. Most of these data structures can be implemented in standard lock-free data structures. This achieves both efficient allocation and unobtrusive collection in a multicore system. The proposed method has been implemented in SML#, a full-scale Standard ML compiler supporting multiple native threads on multicore CPUs. Our benchmark tests show a drastically short pause time with reasonably low overhead compared to the sequential bitmap-marking collector.
- A. W. Appel. Simple generational garbage collection and fast allocation. Softw. Pract. Exper., 19(2):171–183, 1989. Google Scholar
Digital Library
- S. Auhagen, L. Bergstrom, M. Fluet, and J. Reppy. Garbage collection for multicore NUMA machines. In Proceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness, pp. 51–57, 2011. Google Scholar
Digital Library
- H. Azatchi, Y. Levanoni, H. Paz, and E. Petrank. An on-the-fly mark and sweep garbage collector based on sliding views. In Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pp. 269–281, 2003. Google Scholar
Digital Library
- G. E. Blelloch and P. Cheng. On bounding time and space for multiprocessor garbage collection. In Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pp. 104–117, 1999. Google Scholar
Digital Library
- P. Cheng and G. E. Blelloch. A parallel, real-time garbage collector. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, pp. 125–136, 2001. Google Scholar
Digital Library
- C. Click, G. Tene, and M. Wolf. The pauseless GC algorithm. In Proceedings of the 1st ACM/USENIX International Conference on Virtual Execution Environments, pp. 46–56, 2005. Google Scholar
Digital Library
- D. Detlefs, C. Flood, S. Heller, and T. Printezis. Garbage-first garbage collection. In Proceedings of the 4th international symposium on Memory management, pp. 37–48, 2004. Google Scholar
Digital Library
- E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. On-the-fly garbage collection: an exercise in cooperation. Commun. ACM, 21:966–975, 1978. Google Scholar
Digital Library
- D. Doligez and G. Gonthier. Portable, unobtrusive garbage collection for multiprocessor systems. In Proceedings of the 21st ACM SIGPLANSIGACT symposium on Principles of programming languages, pp. 70– 83, 1994. Google Scholar
Digital Library
- D. Doligez and X. Leroy. A concurrent, generational garbage collector for a multithreaded implementation of ML. In Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 113–123, 1993. Google Scholar
Digital Library
- T. Domani, E. K. Kolodner, and E. Petrank. A generational on-the-fly garbage collector for Java. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pp. 274–284, 2000. Google Scholar
Digital Library
- C. H. Flood, D. Detlefs, N. Shavit, and X. Zhang. Parallel garbage collection for shared memory multiprocessors. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1, pp. 21–21, 2001. Google Scholar
Digital Library
- Y. Levanoni and E. Petrank. An on-the-fly reference-counting garbage collector for Java. ACM Trans. Program. Lang. Syst., 28(1):1–69, 2006. Google Scholar
Digital Library
- S. Marlow, T. Harris, R. P. James, and S. Peyton Jones. Parallel generational-copying garbage collection with a block-structured heap. In Proceedings of the 7th international symposium on Memory management, pp. 11–20, 2008. Google Scholar
Digital Library
- S. Marlow and S. Peyton Jones. Multicore garbage collection with local heaps. In Proceedings of the international symposium on Memory management, pp. 21–32, 2011. Google Scholar
Digital Library
- Y. Ossia, O. Ben-Yitzhak, I. Goft, E. K. Kolodner, V. Leikehman, and A. Owshanko. A parallel, incremental and concurrent GC for servers. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pp. 129–140, 2002. Google Scholar
Digital Library
- F. Pizlo, D. Frampton, E. Petrank, and B. Steensgaard. Stopless: a real-time garbage collector for multiprocessors. In Proceedings of the 6th international symposium on Memory management, pp. 159–172, 2007. Google Scholar
Digital Library
- F. Pizlo, L. Ziarek, P. Maj, A. L. Hosking, E. Blanton, and J. Vitek. Schism: fragmentation-tolerant real-time garbage collection. In Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation, pp. 146–159, 2010. Google Scholar
Digital Library
- SML# project. http://www.pllab.riec.tohoku.ac.jp/smlsharp/.Google Scholar
- K. Ueno, A. Ohori, and T. Otomo. An efficient non-moving garbage collector for functional languages. In Proceedings of the 16th ACM SIGPLAN international conference on Functional programming, pp. 196–208, 2011. Google Scholar
Digital Library
- T. Yuasa. Real-time garbage collection on general-purpose machines. J. Syst. Softw., 11(3):181–198, 1990. Google Scholar
Digital Library
Index Terms
A fully concurrent garbage collector for functional programs on multicore processors
Recommendations
A fully concurrent garbage collector for functional programs on multicore processors
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingThis paper presents a concurrent garbage collection method for functional programs running on a multicore processor. It is a concurrent extension of our bitmap-marking non-moving collector with Yuasa's snapshot-at-the-beginning strategy. Our collector ...
A parallel, incremental, mostly concurrent garbage collector for servers
Multithreaded applications with multigigabyte heaps running on modern servers provide new challenges for garbage collection (GC). The challenges for “server-oriented” GC include: ensuring short pause times on a multigigabyte heap while minimizing ...
An on-the-fly mark and sweep garbage collector based on sliding views
Special Issue: Proceedings of the OOPSLA '03 conferenceWith concurrent and garbage collected languages like Java and C# becoming popular, the need for a suitable non-intrusive, efficient, and concurrent multiprocessor garbage collector has become acute. We propose a novel mark and sweep on-the-fly algorithm ...







Comments