Learn / Out
Concurrency
Read first
Every cost below is a cache line moving between cores, so the ordering models and the measured line-transfer cost in the memory hierarchy section come first.
- Sources
- 20 entries in 4 parts
- Reproduce it
- 09-false-sharing
- Related sections
- §4 Memory hierarchy, §13 Inference on CPU
- In the MCP server
cpuperf://section/9
Memory models and atomics
-
01
Defines the data-race-free contract, sequential consistency for race-free programs and no meaning for a race.
-
02
The normative wording for every memory order, fence and read-modify-write, the text a compiler is checked against.
-
03
The table that turns each memory order into x86 and Arm instructions, so what an order costs is read off the page.
-
04
States what the kernel assumes any CPU may reorder and what each barrier and access primitive guarantees.
-
05 herdtools7 repository
Where herd7, litmus7 and klitmus7 live, the tools that run a litmus test against the x86, Arm and kernel models.
Locks, contention and allocators
-
01
Derives counting, partitioning, locking and deferral with code that runs, the textbook the section assumes.
-
02
The origin of the queue lock, each waiter spinning on its own line, measured against ticket and test-and-set locks.
-
03 Futexes Are Tricky paper
Derives a correct user-space mutex from futex and shows the lost wakeups and extra kernel entries naive versions pay.
-
04
Defines blowup and allocator-induced false sharing, which per-processor heaps under a bounded global heap avoid.
-
05
The design statement for per-CPU caches built on restartable sequences and a hugepage-aware back end for TLB reach.
Reproduce it
adjacent counters against padded counters across threads.
Reproduce it · 09-false-sharing False sharing Writers sharing a cache line serialise; padding restores scalingLock-free structures and RCU
-
01
States linearizability and the consensus hierarchy and builds both into working stacks, queues, lists and hash tables.
-
02
The lock-free queue later libraries copy, with the counted pointer against ABA and a two-lock queue beside it.
-
03
The standard-track form of safe reclamation, fixing when a retired node may be freed while a reader still holds it.
-
04 What is RCU? manual
The kernel's own statement of RCU as publish, wait for readers and keep old versions, with a free read side.
-
05
Defines liburcu's quiescent-state, signal-based and general RCU flavours and measures each read side against locks.
Thread pools and work stealing
-
01
Defines work and critical path, proves the work-stealing bound, and shows they alone predict a runtime's speedup.
-
02
States the work-first principle, that overhead belongs on the rare steal path and not on every spawn.
-
03
Gives the work-stealing deque a proven atomics form and derives which fence push, take and steal need on Arm and x86.
-
04 OpenMP Specifications manual
Fixes fork-join and tasking semantics, and the wait and binding controls deciding if idle workers spin, sleep or move.
-
05 oneTBB repository
The shipping work-stealing runtime, arenas and task groups over a deque, the home of grain size and spin-before-sleep.