~/talk

The Memory Model in C++

Talkat Meeting C++ 2016 · 2016-11-18..11-19· [rust]
slides:none on file

Covers the C++ memory model focusing on which atomic primitives and memory orders are useful: compare_exchange, test_and_set spinlocks, acquire/release for publishing pointers, and relaxed for counters, noting memory_order_consume is effectively unimplemented. Implements and benchmarks patterns (singleton, static-pointer variant) with tens of millions of iterations to show seq_cst is much slower under contention, acquire/release enables lock-free patterns to beat heavy locks, and explains why double-checked locking can fail.

AI-written summary · about

  1. 0:00Start
  2. 0:58Multithreading with C++
  3. 2:05Expert Levels
  4. 3:15The Contract
  5. 8:43Atomics: std::atomic_flag
  6. 11:30Atomics: std::atomic<bool>
  7. 12:57Atomics: Condition Variable
  8. 19:12Synchronization and Ordering
  9. 39:45Sequential Consistency
  10. 41:13Acquire-Release Semantic
  11. 41:43Meyers Singleton
  12. 46:22Singleton: The Performance Test
  13. 47:39The C++ Memory Model
~/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.