~/talk

Rust Atomics in the Wild: Memory Ordering Design Patterns [...]

links:none on file
slides:none on file

Covers concrete Rust patterns and failures: a futex implemented with an AtomicU32 uses acquire-release for lock/unlock and release+fence to guarantee safe drop; Arc clone/drop uses fetch_add/fetch_sub with relaxed for increments and a fence to synchronize destruction; bounded MPMC channel packs head/tail into one atomic and uses probe-validate-execute (relaxed probe, acquire validate, RMW reserve) with seq‑cons fences in Rayon to prove the “producer misses sleeper” outcome is impossible. Tests must target x86 and ARM due to differing hardware orderings.

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:53Rust atomics basics
  3. 6:07Happens-before relationships
  4. 8:53Acquire and release patterns
  5. 10:28Real-world examples
  6. 16:04Probe validate execute
  7. 19:06Sequential consistency
  8. 29:15Q&A on memory ordering
~/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.