Overhauling SC Atomics in C11 and OpenCL
Mark Batty, Alastair F. Donaldson, and John Wickerson

TL;DR
This paper simplifies the formal semantics of sequentially consistent atomics in C11 and OpenCL, enabling more efficient simulation and a clearer understanding of their memory models.
Contribution
It reduces the complexity of SC atomics axioms in C11, extends the model to OpenCL, and improves simulation efficiency for litmus tests.
Findings
Simplified axioms reduce complexity and total order requirements.
Enables exhaustive simulation of litmus tests for the first time.
Simulation time improved exponentially, making exhaustive testing feasible.
Abstract
Despite the conceptual simplicity of sequential consistency (SC), the semantics of SC atomic operations and fences in the C11 and OpenCL memory models is subtle, leading to convoluted prose descriptions that translate to complex axiomatic formalisations. We conduct an overhaul of SC atomics in C11, reducing the associated axioms in both number and complexity. A consequence of our simplification is that the SC operations in an execution no longer need to be totally ordered. This relaxation enables, for the first time, efficient and exhaustive simulation of litmus tests that use SC atomics. We extend our improved C11 model to obtain the first rigorous memory model formalisation for OpenCL (which extends C11 with support for heterogeneous many-core programming). In the OpenCL setting, we refine the SC axioms still further to give a sensible semantics to SC operations that employ a 'memory…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
