Abstract
Modern concurrent copying garbage collection (GC), in particular, real-time GC, uses fine-grained synchronizations with a mutator, which is the application program that mutates memory, when it moves objects in its copy phase. It resolves a data race using a concurrent copying protocol, which is implemented as interactions between the collector threads and the read and write barriers that the mutator threads execute. The behavioral effects of the concurrent copying protocol rely on the memory model of the CPUs and the programming languages in which the GC is implemented. It is difficult, however, to formally investigate the behavioral properties of concurrent copying protocols against various memory models.
To address this problem, we studied the feasibility of the bounded model checking of concurrent copying protocols with memory models. We investigated a correctness-related behavioral property of copying protocols of various concurrent copying GC algorithms, including real-time GC Stopless, Clover, Chicken, Staccato, and Schism against six memory models, total store ordering (TSO), partial store ordering (PSO), relaxed memory ordering (RMO), and their variants, in addition to sequential consistency (SC) using bounded model checking. For each combination of a protocol and memory model, we conducted model checking with a model of a mutator. In this wide range of case studies, we found faults in two GC algorithms, one of which is relevant to the memory model. We fixed these faults with the great help of counterexamples. We also modified some protocols so that they work under some memory models weaker than those for which the original protocols were designed, and checked them using model checking. We believe that bounded model checking is a feasible approach to investigate behavioral properties of concurrent copying protocols under weak memory models.
Supplemental Material
Available for Download
This archive contains the appendix separated from the paper.
- Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, and Carl Leonardsson. 2016l. Stateless Model Checking for POWER. In Proceedings of 28th International Conference on Computer Aided Verification (CAV ’16) (LNCS), Vol. 9780. Springer-Verlag, 134–156. Google Scholar
Cross Ref
- Tatsuya Abe and Toshiyuki Maeda. 2014. A General Model Checking Framework for Various Memory Consistency Models. In Proceedings of 19th Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS ’14). IEEE, 332–341.Google Scholar
- Tatsuya Abe and Toshiyuki Maeda. 2016. Observation-based Concurrent Program Logic for Relaxed Memory Consistency Models. In Proceedings of 15th Asian Symposium on Programming Languages and Systems (APLAS ’16) (LNCS), Vol. 10017. Springer-Verlag, 63–84. Google Scholar
Cross Ref
- Tatsuya Abe and Toshiyuki Maeda. 2017. Concurrent Program Logic for Relaxed Memory Consistency Models with Dependencies across Loop Iterations. Journal of Information Processing 25 (2017), 244–255. Google Scholar
Cross Ref
- Tatsuya Abe, Tomoharu Ugawa, Toshiyuki Maeda, and Kousuke Matsumoto. 2016. Reducing State Explosion for Software Model Checking with Relaxed Memory Consistency Models. In Proceedings of Symposium on Dependable Software Engineering Theories, Tools and Applications (SETTA ’16) (LNCS), Vol. 9984. Springer-Verlag, 118–135. Google Scholar
Cross Ref
- Sarita V. Adve and Kourosh Gharachorloo. 1996. Shared memory consistency models: a tutorial. IEEE Computer 29, 12 (Dec. 1996), 66–76. Google Scholar
Digital Library
- Peter MÃijller Alexander J. Summers. 2017. Automating Deductive Verification for Weak-Memory Programs. (2017). arXiv:1703.06368.Google Scholar
- ARM 2016. ARM Architechture Reference Manual ARMv8, for ARMv8-A architechture profile. ARM.Google Scholar
- Azul. 2008. Pauseless Garbage Collection. White paper AWP–005–020. Azul Systems Inc. http://www.azulsystems.com/ products/whitepaper/wp_pgc.pdfGoogle Scholar
- David F. Bacon, Clement R. Attanasio, Han Bok Lee, V. T. Rajan, and Stephen E. Smith. 2001. Java Without the Coffee Breaks: A Nonintrusive Multiprocessor Garbage Collector. In Proceedings of ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI ’01). ACM Press, 92–103. Google Scholar
Digital Library
- Henry G. Baker. 1979. Optimizing Allocation and Garbage Collection of Spaces in MacLLisp. In Artificial Intelligence: An MIT Perspective, Winston and Brown (Eds.). MIT Press. http://home.pipeline.com/~hbaker1/OptAlloc.ps.gzGoogle Scholar
- Sebastian Burckhardt, Rajeev Alur, and Milo M. K. Martin. 2007. CheckFence: checking consistency of concurrent data types on relaxed memory models. In Proceedings of 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’07). ACM Press, 12–21. Google Scholar
Digital Library
- Damien Doligez and Georges Gonthier. 1994. Portable, Unobtrusive Garbage Collection for Multiprocessor Systems. In Proceedings of 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’94). ACM Press, 70–83. Google Scholar
Digital Library
- Rodrigo Ferreira, Xinyu Feng, and Zhong Shao. 2010. Parameterized Memory Models and Concurrent Separation Logic. In Proceedings of 19th European Symposium on Programming (ESOP ’10). 267–286. Google Scholar
Digital Library
- Shaked Flur, Kathryn E. Gray, Christopher Pulte, Susmit Sarkar, Ali Sezgin, Luc Maranget, Will Deacon, and Peter Sewell. 2016. Modelling the ARMv8 Architecture, Operationally: Concurrency and ISA. In Proceedings of 43rd annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). ACM Press, 608–621. Google Scholar
Digital Library
- Peter Gammie, Antony L. Hosking, and Kai Engelhardt. 2015. Relaxing Safely: Verified On-the-Fly Garbage Collection for x86-TSO. In Proceedings of 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’15). ACM Press, 99–109. Google Scholar
Digital Library
- Robert H. Halstead. 1985. Multilisp: A Language for Concurrent Symbolic Computation. ACM Transactions on Programming Languages and Systems 7, 4 (Oct. 1985), 501–538. Google Scholar
Digital Library
- Chris Hawblitzel and Erez Petrank. 2009. Automated Verification of Practical Garbage Collectors. In Proceedings of 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages. ACM Press, 441–453. Google Scholar
Digital Library
- Richard L. Hudson and J. Eliot B. Moss. 2001. Sapphire: Copying GC Without Stopping The World. In Joint ACM-ISCOPE Conference on Java Grande. ACM Press, 48–57. Google Scholar
Digital Library
- Richard L. Hudson and J. Eliot B. Moss. 2003. Sapphire: Copying Garbage Collection Without Stopping the World. Concurrency and Computation: Practice and Experience 15, 3–5 (2003), 223–261. Google Scholar
Cross Ref
- IBM. 2015. Power ISA(TM) Version 3.0.Google Scholar
- Intel. 2016. Intel® 64 and IA-32 Architectures Software Developer’s Manual.Google Scholar
- ISO/IEC 14882:2011. 2011. Programming Language C++.Google Scholar
- ISO/IEC 9899:2011. 2011. Programming Language C.Google Scholar
- Richard Jones, Antony Hosking, and Eliot Moss. 2012. The Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman & Hall.Google Scholar
Digital Library
- Bengt Jonsson. 2008. State-space exploration for concurrent algorithms under weak memory orderings: (preliminary version). SIGARCH Computer Architecture News 36, 5 (2008), 65–71. Google Scholar
Digital Library
- Jan-Oliver Kaiser, Hoang-Hai Dang, Derek Dreyer, Ori Lahav, and Viktor Vafeiadis. 2017. Strong Logic for Weak Memory: Reasoning About Release-Acquire Consistency in Iris. In Proceedings of 31st European Conference on Object-Oriented Programming (ECOOP ’17) (LIPIcs). Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 17:1–17:29.Google Scholar
- Haim Kermany and Erez Petrank. 2006. The Compressor: Concurrent, Incremental and Parallel Compaction. In Proceedings of 27th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’06). ACM Press, 354–363. Google Scholar
Digital Library
- Daniel Kroening and Michael Tautschnig. 2014. CBMC - C Bounded Model Checker - (Competition Contribution). In Proceedings of Tools and Algorithms for Construction and Analysis of Systems (TACAS ’14) (LNCS), Vol. 8413. Springer-Verlag, 389–391.Google Scholar
- Ori Lahav and Viktor Vafeiadis. 2015. Owicki-Gries Reasoning for Weak Memory Models. In Proceedings of 42nd International Colloquium on Automata, Languages, and Programming (ICALP ’15). 311–323. Google Scholar
Digital Library
- Yi Lin, Kunshan Wang, Stephen M. Blackburn, Antony L. Hosking, and Michael Norrish. 2015. Stop and Go: Understanding Yieldpoint Behavior. In Proceedings of 2015 International Symposium on Memory Management (ISMM ’15). ACM Press, 70–80. Google Scholar
Digital Library
- Alexander Linden and Pierre Wolper. 2010. An Automata-Based Symbolic Approach for Verifying Programs on Relaxed Memory Models. In Proceedings of 17th International SPIN Workshop on Model Checking of Software (SPIN ’10) (LNCS), Vol. 6349. Springer-Verlag, 212–226. Google Scholar
Cross Ref
- Bill McCloskey, David F. Bacon, Perry Cheng, and David Grove. 2008. Staccato: A Parallel and Concurrent Real-time Compacting Garbage Collector for Multiprocessors. IBM Research Report RC24505. IBM Research. http://domino.watson. ibm.com/comm/research_people.nsf/pages/dgrove.rc24504.htmlGoogle Scholar
- Scott Nettles and James O’Toole. 1993. Real-Time Replication-Based Garbage Collection. In Proceedings of 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’93). ACM Press, 217–226. Google Scholar
Digital Library
- Scott M. Nettles, James W. O’Toole, David Pierce, and Nicholas Haines. 1992. Replication-Based Incremental Copying Collection. In Proceedings of International Workshop on Memory Management (IWMM ’92). ACM Press, 357–364. Google Scholar
Cross Ref
- Brian Norris and Brian Demsky. 2013. CDSchecker: checking concurrent data structures written with C/C++ atomics. In Proceedings of 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’13). ACM Press, 131–150. Google Scholar
Digital Library
- Peizhao Ou and Brian Demsky. 2017. Checking Concurrent Data Structures Under the C/C++11 Memory Model. In Proceedings of 22nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’17). ACM Press, 45–59. Google Scholar
Digital Library
- Scott Owens. 2010. Reasoning about the Implementation of Concurrency Abstractions on x86-TSO. In Proceedings of European Conference on Object-Oriented Programming (ECOOP ’10) (LNCS), Vol. 6183. Springer-Verlag, 478–503. Google Scholar
Cross Ref
- Filip Pizlo, Daniel Frampton, Erez Petrank, and Bjarne Steensgard. 2007a. Stopless: A Real-Time Garbage Collector for Multiprocessors. In Proceedings of 6th International Symposium on Memory Management (ISMM ’07). ACM Press, 159–172. Google Scholar
Digital Library
- Filip Pizlo, Antony L. Hosking, and Jan Vitek. 2007b. Hierarchical Real-time Garbage Collection. In Proceedings of 2007 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES ’07). ACM Press, 123–133. Google Scholar
Digital Library
- Filip Pizlo, Erez Petrank, and Bjarne Steensgaard. 2008. A Study of Concurrent Real-Time Garbage Collectors. In Proceedings of 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’08). ACM Press, 33–44. Google Scholar
Digital Library
- Filip Pizlo, Lukasz Ziarek, Petr Maj, Antony L. Hosking, Ethan Blanton, and Jan Vitek. 2010. Schism: Fragmentation-Tolerant Real-Time Garbage collection. In Proceedings of 31st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’10). ACM Press, 146–159. Google Scholar
Digital Library
- Tom Ridge. 2010. A Rely-Guarantee Proof System for x86-TSO. In Proceedings of International Conference on Verified Software: Theories, Tools, and Experiments (VSTTE ’10). Springer-Verlag, 55–70. Google Scholar
Cross Ref
- Carl G. Ritson, Tomoharu Ugawa, and Richard Jones. 2014. Exploring Garbage Collection with Haswell Hardware Transactional Memory. In Proceedings of 2014 International Symposium on Memory Management (ISMM ’14). ACM Press, 105–115. Google Scholar
Digital Library
- Mooly Sagiv, Thomas Reps, and Reinhard Wilhelm. 2002. Parametric shape analysis via 3-valued logic. ACM Transactions on Programming Languages and Systems 24, 3 (2002), 217–298. Google Scholar
Digital Library
- Vijay A. Saraswat, Radha Jagadeesan, Maged Michael, and Christoph von Praun. 2007. A Theory of Memory Models. In Proceedings of 12th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’07). ACM Press, 161–172. Google Scholar
Digital Library
- Susmit Sarkar, Peter Sewell, Jade Alglave, Luc Maranget, and Derek Williams. 2011. Understanding POWER multiprocessors. In Proceedings of 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’11). ACM Press, 175–186. Google Scholar
Digital Library
- SV-COMP. 2016. Competition on Software Verification. (2016). https://sv-comp.sosy-lab.org/ .Google Scholar
- Ermenegildo Tomasco, Omar Inverso Truc Nguyen Lam, Bernd Fischer, Salvatore La Torre, and Gennaro Parlato. 2016. Lazy Sequentialization for TSO and PSO via Shared Memory Abstractions. In Proceedings of Formal Methods in Computer-Aided Design (FMCAD ’16). IEEE, 193–200. Google Scholar
Cross Ref
- Oleg Travkin, Annika Mütze, and Heike Wehrheim. 2013. SPIN as a Linearizability Checker under Weak Memory Models. In Proceedings of Haifa Verification Conference (LNCS), Vol. 8244. Springer-Verlag, 311–326. Google Scholar
Cross Ref
- Oleg Travkin and Heike Wehrheim. 2016. Verification of Concurrent Programs on Weak Memory Models. In Proceedings of International Confederation for Thermal Analysis and Calorimetry (ICTAC ’16) (LNCS), Vol. 9965. Springer-Verlag, 3–24. Google Scholar
Cross Ref
- Aaron Turon, Viktor Vafeiadis, and Derek Dreyer. 2014. GPS: Navigating weak memory with ghosts, protocols, and separation. In Proceedings of 2014 ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’14). ACM Press, 691–707. Google Scholar
Digital Library
- Tomoharu Ugawa, Richard Jones, and Carl G. Ritson. 2014. Reference Object Processing in On-The-Fly Garbage Collection. In Proceedings of 2014 International Symposium on Memory Management (ISMM ’14). ACM Press, 59–69. Google Scholar
Digital Library
- Viktor Vafeiadis and Chinmay Narayan. 2013. Relaxed separation logic: A program logic for C11 concurrency. In Proceedings of 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’13). ACM Press, 867–884. Google Scholar
Digital Library
- F.I. van der Berg. 2013. Model checking LLVM IR using LTSmin: using relaxed memory model semantics. Master’s thesis. University of Twente.Google Scholar
- Martin T. Vechev, Eran Yahav, David F. Bacon, and Noam Rinetzky. 2007. CGCExplorer: A Semi-Automated Search Procedure for Provably Correct Concurrent Collectors. In Proceedings of 28th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’07). ACM Press, 456–467. Google Scholar
Digital Library
- Yue Yang, Ganesh Gopalakrishnan, and Gary Lindstrom. 2005. UMM: an operational memory model specification framework with integrated model checking capability. Concurrency and Computation: Practice and Experience 17, 5-6 (2005), 465–487. Google Scholar
Cross Ref
Index Terms
Model checking copy phases of concurrent copying garbage collection with various memory models
Recommendations
Mark-copy: fast copying GC with less space overhead
OOPSLA '03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applicationsCopying garbage collectors have a number of advantages over non-copying collectors, including cheap allocation and avoiding fragmentation. However, in order to provide completeness (the guarantee to reclaim each garbage object eventually), standard ...
Age-based garbage collection
Modern generational garbage collectors look for garbage among the young objects, because they have high mortality; however, these objects include the very youngest objects, which clearly are still live. We introduce new garbage collection algorithms, ...
Mark-copy: fast copying GC with less space overhead
Special Issue: Proceedings of the OOPSLA '03 conferenceCopying garbage collectors have a number of advantages over non-copying collectors, including cheap allocation and avoiding fragmentation. However, in order to provide completeness (the guarantee to reclaim each garbage object eventually), standard ...






Comments