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.
Supplemental Material
- 2014. The Go Memory Model. (2014). https://golang.org/ref/memGoogle Scholar
- 2016. ECMAScript Sharedmem: Formal memory model proposal tracking. (2016). https://github.com/tc39/ecmascript_sharedmem/issues/ 133Google Scholar
- 2017. Concurrency in Swift. (2017). https://github.com/apple/swift/ blob/master/docs/proposals/Concurrency.rstGoogle Scholar
- 2017. WebAssembly Threads. (2017). https://github.com/ WebAssembly/design/issues/1073Google Scholar
- 2018. Rust Atomics. (2018). https://doc.rust-lang.org/beta/nomicon/ atomics.htmlGoogle Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- Mark Batty and Peter Sewell. 2014. The Thin-air Problem. (2014). https://www.cl.cam.ac.uk/~pes20/cpp/notes42.htmlGoogle Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- Stephen Dolan, Leo White, and Anil Madhavapeddy. 2014. Multicore OCaml. OCaml Workshop. (2014).Google Scholar
- 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 Scholar
Digital Library
- Ori Lahav, Nick Giannarakis, and Viktor Vafeiadis. 2016. Taming Release-acquire Consistency. SIGPLAN Not. 51, 1 (Jan. 2016), 649–662. Google Scholar
Digital Library
- Chris Lattner. 2012. Random LLVM Notes. (2012). http://www.nondot. org/sabre/LLVMNotes/MemoryUseMarkers.txtGoogle Scholar
- Jeremy Manson, William Pugh, and Sarita V. Adve. 2005. The Java Memory Model. In Proc. POPL ’05. ACM, 378–391. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- William Pugh. 1999. Fixing the Java Memory Model. In Proceedings of the ACM 1999 Conference on Java Grande (JAVA ’99). ACM, 89–98. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Susmit Sarkar, Peter Sewell, Jade Alglave, Luc Maranget, and Derek Williams. 2011. Understanding POWER Multiprocessors. In Proc. PLDI ’11. ACM, 175–186. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Bounding data races in space and time
Recommendations
Bounding data races in space and time
PLDI 2018: Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe 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 ...
A promising semantics for relaxed-memory concurrency
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesDespite many years of research, it has proven very difficult to develop a memory model for concurrent programming languages that adequately balances the conflicting desiderata of programmers, compilers, and hardware. In this paper, we propose the first ...
Two Formal Semantics of a Subset of the AADL
ICECCS '11: Proceedings of the 2011 16th IEEE International Conference on Engineering of Complex Computer SystemsThe analysis and verification of an AADL model usually requires its transformation into the meta-model of this model-checker or that schedulability analysis tool. However, one challenging problem is to prove that the transformation into the target model ...







Comments