10.1145/1480881.1480930acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Relaxed memory models: an operational approach

Published:21 January 2009Publication History

ABSTRACT

Memory models define an interface between programs written in some language and their implementation, determining which behaviour the memory (and thus a program) is allowed to have in a given model. A minimal guarantee memory models should provide to the programmer is that well-synchronized, that is, data-race free code has a standard semantics. Traditionally, memory models are defined axiomatically, setting constraints on the order in which memory operations are allowed to occur, and the programming language semantics is implicit as determining some of these constraints. In this work we propose a new approach to formalizing a memory model in which the model itself is part of a weak operational semantics for a (possibly concurrent) programming language. We formalize in this way a model that allows write operations to the store to be buffered. This enables us to derive the ordering constraints from the weak semantics of programs, and to prove, at the programming language level, that the weak semantics implements the usual interleaving semantics for data-race free programs, hence in particular that it implements the usual semantics for sequential code.

References

  1. M. Abadi, A. Birrell, T. Harris, M. Isard, Semantics of transactional memory and automatic mutual exclusion POPL'08 (2008) 63--74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. V. Adve, Designing Memory Consistency Models for Shared-Memory Multiprocessors PhD Thesis, Univ. of Wisconsin (1993). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. A. Adve, K. Gharachorloo, Shared memory consistency models: a tutorial IEEE Computer Vol. 29 No. 12 (1996)66--76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Adve, M. D. Hill, Weak ordering -- A new definition ISCA'90 1990 2--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Aspinall, J. Ševčík, Formalising Java's data race free guarantee TPHOLs'07, Lecture Notes in Comput. Sci. 4732 (2007) 22--37. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Aspinall, J. Ševčík, Java memory model examples: good, bad and ugly VAMP'07 (2007).Google ScholarGoogle Scholar
  7. G. Berry, J.-J. Lévy, Minimal and optimal computations of recursive programs J. of ACM 26 (1979) 148--175 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. H.-J. Boehm, S. V. Adve, Foundations of the C concurrency model PLDI'08 (2008) 68--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Blundell, E. C. Lewis, M. M. K. Martin, Subtleties of transactional memory atomicity semantics IEEE Comput. Architecture Letters Vol. 5 No. 2 (2006). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. Boudol, Atomic actions INRIA Res. Rep. 1026 and EATCS Bull. 38 (1989) 136--144Google ScholarGoogle Scholar
  11. G. Boudol, I. Castellani, A non-interleaving semantics for CCS based on proved transitions Fundamenta Informaticae XI (1988) 433--452Google ScholarGoogle Scholar
  12. G. Boudol, I. Castellani, Flow models of distributed computations: three equivalent semantics for CCS Information and Computation Vol. 114 No. 2 (1994) 247--314. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. Cenciarelli, A. Knapp, B. Reus, M. Wirsing, An event-based structural operational semantics of multi-threaded Javain Formal Syntax and Semantics of JAVA, Lecture Notes in Comput. Sci. 1523 (1999) 157--200 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Cenciarelli, A. Knapp, E. Sibilio, The Java memory model: operationally, denotationally, axiomatically ESOP'07, Lecture Notes in Comput. Sci. 4421 (2007) 331--346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Dubois, Ch. Scheurich, F. Briggs, Memory access buffering in multiprocessors ISCA'86 (1986) 434--442. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. Effinger-Dean, M. Kehrt, D. Grossman, Transactional events for MLICFP'08 (2008) 103--114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G. R. Gao, V. Sarkar, Location consistency -- a new memory model and cache consistency protocol IEEE Trans. on Computers Vol. 49 No. 8 (2000) 798--813. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. G. R. Gao, V. Sarkar, On the importance of an end-to-end view of memory consistency in future computer systems ISHPC'97, Lecture Notes in Comput. Sci. 1336 (1997) 30--41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. K. Gharachorloo, D. Lenoski, J. Laudon, P. Gibbons, A. Gupta, J. Hennessy, Memory consistency and event ordering in scalable shared-memory multiprocessors ACM SIGARCH Computer Architecture News Vol. 18 No. 3a (1990) 15--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. B. Gibbons, M. Merritt, K. Gharachorloo, Proving sequential consistency of high-performance shared memories ACM Symp. on Parallel Algorithms and Architectures (1991) 292--303. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. R. Goodman, Cache consistency and sequential consistency Techn. Rep. TR-1006, University of Wisconsin (1991).Google ScholarGoogle Scholar
  22. D. Grossman, J. Manson, W. Pugh, What do high-level memory models mean for transactions? MSPC'06 (2006) 62--69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Hobor, A. W. Appel, F. Zappa Nardelli, Oracle semantics for concurrent separation logic ESOP'08, Lecture Notes in Comput. Sci. 4960 (2008) 353--360. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Intel Corp. Intel 64 architecture memory ordering white paper (2007).Google ScholarGoogle Scholar
  25. M. Huisman, G. Petri, The Java memory model: a formal explanation VAMP'07 (2007).Google ScholarGoogle Scholar
  26. L. Lamport, Time, clocks, and the ordering of events in a distributed system CACM Vol. 21 No. 7 (1978) 558--565. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. L. Lamport, How to make a multiprocessor computer that correctly executes multiprocess programs IEEE Trans. on Computers Vol. 28 No. 9 (1979) 690--691. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J.-J. Lévy, Optimal reductions in the lambda calculusin To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism (J. P. Seldin, J. R. Hindley, Eds), Academic Press (1980) 159--191.Google ScholarGoogle Scholar
  29. J. Manson, W. Pugh, S. A. Adve, The Java memory model POPL'05 (2005) 378--391 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. K. F. Moore, D. Grossman, High-level small-step operational semantics for transactions POPL'08 (2008) 51--62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. C. Reynolds, Toward a grainless semantics for shared-variable concurrency FST-TCS'04, Lecture Notes in Comput. Sci. 3328 (2004) 35--48 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. V. Saraswat, R. Jagadeesan, M. Michael, C. von Praun, A theory of memory models PPOPP'07 (2007) 161--172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. X. Shen, Arvind, L. Rudolph, Commit-reconcile & fences (CRF): a new memory model for architects and compiler writers ISCA'99 (1999) 150--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. C. Steinke, G. J. Nutt, A unified theory of shared memory consistency JACM Vol. 51 No. 5 (2004) 800--849. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Relaxed memory models: an operational approach

      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 '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
        January 2009
        464 pages
        ISBN:9781605583792
        DOI:10.1145/1480881
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 1
          POPL '09
          January 2009
          453 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1594834
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 21 January 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate 770 of 3,892 submissions, 20%

      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!