skip to main content
research-article

Partial-coherence abstractions for relaxed memory models

Published:04 June 2011Publication History
Skip Abstract Section

Abstract

We present an approach for automatic verification and fence inference in concurrent programs running under relaxed memory models. Verification under relaxed memory models is a hard problem. Given a finite state program and a safety specification, verifying that the program satisfies the specification under a sufficiently relaxed memory model is undecidable. For stronger models, the problem is decidable but has non-primitive recursive complexity.

In this paper, we focus on models that have store-buffer based semantics, e.g., SPARC TSO and PSO. We use abstract interpretation to provide an effective verification procedure for programs running under this type of models. Our main contribution is a family of novel partial-coherence abstractions, specialized for relaxed memory models, which partially preserve information required for memory coherence and consistency. We use our abstractions to automatically verify programs under relaxed memory models. In addition, when a program violates its specification but can be fixed by adding fences, our approach can automatically infer a correct fence placement that is optimal under the abstraction. We implemented our approach in a tool called BLENDER and applied it to verify and infer fences in several concurrent algorithms.

References

  1. Adve, S. V., and Gharachorloo, K. Shared memory consistency models: A tutorial. IEEE Computer 29 (1995), 66--76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Atig, M. F., Bouajjani, A., Burckhardt, S., and Musuvathi, M. On the verification problem for weak memory models. In POPL (2010), pp. 7--18. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Boehm, H.-J. Threads cannot be implemented as a library. SIGPLAN Not. 40, 6 (2005), 261--268. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Boigelot, B., Godefroid, P., Willems, B., and Wolper, P. The power of QDDs. In SAS (1997), Springer, pp. 172--186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Burckhardt, S., Alur, R., and Martin, M. M. K. CheckFence: checking consistency of concurrent data types on relaxed memory models. In PLDI (2007), pp. 12--21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Burckhardt, S., and Musuvathi, M. Effective program verification for relaxed memory models. In CAV (2008), pp. 107--120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Burnim, J., Sen, K., and Stergiou, C. Sound and complete monitoring of sequential consistency in relaxed memory models. Tech. Rep. UCB/EECS-2010-31.Google ScholarGoogle Scholar
  8. Burnim, J., Sen, K., and Stergiou, C. Testing concurrent programs on relaxed memory models. Tech. Rep. UCB/EECS-2010-32.Google ScholarGoogle Scholar
  9. Cousot, P., and Cousot, R. Abstract interpretation: A unified lattice model for static analysis of programs by construction of approximation of fixed points. In POPL (1977), pp. 238--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cousot, P., and Cousot, R. Systematic design of program analysis frameworks. In POPL (1979), pp. 269--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dijkstra, E. Cooperating sequential processes, TR EWD-123. Tech. rep., Technological University, Eindhoven, 1965. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Fang, X., Lee, J., and Midkiff, S. P. Automatic fence insertion for shared memory multiprocessing. In ICS (2003), pp. 285--294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Gall, T. L., Jeannet, B., and Jéron, T. Verification of communication protocols using abstract interpretation of FIFO queues. In AMAST (2006), pp. 204--219. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Hensgen, D., Finkel, R., and Manber, U. Two algorithms for barrier synchronization. Int. J. Parallel Program. 17, 1 (1988), 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Huynh, T. Q., and Roychoudhury, A. Memory model sensitive bytecode verification. Form. Methods Syst. Des. 31, 3 (2007). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. IBM. Power ISA v.2.05. 2007.Google ScholarGoogle Scholar
  17. Jonsson, B. State-space exploration for concurrent algorithms under weak memory orderings: (preliminary version). SIGARCH Comput. Archit. News 36, 5 (2008), 65--71. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Kuperstein, M., Vechev, M., and Yahav, E. Automatic inference of memory fences. In FMCAD (2010), pp. 111--119. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Lamport, L. A new solution of Dijkstra's concurrent programming problem. Commun. ACM 17, 8 (1974), 453--455. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Lamport, L. How to make a multiprocessor computer that correctly executes multiprocess program. IEEE Trans. Comput. 28, 9 (1979), 690--691. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Lamport, L. A fast mutual exclusion algorithm. ACM Trans. Comput. Syst. 5, 1 (1987), 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Lee, J., and Padua, D. A. Hiding relaxed memory consistency with a compiler. IEEE Trans. Comput. 50, 8 (2001), 824--833. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Linden, A., and Wolper, P. An automata-based symbolic approach for verifying programs on relaxed memory models. In SPIN (2010), pp. 212--226. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Mador-Haim, S., Alur, R., and Martin, M. M. K. Generating litmus tests for contrasting memory consistency models. In CAV (2010), pp. 273--287. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Mador-Haim, S., Alur, R., and Milo, M. Plug and Play Components for the Exploration of Memory Consistency Models. Tech. Rep. MS-CIS-10-02, University of Pennsylvania, 2010.Google ScholarGoogle Scholar
  26. Magnusson, P. S., Landin, A., and Hagersten, E. Queue locks on cache coherent multiprocessors. In Proceedings of the Int. Symp. on Parallel Processing (1994), IEEE, pp. 165--171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Narayanasamy, S., Wang, Z., Tigani, J., Edwards, A., and Calder, B. Automatically classifying benign and harmful data races using replay analysis. In PLDI (2007), pp. 22--31. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Owens, S. Reasoning about the implementation of concurrency abstractions on x86-TSO. In ECOOP (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Owens, S., Sarkar, S., and Sewell, P. A better x86 memory model: x86-TSO. In TPHOLs (2009), pp. 391--407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Park, S., and Dill, D. L. An executable specification and verifier for relaxed memory order. IEEE Trans. on Computers 48 (1999). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Peterson, G. L. Myths about the mutual exclusion problem. Inf. Process. Lett. 12, 3 (1981), 115--116.Google ScholarGoogle ScholarCross RefCross Ref
  32. Saraswat, V. A., Jagadeesan, R., Michael, M., and von Praun, C. A theory of memory models. In PPoPP (2007), ACM, pp. 161--172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Sarkar, S., Sewell, P., Nardelli, F. Z., Owens, S., Ridge, T., Braibant, T., Myreen, M. O., and Alglave, J. The semantics of x86-cc multiprocessor machine code. In POPL (2009), pp. 379--391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Shasha, D., and Snir, M. Efficient and correct execution of parallel programs that share memory. ACM Trans. Program. Lang. Syst. 10, 2 (1988), 282--312. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Shen, X., Arvind, and Rudolph, L. Commit-reconcile & fences (CRF): a new memory model for architects and compiler writers. SIGARCH Comput. Archit. News 27, 2 (1999), 150--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. SPARC International, Inc. The SPARC architecture manual (version 9). Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Vechev, M., and Yahav, E. Deriving linearizable fine-grained concurrent objects. In PLDI (2008), pp. 125--135. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Vechev, M., Yahav, E., and Yorsh, G. Abstraction-guided synthesis of synchronization. In POPL (2010), pp. 327--338. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Vechev, M. T., Yahav, E., Bacon, D. F., and Rinetzky, N. CGCExplorer: a semi-automated search procedure for provably correct concurrent collectors. In PLDI (2007), pp. 456--467. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Vechev, M. T., Yahav, E., and Yorsh, G. Inferring synchronization under limited observability. In TACAS (2009), pp. 139--154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Yang, Y., Gopalakrishnan, G., and Lindstrom, G. UMM: an operational memory model specification framework with integrated model checking capability. Concurr. Comput.: Pract. Exper. 17, 5--6 (2005), 465--487. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Partial-coherence abstractions for relaxed 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

                • Published in

                  cover image ACM SIGPLAN Notices
                  ACM SIGPLAN Notices  Volume 46, Issue 6
                  PLDI '11
                  June 2011
                  652 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/1993316
                  Issue’s Table of Contents
                  • cover image ACM Conferences
                    PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
                    June 2011
                    668 pages
                    ISBN:9781450306638
                    DOI:10.1145/1993498
                    • General Chair:
                    • Mary Hall,
                    • Program Chair:
                    • David Padua

                  Copyright © 2011 ACM

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 4 June 2011

                  Check for updates

                  Qualifiers

                  • research-article

                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!