~/talk

C++ Memory Model: from C++11 to C++23

Talkat CppNorth 2024 · 2024-07-21..07-24· [concurrency]
links:none on file
slides:none on file

Shows exactly what the standard actually gives and what breaks: compilers hoist, fold and vectorize code; CPUs do out‑of‑order execution and caching; a demo where a relaxed atomic version lets corrupt updates pass but switching to acquire/release (or a full fence) fixes it. Highlights that volatile is not synchronization, 32‑bit/ARM/RISC-V volatile loads split and aren’t atomic, and most compilers treat consume as acquire. Walks through spinlock, compare_exchange strong vs weak, atomic_shared_ptr (C++20), JThread/stop_token, semaphores, latches and barriers, with assembly proofs of what actually runs.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 3:19Compiler optimizations explained
  3. 17:56CPU execution models overview
  4. 26:47C++ memory reordering rules
  5. 31:02Sequential consistency and data races
  6. 34:56Volatile is not synchronization
  7. 39:30Memory ordering semantics deep dive
  8. 48:50Consume semantics and dependencies
  9. 51:06C++ threading tools overview
  10. 1:01:28Atomic operations and memory fences
  11. 1:10:51C++20 concurrency features
  12. 1:23:17C++11 statics and once flags
  13. 1:25:07Q&A session
~/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.