~/talk

Safety: off --- How not to shoot yourself in the foot with C++ atomics

Talkat NDC Oslo 2016 · 2016-06-08..06-10· [concurrency, c-and-cpp]
slides:none on file

Explains concrete C++ atomics behavior: which std::atomic operations exist, compare_exchange_weak vs strong, memory orders (seq_cst, acquire/release, relaxed) and when they synchronize, and that atomic_flag is the only guaranteed lock‑free type. Builds and analyzes lock‑free queues and stacks: a single‑producer single‑consumer ring works, naive multi‑producer ring fails (data race), a linked‑list push/pop fix yields obstruction‑free behavior, ABA appears on pop and is fixed with a tag or hazard pointers. Recommends profile before/after and test on ARM/Power.

AI-written summary · about

  1. 0:00Start
  2. 2:28Atomic types
  3. 5:32Atomic Operations
  4. 54:13A simple MPSC stack popping
~/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.