~/talk

Atomic’s memory orders, what for?

Talkat ACCU 2017 · 2017-04-24..04-29· [c-and-cpp, concurrency]
links:none on file
slides:none on file

Explains concrete effects of C++11 std::atomic memory_order options using microtests: plain int gets optimized away, volatile increments fail, atomic increments work but are slower; relaxed gives atomicity only (counters OK) but no cross-variable visibility; release/acquire pairs make writes-before the store visible to a reader that does an acquire load (useful for publishing non-atomic data); consume is impractical and discouraged; sequentially consistent enforces a global order at runtime cost and prevents subtle store/load reorderings that can produce r1==r2==0 on weak ARM cores.

AI-written summary · about

  1. 0:00Introduction to Atomics
  2. 2:35Physics and Simultaneity
  3. 5:53Atomic vs. Volatile
  4. 11:48Memory Ordering Basics
  5. 16:02Execution Order and Bugs
  6. 19:39Sequence Before Relation
  7. 25:06Synchronizes With
  8. 30:24Relaxed Memory Ordering
  9. 35:32Release Acquire Semantics
  10. 40:29Memory Order Consume
  11. 50:08Atomic Chaining Example
  12. 53:53Sequential Consistency
  13. 1:17:26Reordering and Conclusions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.