ACM SIGPLAN Notices · 2011 · 38 citations · 17 references
ComputingComputer EngineeringComputer ScienceCompilersComputer ArchitectureProgramming LanguagesConcurrent ProgrammingMemory ConsistencyRace Condition VulnerabilitiesShared-memory ParallelismCompiler DesignConsistencyData-race FreedomImperative TransformationLanguage SemanticsRace Conditions In Memory AccessSequential ConsistencyTrace Semantics
Current proposals for concurrent shared-memory languages, including C++ and C, provide sequential consistency only for programs without data races (the DRF guarantee). While the implications of such a contract for hardware optimisations are relatively well-understood, the correctness of compiler optimisations under the DRF guarantee is less clear, and experience with Java shows that this area is error-prone. In this paper we give a rigorous study of optimisations that involve both reordering and elimination of memory reads and writes, covering many practically important optimisations. We first define powerful classes of transformations semantically, in a language-independent trace semantics. We prove that any composition of these transformations is sound with respect to the DRF guarantee, and moreover that they provide basic security guarantees (no thin-air reads) even for programs with data races. To give a concrete example, we apply our semantic results to a simple imperative language and prove that several syntactic transformations are safe for that language. We also discuss some surprising limitations of the DRF guarantee.
17
Shared memory consistency models: a tutorial
Sarita V. Adve, Kourosh Gharachorloo · Computer · 1996 · 1.1K citations
Jeremy Manson, William Pugh, Sarita V. Adve · 2005 · 732 citations · Full text
Foundations of the C++ concurrency memory model
Hans‐J. Boehm, Sarita V. Adve · 2008 · 498 citations
Weak ordering—a new definition
Sarita V. Adve · 1998 · 449 citations