skip to main content
research-article
Artifacts Evaluated & Functional

Bounding data races in space and time

Published:11 June 2018Publication History
Skip Abstract Section

Abstract

We propose a new semantics for shared-memory parallel programs that gives strong guarantees even in the presence of data races. Our local data race freedom property guarantees that all data-race-free portions of programs exhibit sequential semantics. We provide a straightforward operational semantics and an equivalent axiomatic model, and evaluate an implementation for the OCaml programming language. Our evaluation demonstrates that it is possible to balance a comprehensible memory model with a reasonable (no overhead on x86, ~0.6% on ARM) sequential performance trade-off in a mainstream programming language.

Skip Supplemental Material Section

Supplemental Material

p242-dolan.webm

References

  1. 2014. The Go Memory Model. (2014). https://golang.org/ref/memGoogle ScholarGoogle Scholar
  2. 2016. ECMAScript Sharedmem: Formal memory model proposal tracking. (2016). https://github.com/tc39/ecmascript_sharedmem/issues/ 133Google ScholarGoogle Scholar
  3. 2017. Concurrency in Swift. (2017). https://github.com/apple/swift/ blob/master/docs/proposals/Concurrency.rstGoogle ScholarGoogle Scholar
  4. 2017. WebAssembly Threads. (2017). https://github.com/ WebAssembly/design/issues/1073Google ScholarGoogle Scholar
  5. 2018. Rust Atomics. (2018). https://doc.rust-lang.org/beta/nomicon/ atomics.htmlGoogle ScholarGoogle Scholar
  6. Jade Alglave, Luc Maranget, Susmit Sarkar, and Peter Sewell. 2010. Fences in Weak Memory Models. In Proceedings of the 22nd International Conference on Computer Aided Verification (CAV’10). SpringerVerlag, 258–272. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Mark Batty, Kayvan Memarian, Kyndylan Nienhuis, Jean PichonPharabod, and Peter Sewell. 2015. The Problem of Programming Language Concurrency Semantics. Springer Berlin Heidelberg, 283–307.Google ScholarGoogle Scholar
  8. Mark Batty and Peter Sewell. 2014. The Thin-air Problem. (2014). https://www.cl.cam.ac.uk/~pes20/cpp/notes42.htmlGoogle ScholarGoogle Scholar
  9. Hans-J. Boehm. 2011. How to Miscompile Programs with “Benign” Data Races. In Proceedings of the 3rd USENIX Conference on Hot Topics in Parallelism (HotPar’11). USENIX Association. http://dl.acm.org/ citation.cfm?id=2001252.2001255 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Hans-J. Boehm and Brian Demsky. 2014. Outlawing Ghosts: Avoiding Out-of-thin-air Results. In Proceedings of the Workshop on Memory Systems Performance and Correctness (MSPC ’14). ACM, Article 7, 6 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Stephen Dolan, KC Sivaramakrishnan, and Anil Madhavapeddy. 2018. Bounding Data Races in Space and Time (extended version). Technical Report. University of Cambridge, Computer Laboratory.Google ScholarGoogle Scholar
  12. Stephen Dolan, Leo White, and Anil Madhavapeddy. 2014. Multicore OCaml. OCaml Workshop. (2014).Google ScholarGoogle Scholar
  13. Jeehoon Kang, Chung-Kil Hur, Ori Lahav, Viktor Vafeiadis, and Derek Dreyer. 2017. A Promising Semantics for Relaxed-memory Concurrency. In Proc. POPL ’17. ACM, 175–189. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ori Lahav, Nick Giannarakis, and Viktor Vafeiadis. 2016. Taming Release-acquire Consistency. SIGPLAN Not. 51, 1 (Jan. 2016), 649–662. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Chris Lattner. 2012. Random LLVM Notes. (2012). http://www.nondot. org/sabre/LLVMNotes/MemoryUseMarkers.txtGoogle ScholarGoogle Scholar
  16. Jeremy Manson, William Pugh, and Sarita V. Adve. 2005. The Java Memory Model. In Proc. POPL ’05. ACM, 378–391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Daniel Marino, Abhayendra Singh, Todd Millstein, Madanlal Musuvathi, and Satish Narayanasamy. 2010. DRFX: A Simple and Efficient Memory Model for Concurrent Programming Languages. In Proc. PLDI ’10. ACM, 351–362. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Daniel Marino, Abhayendra Singh, Todd Millstein, Madanlal Musuvathi, and Satish Narayanasamy. 2011. A Case for an SC-preserving Compiler. SIGPLAN Not. 46, 6 (June 2011), 199–210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. William Pugh. 1999. Fixing the Java Memory Model. In Proceedings of the ACM 1999 Conference on Java Grande (JAVA ’99). ACM, 89–98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Chirstopher Pulte, Shaked Flur, Will Deacon, Jon French, Susmit Sarkar, and Peter Sewell. 2018. Simplifying ARM Concurrency: Multicopyatomic Axiomatic and Operational Models for ARMv8. In Proc. POPL ’18.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Susmit Sarkar, Peter Sewell, Jade Alglave, Luc Maranget, and Derek Williams. 2011. Understanding POWER Multiprocessors. In Proc. PLDI ’11. ACM, 175–186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Peter Sewell, Susmit Sarkar, Scott Owens, Francesco Zappa Nardelli, and Magnus O. Myreen. 2010. X86-TSO: A Rigorous and Usable Programmer’s Model for x86 Multiprocessors. Commun. ACM 53, 7 (July 2010), 89–97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Viktor Vafeiadis, Thibaut Balabonski, Soham Chakraborty, Robin Morisset, and Francesco Zappa Nardelli. 2015. Common Compiler Optimisations Are Invalid in the C11 Memory Model and What We Can Do About It. In Proc. POPL ’15. ACM, 209–220. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. John Wickerson, Mark Batty, Tyler Sorensen, and George A. Constantinides. 2017. Automatically comparing memory consistency models. In Proc. POPL ’17. 190–204. http://dl.acm.org/citation.cfm?id=3009838 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bounding data races in space and time

      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 53, Issue 4
        PLDI '18
        April 2018
        834 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3296979
        Issue’s Table of Contents
        • cover image ACM Conferences
          PLDI 2018: Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation
          June 2018
          825 pages
          ISBN:9781450356985
          DOI:10.1145/3192366

        Copyright © 2018 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 11 June 2018

        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!