skip to main content
10.1145/1926385.1926393acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Relaxed-memory concurrency and verified compilation

Published:26 January 2011Publication History

ABSTRACT

In this paper, we consider the semantic design and verified compilation of a C-like programming language for concurrent shared-memory computation above x86 multiprocessors. The design of such a language is made surprisingly subtle by several factors: the relaxed-memory behaviour of the hardware, the effects of compiler optimisation on concurrent code, the need to support high-performance concurrent algorithms, and the desire for a reasonably simple programming model. In turn, this complexity makes verified (or verifying) compilation both essential and challenging.

We define a concurrent relaxed-memory semantics for ClightTSO, an extension of CompCert's Clight in which the processor's memory model is exposed for high-performance code. We discuss a strategy for verifying compilation from ClightTSO to x86, which we validate with correctness proofs (building on CompCert) for the most interesting compiler phases.

Skip Supplemental Material Section

Supplemental Material

6-mpeg-4.mp4

mp4

478.6 MB

References

  1. S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 29(12):66--76, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. Alglave, L. Maranget, S. Sarkar, and P. Sewell. Fences in weak memory models. In Proc. CAV, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Becker, editor. Programming Languages -- C++. Final Committee Draft. 2010. ISO/IEC JTC1 SC22 WG21 N3092.Google ScholarGoogle Scholar
  4. N. Benton and C.K Hur. Biorthogonality, step-indexing and compiler correctness. In Proc. ICFP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Sandrine Blazy and Xavier Leroy. Mechanized semantics for the Clight subset of the C language. Journal of Automated Reasoning, 43(3):263--288, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  6. H.-J. Boehm. Threads cannot be implemented as a library. In Proc. PLDI, pages 261--268, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Batty, S. Owens, S. Sarkar, P. Sewell, and T.Weber. Mathematizing C++ concurrency. In Proc. POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Programming languages -- C (committee draft, WG14 N1494, ISO/IEC 9899:201x). http://www.open-std.org/jtc1/sc22/wg14/www/docs/PostColorado.htm.Google ScholarGoogle Scholar
  9. A. Chlipala. A verified compiler for an impure functional language. In Proc. POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Cenciarelli, A. Knapp, and E. Sibilio. The Java memory model: Operationally, denotationally, axiomatically. In Proc. ESOP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. The Compcert verified compiler, v. 1.5. http://compcert.inria.fr/release/compcert-1.5.tgz, August 2009.Google ScholarGoogle Scholar
  12. The Coq proof assistant. http://coq.inria.fr/.Google ScholarGoogle Scholar
  13. Keir Fraser. Practical Lock Freedom. PhD thesis, 2003. Also available as Tech. Report UCAM-CL-TR-639.Google ScholarGoogle Scholar
  14. G. Gonthier and A.Mahboubi. A small scale reflection extension for the coq system. Technical report, 2007.Google ScholarGoogle Scholar
  15. A. Hobor, A.W. Appel, and F. Zappa Nardelli. Oracle semantics for concurrent separation logic. In Proc. ESOP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput., C-28(9):690--691, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Lea. Concurrent Programming in Java. Second Edition: Design Principles and Patterns. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Xavier Leroy. Formal verification of a realistic compiler. Communications of the ACM, 52(7):107--115, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Xavier Leroy. A formally verified compiler back-end. Journal of Automated Reasoning, 43(4):363--446, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 1999. Linux Kernel mailing list, thread "spin unlock optimization(i386)", 119 messages, Nov. 20-Dec. 7th, http://www.gossamer-threads.com/lists/engine? post=105365;list=linux. Accessed 2009/11/18.Google ScholarGoogle Scholar
  21. A. Lochbihler. Verifying a compiler for Java threads. In Proc. ESOP'10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. Milner. Communication and Concurrency. Prentice Hall International, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Manson, W. Pugh, and S.V. Adve. The Java memory model. In Proc. POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. O. Myreen. Verified just-in-time compiler on x86. In Proc. POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Owens, S. Sarkar, and P. Sewell. A better x86 memory model: x86-TSO. In Proc. TPHOLs, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Owens. Reasoning about the implementation of concurrency abstractions on x86-TSO. In Proc. ECOOP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. W. Pugh. The Java memory model is fatally flawed. Concurrency - Practice and Experience, 12(6), 2000.Google ScholarGoogle Scholar
  28. J. Ševçík and D. Aspinall. On validity of program transformations in the Java memory model. In ECOOP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. Sewell. On implementations and semantics of a concurrent programming language. In Proc. CONCUR, July 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. The SPARC architecture manual, v. 9. http://dev elopers.sun.com/solaris/articles/sparcv9.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. The SPARC Architecture Manual, V. 8. SPARC International, Inc., 1992. Revision SAV080SI9308. http://www.sparc.org/standards/V8.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. P. Sewell, S. Sarkar, S. Owens, F. Zappa Nardelli, and M. O. Myreen. x86-TSO: A rigorous and usable programmer's model for x86 multiprocessors. C. ACM, 53(7):89--97, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Sarkar, P. Sewell, F. Zappa Nardelli, S. Owens, T. Ridge, T. Braibant, M. Myreen, and J. Alglave. The semantics of x86-CC multiprocessor machine code. In Proc. POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. P. Sewell, F. Zappa Nardelli, S. Owens, G. Peskine, T. Ridge, S. Sarkar, and R. StrniŠa. Ott: Effective tool support for the working semanticist. J. Funct. Program., 20(1):71--122, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. E. Torlak, M. Vaziri, and J. Dolby. MemSAT: checking axiomatic specifications of memory models. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Relaxed-memory concurrency and verified compilation

            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
            • Published in

              cover image ACM Conferences
              POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
              January 2011
              652 pages
              ISBN:9781450304900
              DOI:10.1145/1926385
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 46, Issue 1
                POPL '11
                January 2011
                624 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1925844
                Issue’s Table of Contents

              Copyright © 2011 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 26 January 2011

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate824of4,130submissions,20%

              Upcoming Conference

              POPL '25

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader