ParMarkSplit: A Parallel Mark-Split Garbage Collector Based on a Lock-Free Skip-List
Mark-split is a garbage collection algorithm that combines advantages of both the mark-sweep and the copying collection algorithms. In this paper, we present a parallel mark-split garbage collector (GC). Our parallel design introduces and makes use of an efficient concurrency control mechanism for handling the list of free memory intervals. This mechanism is based on a lock-free skip-list design which supports an extended set of operations. Beside basic operations, it can perform a composite one that can search and remove and also insert two elements atomically. We have implemented the parallel mark-split GC in OpenJDK’s HotSpot virtual machine. We experimentally evaluate our collector and compare it with the default concurrent mark-sweep GC in HotSpot, using the DaCapo benchmarks, on two contemporary multiprocessor systems; one has 12 Intel Nehalem cores with HyperThreading and the other has 48 AMD Bulldozer cores. The evaluation shows that our parallel mark-split keeps the characteristics of the sequential mark-split, that it performs better than the concurrent mark-sweep in applications that have low live/garbage ratio, and have live objects locating contiguously, therefore being marked consecutively. Our parallel mark-split performs significantly better than a trivial parallelization based on locks in terms of both collection time and scalability.
Keywordsgarbage collector concurrent programming mark-split mark-sweep parallel garbage collection lock-free data structures
Unable to display preview. Download preview PDF.
- 3.Hughes, R.J.M.: A semi-incremental garbage collection algorithm. Software: Practice and Experience 12(11), 1081–1082 (1982)Google Scholar
- 5.Detlefs, D., Flood, C., Heller, S., Printezis, T.: Garbage-first garbage collection. In: Proceedings of the 4th ISMM, pp. 37–48. ACM (2004)Google Scholar
- 6.Sagonas, K., Wilhelmsson, J.: Mark and split. In: Proceedings of the 5th International Symposium on Memory Management, ISMM 2006, pp. 29–39. ACM (2006)Google Scholar
- 7.Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann (2008)Google Scholar
- 9.Michael, M.M.: Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Transactions on Parallel and Distributed Systems 15(8) (August 2004)Google Scholar
- 10.Sundell, H., Gidenstam, A., Papatriantafilou, M., Tsigas, P.: A Lock-Free Algorithm for Concurrent Bags. In: Proceedings of the 23rd ACM SPAA. ACM (2011)Google Scholar
- 13.Gidra, L., Thomas, G., Sopena, J., Shapiro, M.: Assessing the scalability of garbage collectors on many cores. In: Proceedings of the 6th PLOS Workshop. ACM (2011)Google Scholar
- 14.Kalibera, T., et al.: A black-box approach to understanding concurrency in dacapo. In: The UK MM-NET Workshop on Memory Management (April 2012)Google Scholar
- 15.Persson, M., Cummins, H.: Java technology, ibm style: Garbage collection policies. IBM DeveloperWorks (May 2006)Google Scholar