Concurrency
Memory ordering, lock-free structures, memory reclamation and scheduling.
Memory model
What atomics really guarantee.
Memory ordering
lowWhat Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.
False sharing
lowIndependent variables written by different cores on one cache line force the line to bounce between cores; pad or regroup hot data to fix it.
Locks
Blocking synchronization done right.
Futex-based mutex
lowA mutex that is one atomic word in user space and enters the kernel (futex wait/wake) only under contention; how std and glibc locks work.
Seqlock
lowReaders copy shared data optimistically and retry if a sequence counter changed; zero reader writes, so reads scale perfectly with a single fast writer.
spinlocks ticket mcs
Planned.
counting semaphore
Planned.
priority inheritance
Planned.
Lock-free structures
Progress without locks.
MPMC bounded queue
lowVyukov's array queue for many producers and consumers: each slot carries a sequence number, so one CAS per operation claims a slot without locks.
Sharded counters
lowSplit one hot counter into per-core or per-thread cells on separate cache lines; increments stay local and reads sum the cells.
Memory reclamation
Freeing memory other threads may still read.
Epoch-based reclamation
lowThreads announce a global epoch while touching shared lock-free data; garbage retired in epoch e is freed once the epoch reaches e + 2.
Hazard pointers
lowReaders publish the exact pointers they are about to dereference; a reclaimer frees retired objects that no published hazard names, giving bounded garbage.
RCU (read-copy-update)
lowReaders access shared data with no locks or atomic writes; writers publish a new copy and free the old one after a grace period.
Task scheduling
Spreading work over cores.
Work-stealing deque
mediumPer-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.
cooperative scheduling
Planned.
fibers stackful coroutines
Planned.
async io runtime
Planned.
thread per core
Planned.
Actor model
mediumIsolated units of state that interact only by queued messages and handle one at a time: no locks on state, and the same code runs local or remote.
Supervision trees
mediumWorkers crash on surprises; supervisors only start, watch and restart them, with a restart-rate limit that escalates to their parent.