“C++11/14/17 atomics and memory model..."
summary
C++11 introduces three memory models (six orderings) and most compilers implement relaxed, seq_cst, acquire, release and acq_rel but not consume ordering, so relying on consume is unsafe; seq_cst is the default and often the slowest, while acquire/release lets you get much higher performance on weakly ordered CPUs. compare_exchange_weak can fail spuriously so loops are required, atomic_flag is the guaranteed lock‑free primitive, C++14 tightens fences and lock‑free rules, and C++17 formalizes ordering strength.
AI-written summary · about
chapters (23)
- 0:00Introduction and speaker background
- 1:45Why C++ memory model matters
- 6:43Atomic operations basics
- 10:13C++11/14/17 atomics evolution
- 12:18Sequential consistency explained
- 17:34Memory model and CPU reordering
- 18:40Cache coherency fundamentals
- 23:37Memory model in C++11
- 24:39Atomicity visibility and ordering
- 26:25Atomic operations and memory ordering
- 27:28Data races and undefined behavior
- 28:30Volatile vs atomics
- 30:20Atomic types and operations
- 34:38Atomic flag and lock-free basics
- 36:45Atomic compare exchange weak
- 38:55Memory ordering strength
- 41:23Atomic types and operations summary
- 44:14Memory ordering operations overview
- 45:40Sequence before and happens before
- 47:44Double-checked locking example
- 50:15Sequential consistency test case
- 53:45Relaxed ordering explained
- 57:46Relaxed ordering analogy
related talks
01h 03mUsing weakly ordered C++ atomics correctly
22mWhat we learned from C++ atomics and memory model standardization
01h 28mAtomic’s memory orders, what for?
01h 28mC++ Memory Model: from C++11 to C++23
01h 03mSafety: off --- How not to shoot yourself in the foot with C++ atomics
01h 14m“C++ atomics, from basic to advanced. What do they really do?”
01h 02mThe Two Memory Models
59mA Relaxed Guide to memory_order_relaxed
