~/talk

Memory Model: Get your shared data under control

Talkat NDC TechTown 2024 · 2024-09-09..09-12· [concurrency]
links:none on file
slides:none on file

Covers C++20 memory model with concrete examples that build a hikers-and-lighthouse story to show when each primitive is appropriate: latch for one‑time joins, barrier for reusable rendezvous, semaphores for limited capacity, mutex/lock_guard/unique_lock/shared_mutex patterns, condition_variable semantics, and a deep dive into atomics (fetch_/exchange/compare_exchange_strong/weak, wait/notify, atomic_ref, atomic_shared_ptr). Warns that atomics avoid deadlocks but require loops for weak CAS, overloaded += is a race trap, and synchronization disables compiler/CPU reorderings so use the simplest tool that works.

AI-written summary · about

  1. 0:00Memory model basics
  2. 1:48Shared data reordering
  3. 7:32Synchronization primitives and their necessity
  4. 12:11Safe memory access
  5. 13:18Latches for sync
  6. 14:41Mutexes explained
  7. 19:41Barriers for sync
  8. 24:00Semaphores for access
  9. 27:55Condition variables
  10. 31:53Atomics vs sync
  11. 37:17Atomic pitfalls
  12. 43:08Compare-exchange strong vs weak
  13. 45:21Atomic references
  14. 48:55Summary of atomics
~/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.