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.
REF have recently proposed a memory model that provides a property called local data race freedom, which guarantees that all data-race-free portions of a program still have sequential consistency semantics.
Bounding data races in space and time
PLDI 2018
Computer Science