Abstract
We present FRC, a high-performance concurrent parallel reference counter for unmanaged languages. It is well known that high-performance garbage collectors help developers write memory-safe, highly concurrent systems and data structures. While C++, C, and other unmanaged languages are used in high-performance applications, adding concurrent memory management to these languages has proven to be difficult. Unmanaged languages like C++ use pointers instead of references, and have uncooperative mutators which do not pause easily at a safe point. Thus, scanning mutator stack root references is challenging.
FRC only defers decrements and does not require mutator threads to pause during collection. By deferring only decrements, FRC avoids much of the synchronization overhead of a fully-deferred implementation. Root references are scanned without interrupting the mutator by publishing these references to a thread-local array. FRC's performance can exceed that of the C++ standard library's shared pointer by orders of magnitude. FRC's thread-safety guarantees and low synchronization overhead enable significant throughput gains for concurrently-readable shared data structures.
We describe the components of FRC, including our static tree router data structure: a novel barrier which improves the scalability of parallel collection workers. FRC's performance is evaluated on several concurrent data structures. We release FRC and our tests as open-source code and expect FRC will be useful for many concurrent C++ software systems.
- Nikolas Askitis. 2012. Cache-conscious String Data Structures, Sorting and Algorithms: theory and practice. http://web.archive.org/web/20120206015921/http://www.naskitis.com/Google Scholar
- David F. Bacon, Clement R. Attanasio, Han B. Lee, V. T. Rajan, and Stephen Smith. 2001. Java Without the Coffee Breaks: A Nonintrusive Multiprocessor Garbage Collector. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI '01). ACM, New York, NY, USA, 92-103. Google Scholar
Digital Library
- Stephen M. Blackburn and Kathryn S. McKinley. 2003. Ulterior Reference Counting: Fast Garbage Collection Without a Long Wait. In Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-oriented Programing, Systems, Languages, and Applications (OOPSLA '03). ACM, New York, NY, USA, 344-358. Google Scholar
Digital Library
- Stephen M. Blackburn and Kathryn S. McKinley. 2008. Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance. In ACM Conference on Programming Language Design and Implementation (PLDI '08). ACM, 22-32. Google Scholar
Digital Library
- Hans-J. Boehm. 2002. Bounding Space Usage of Conservative Garbage Collectors. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '02). ACM, New York, NY, USA, 93-100. Google Scholar
Digital Library
- Hans-Juergen Boehm. 2004. The Space Cost of Lazy Reference Counting. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '04). ACM, New York, NY, USA, 210-219. Google Scholar
Digital Library
- Hans-Juergen Boehm and Mark Weiser. 1988. Garbage Collection in an Uncooperative Environment. Softw. Pract. Exper. 18, 9 (Sept. 1988), 807-820. Google Scholar
Digital Library
- George E. Collins. 1960. A Method for Overlapping and Erasure of Lists. Commun. ACM 3, 12 (Dec. 1960), 655-657. Google Scholar
Digital Library
- David Detlefs, Christine Flood, Steve Heller, and Tony Printezis. 2004. Garbage-first Garbage Collection. In Proceedings of the 4th International Symposium on Memory Management (ISMM '04). ACM, New York, NY, USA, 37-48. Google Scholar
Digital Library
- L. Peter Deutsch and Daniel G. Bobrow. 1976. An Efficient, Incremental, Automatic Garbage Collector. Commun. ACM 19, 9 (Sept. 1976), 522-526. Google Scholar
Digital Library
- Daniel Frampton. 2010. Garbage Collection and the Case for High-level Low-level Programming. Ph.D. Dissertation. Australian National University.Google Scholar
- Ivan Jibaja, Stephen M. Blackburn, Mohammad R. Haghighat, and Kathryn S. McKinley. 2011. Deferred Gratification: Engineering for High Performance Garbage Collection from the Get Go. In Proceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness (MSPC '11). ACM, New York, NY, USA, 58-65. Google Scholar
Digital Library
- Ryan Johnson, Ippokratis Pandis, Nikos Hardavellas, Anastasia Ailamaki, and Babak Falsafi. 2009. Shore-MT: A Scalable Storage Manager for the Multicore Era. In Proceedings of the 12th International Conference on Extending Database Technology: Advances in Database Technology (EDBT '09). ACM, New York, NY, USA, 24-35. Google Scholar
Digital Library
- Yossi Levanoni and Erez Petrank. 2001. 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 (OOPSLA '01). ACM, New York, NY, USA, 367-380. Google Scholar
Digital Library
- John McCarthy. 1960. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I. Commun. ACM 3, 4 (April 1960), 184-195. Google Scholar
Digital Library
- Maged M. Michael. 2004. Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. IEEE Trans. Parallel Distrib. Syst. 15, 6 (June 2004), 491-504. Google Scholar
Digital Library
- Jon Rafkind, Adam Wick, John Regehr, and Matthew Flatt. 2009. Precise Garbage Collection for C. In Proceedings of the 2009 International Symposium on Memory Management (ISMM '09). ACM, New York, NY, USA, 39-48. Google Scholar
Digital Library
- Rifat Shahriyar, Stephen M. Blackburn, and Daniel Frampton. 2012. Down for the Count? Getting Reference Counting Back in the Ring. In Proceedings of the 2012 International Symposium on Memory Management (ISMM '12). ACM, New York, NY, USA, 73-84. Google Scholar
Digital Library
- Rifat Shahriyar, Stephen M. Blackburn, and Kathryn S. McKinley. 2014. Fast Conservative Garbage Collection. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA '14). ACM, New York, NY, USA, 121- 139. Google Scholar
Digital Library
- Rifat Shahriyar, Stephen Michael Blackburn, Xi Yang, and Kathryn S. McKinley. 2013. Taking off the Gloves with Reference Counting Immix. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA '13). ACM, New York, NY, USA, 93-110. Google Scholar
Digital Library
- Paul R. Wilson. 1992. Uniprocessor Garbage Collection Techniques. In Proceedings of the International Workshop on Memory Management (IWMM '92). Springer-Verlag, London, UK, UK, 1-42. http://dl.acm.org/citation.cfm?id=645648.664824 Google Scholar
Digital Library
Index Terms
FRC: a high-performance concurrent parallel deferred reference counter for C++
Recommendations
FRC: a high-performance concurrent parallel deferred reference counter for C++
ISMM 2018: Proceedings of the 2018 ACM SIGPLAN International Symposium on Memory ManagementWe present FRC, a high-performance concurrent parallel reference counter for unmanaged languages. It is well known that high-performance garbage collectors help developers write memory-safe, highly concurrent systems and data structures. While C++, C, ...
An efficient on-the-fly cycle collection
A reference-counting garbage collector cannot reclaim unreachable cyclic structures of objects. Therefore, reference-counting collectors either use a backup tracing collector infrequently, or employ a cycle collector to reclaim cyclic structures. We ...
Ulterior reference counting: fast garbage collection without a long wait
Special Issue: Proceedings of the OOPSLA '03 conferenceGeneral purpose garbage collectors have yet to combine short pause times with high throughput. For example, generational collectors can achieve high throughput. They have modest average pause times, but occasionally collect the whole heap and ...







Comments