Overview
Explore the insights gained from C++ atomics and memory model standardization in this 22-minute ACM SIGPLAN conference talk. Delve into the evolution of thread support in C++11 and subsequent revisions, examining the unexpected prevalence of atomic operations in real-world code. Analyze the diminishing returns of weakly ordered atomics on modern CPUs and the challenges of implementability across various architectures. Investigate the out-of-thin-air problem, the complexities of memory model specifications, and the importance of standardizing atomic mappings as part of platform ABIs. Gain valuable perspectives on the practical implications and theoretical issues surrounding C++ memory models, including recent developments in RISC-V.
Syllabus
Introduction
My background
The basic C model
Restricting sequential consistency
The guarantee
Sequential consistency
C rule
Sequential execution
Synchronization Primitives
Does this make sense
Arm benchmarks
C memory model
Minor issues
Confusion
Conventions
Im running out of time
More serious theoretical issues
One mistake we made
Oops
Questions
Taught by
ACM SIGPLAN