Processor Design and C++ Memory Models
summary
Shows how real CPUs produce the counterintuitive behaviors behind C++ atomics by walking cache coherence, store buffers and invalidation queues, in-processor load/store queues and speculative execution, and by tracing a toy message‑passing and a load‑buffering example that actually reorders visibility on ARM but not x86. Explains fence meanings, contrasts x86’s locked/serializing RMWs with ARM load-exclusive/store-exclusive loops, and ties those to C++’s axiomatic C++ model and herd‑style tools and to ongoing research that fixes the classic thin‑air/load‑buffering hole.
AI-written summary · about
chapters (12)
- 0:00Introduction and overview
- 1:52Memory visibility between cores
- 8:00Cache coherence challenges
- 13:57Out-of-order execution effects
- 20:35CPU pipeline and memory ops
- 27:15Speculative execution risks
- 31:39Memory ordering solutions
- 37:52C++ atomics and fences
- 41:51Atomic operations in hardware
- 47:34C++ memory model overview
- 55:21Formalizing memory models
- 58:44Summary and takeaways
