Order! Order!
summary
Explains how CPU pipelines, reservation stations, cache coherence and store buffer reordering create counterintuitive outcomes for atomics, including a concrete CAS interleaving that produces a value no thread ever wrote. Gives numbers: modern DDR5 CL ~40 ns (~120 cycles at 3 GHz) and claims simple atomic ring buffer runs roughly 2× faster than a lock on x86 in the demo hardware. Maps those behaviors to C++ memory model primitives and shows real patterns like a CAS loop for a lock free linked list and when release/acquire guarantees are actually needed.
AI-written summary · about
