skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Model checking copy phases of concurrent copying garbage collection with various memory models

Published:12 October 2017Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. 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 ScholarGoogle ScholarCross RefCross Ref
  2. 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 ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarCross RefCross Ref
  4. 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 ScholarGoogle ScholarCross RefCross Ref
  5. 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 ScholarGoogle ScholarCross RefCross Ref
  6. Sarita V. Adve and Kourosh Gharachorloo. 1996. Shared memory consistency models: a tutorial. IEEE Computer 29, 12 (Dec. 1996), 66–76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Peter MÃijller Alexander J. Summers. 2017. Automating Deductive Verification for Weak-Memory Programs. (2017). arXiv:1703.06368.Google ScholarGoogle Scholar
  8. ARM 2016. ARM Architechture Reference Manual ARMv8, for ARMv8-A architechture profile. ARM.Google ScholarGoogle Scholar
  9. Azul. 2008. Pauseless Garbage Collection. White paper AWP–005–020. Azul Systems Inc. http://www.azulsystems.com/ products/whitepaper/wp_pgc.pdfGoogle ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarCross RefCross Ref
  21. IBM. 2015. Power ISA(TM) Version 3.0.Google ScholarGoogle Scholar
  22. Intel. 2016. Intel® 64 and IA-32 Architectures Software Developer’s Manual.Google ScholarGoogle Scholar
  23. ISO/IEC 14882:2011. 2011. Programming Language C++.Google ScholarGoogle Scholar
  24. ISO/IEC 9899:2011. 2011. Programming Language C.Google ScholarGoogle Scholar
  25. Richard Jones, Antony Hosking, and Eliot Moss. 2012. The Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman & Hall.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle Scholar
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle Scholar
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarCross RefCross Ref
  33. 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 ScholarGoogle Scholar
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarCross RefCross Ref
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarCross RefCross Ref
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarCross RefCross Ref
  44. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  45. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  46. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  47. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  48. SV-COMP. 2016. Competition on Software Verification. (2016). https://sv-comp.sosy-lab.org/ .Google ScholarGoogle Scholar
  49. 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 ScholarGoogle ScholarCross RefCross Ref
  50. 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 ScholarGoogle ScholarCross RefCross Ref
  51. 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 ScholarGoogle ScholarCross RefCross Ref
  52. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  53. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  54. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  55. F.I. van der Berg. 2013. Model checking LLVM IR using LTSmin: using relaxed memory model semantics. Master’s thesis. University of Twente.Google ScholarGoogle Scholar
  56. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  57. 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 ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Model checking copy phases of concurrent copying garbage collection with various memory models

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!