Abstract
Parallel and concurrent garbage collectors are increasingly employed by managed runtime environments (MREs) to maintain scalability, as multi-core architectures and multi-threaded applications become pervasive. Moreover, state-of-the-art MREs commonly implement compaction to eliminate heap fragmentation and enable fast linear object allocation.
Our empirical analysis of object demographics reveals that unreachable objects in the heap tend to form clusters large enough to be effectively managed at the granularity of virtual memory pages. Even though processes can manipulate the mapping of the virtual address space through the standard operating system (OS) interface on most platforms, extant parallel/concurrent compactors do not do so to exploit this clustering behavior and instead achieve compaction by performing, relatively expensive, object moving and pointer adjustment.
We introduce the Mapping Collector (MC), which leverages virtual memory operations to reclaim and consolidate free space without moving objects and updating pointers. MC is a nearly-single-phase compactor that is simpler and more efficient than previously reported compactors that comprise two to four phases. Through effective MRE-OS coordination, MC maintains the simplicity of a non-moving collector while providing efficient parallel and concurrent compaction.
We implement both stop-the-world and concurrent MC in a generational garbage collection framework within the open-source HotSpot Java Virtual Machine. Our experimental evaluation using a multiprocessor indicates that MC significantly increases throughput and scalability as well as reduces pause times, relative to state-of-the-art, parallel and concurrent compactors.
Supplemental Material
Available for Download
Supplemental material for The mapping collector: virtual memory support for generational, parallel, and concurrent compaction
- D. Abuaiadh, Y. Ossia, E. Petrank, and U. Silbershtein. An efficient parallel heap compaction algorithm. In the ACM Conference on Object-Oriented Systems, Languages and Applications, 2004. Google Scholar
Digital Library
- A.W. Appel, J.R. Ellis, and K. Li. Real-time concurrent collection on stock multiprocessors. ACM SIGPLAN Notices, 23(7):11--20, 1988. Google Scholar
Digital Library
- K. Barabash, O. Ben-Yitzhak, I. Goft, E.K. Kolodner, V. Leikehman, Y. Ossia, A. Owshanko, and E. Petrank. A parallel, incremental, mostly concurrent garbage collector for servers. ACM Transactions on Programming Languages and Systems, 27(6):1097--1146, 2005. Google Scholar
Digital Library
- K. Barabash, Y. Ossia, and E. Petrank. Mostly concurrent garbage collection revisited. In the ACM Conference on Object-Oriented Systems, Languages and Applications, 2003. Google Scholar
Digital Library
- S.M. Blackburn and K.S. McKinley. Ulterior reference counting: Fast garbage collection without a long wait. In the ACM Conference on Object-Oriented Systems, Languages and Applications, 2003. Google Scholar
Digital Library
- H.-J. Boehm. Reducing garbage collector cache misses. In Second International Symposium on Memory Management, ACM SIGPLAN Notices. ACM Press, 2000. Google Scholar
Digital Library
- H.-J. Boehm, A.J. Demers, and S. Shenker. Mostly parallel garbage collection. ACM SIGPLAN Notices, 26(6), 1991. Google Scholar
Digital Library
- H.-J. Boehm and M. Weiser. Garbage collection in an uncooperative environment. Software Practice and Experience, 18(9):807--820, 1988. Google Scholar
Digital Library
- C.J. Cheney. A non-recursive list compacting algorithm. Communications of the ACM, 13(11):677--8, Nov. 1970. Google Scholar
Digital Library
- P. Cheng and G. Blelloch. A parallel, real-time garbage collector. In the ACM Conference on Programming Languages Design and Implementation, 2001. Google Scholar
Digital Library
- J. Cohen and A. Nicolau. Comparison of compacting algorithms for garbage collection. ACM Transactions on Programming Languages and Systems, 5(4):532--553, 1983. Google Scholar
Digital Library
- The DaCapo Benchmark Suite. http://dacapobench.org.Google Scholar
- D. Detlefs, C. Flood, S. Heller, and T. Printezis. Garbage-first garbage collection. In the ACM International Symposium on Memory Management, 2004. Google Scholar
Digital Library
- C. Flood, D. Detlefs, N. Shavit, and C. Zhang. Parallel garbage collection for shared memory multiprocessors. In the USENIX Java Virtual Machine Symposium, 2001. Google Scholar
Digital Library
- C. Grzegorczyk, S. Soman, C. Krintz, and R. Wolski. Isla Vista heap sizing: Using feedback to avoid paging. In the ACM Conference on Code Generation and Optimization, 2007. Google Scholar
Digital Library
- M. Hertz, Y. Feng, and E.D. Berger. Garbage collection without paging. In the ACM Conference on Programming Languages Design and Implementation, 2005. Google Scholar
Digital Library
- A.L. Hosking. Portable, mostly-concurrent and mostly-copying garbage collection for multi-processors. In the ACM International Symposium on Memory Management, 2004. Google Scholar
Digital Library
- HotSpot Virtual Machine Garbage Collection. http://java.sun.com/javase/technologies/hotspot/gc/index.jsp.Google Scholar
- R.E. Jones. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley, July 1996. Google Scholar
Digital Library
- H. Kermany and E. Petrank. The Compressor: Concurrent, incremental and parallel compaction. In the ACM Conference on Programming Languages Design and Implementation, 2006. Google Scholar
Digital Library
- D. Lea. A memory allocator, 1997. http://gee.cs.oswego.edu/dl/html/malloc.html.Google Scholar
- Open Source J2SE Implementation. http://openjdk.java.net.Google Scholar
- Y. Ossia, O. Ben-Yitzhak, I. Goft, E.K. Kolodner, V. Leikehman, and A. Owshanko. A parallel, incremental and concurrent GC for servers. In the ACM Conference on Programming Languages Design and Implementation, 2002. Google Scholar
Digital Library
- Y. Ossia, O. Ben-Yitzhak, and M. Segal. Mostly concurrent compaction for mark-sweep GC. In the ACM International Symposium on Memory Management, 2004. Google Scholar
Digital Library
- T. Printezis and D. Detlefs. A generational mostly-concurrent garbage collector. In the ACM International Symposium on Memory Management, 2000. Google Scholar
Digital Library
- R. Rashid, A. Tevanian, M. Young, et al. Machine-independent virtual memory management for paged uniprocessor and multiprocessor architectures. In the ACM Conference on Architectural Support for Programming Languages and Operating Systems, 1987. Google Scholar
Digital Library
- N. Sachindran and E. Moss. MarkCopy: Fast copying GC with less space overhead. In the ACM Conference on Object-Oriented Systems, Languages and Applications, 2003. Google Scholar
Digital Library
- K. Sagonas and J. Wilhelmsson. Mark and split. In the ACM International Symposium on Memory Management, 2006. Google Scholar
Digital Library
- P. Sobalvarro. A lifetime-based garbage collector for Lisp systems on general-purpose computers. Technical Report AITR-1417, MIT AI Lab, Feb. 1988. Google Scholar
Digital Library
- The SPEC Benchmarks. http://www.spec.org.Google Scholar
- D.M. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. ACM SIGPLAN Notices, 19(5):157--167, Apr. 1984. Google Scholar
Digital Library
- The VolanoMark Benchmark. http://www.volano.com/benchmarks.html.Google Scholar
- P.R. Wilson, M.S. Johnstone, M. Neely, and D. Boles. Dynamic storage allocation: A survey and critical review. In the International Workshop on Memory Management, 1995. Google Scholar
Digital Library
- T. Yang, E.D. Berger, M. Hertz, S.F. Kaplan, and J.E.B. Moss. Autonomic heap sizing: Taking real memory into account. In the ACM International Symposium on Memory Management, 2004. Google Scholar
Digital Library
- T. Yang, E.D. Berger, S.F. Kaplan, and J.E.B. Moss. CRAMM: Virtual memory support for garbage-collected applications. In the ACM Conference on Operating Systems Design and Implementation, 2006. Google Scholar
Digital Library
- C. Zhang, K. Kelsey, X. Shen, C. Ding, M. Hertz, and M. Ogihara. Program-level adaptive memory management. In the ACM International Symposium on Memory Management, 2006. Google Scholar
Digital Library
Index Terms
The mapping collector: virtual memory support for generational, parallel, and concurrent compaction
Recommendations
The mapping collector: virtual memory support for generational, parallel, and concurrent compaction
ASPLOS '08Parallel and concurrent garbage collectors are increasingly employed by managed runtime environments (MREs) to maintain scalability, as multi-core architectures and multi-threaded applications become pervasive. Moreover, state-of-the-art MREs commonly ...
The mapping collector: virtual memory support for generational, parallel, and concurrent compaction
ASPLOS '08Parallel and concurrent garbage collectors are increasingly employed by managed runtime environments (MREs) to maintain scalability, as multi-core architectures and multi-threaded applications become pervasive. Moreover, state-of-the-art MREs commonly ...
The mapping collector: virtual memory support for generational, parallel, and concurrent compaction
ASPLOS XIII: Proceedings of the 13th international conference on Architectural support for programming languages and operating systemsParallel and concurrent garbage collectors are increasingly employed by managed runtime environments (MREs) to maintain scalability, as multi-core architectures and multi-threaded applications become pervasive. Moreover, state-of-the-art MREs commonly ...







Comments