Part 2
5 chapters
Shared State and Synchronization
The futex underneath a lock, mutual exclusion, coordination primitives, the memory model, and lock-free structures.
Doc 5
Shared State and the Futex
What a mutex actually is underneath the standard library: the futex syscall, and the cost difference between an uncontended and a contended lock.
Doc 6
Mutual Exclusion and Locking
The mutex family, the RAII lock wrapper types, and the lock-ordering discipline that avoids deadlock.
Doc 7
Coordination Primitives
condition_variable, C++20's latch and barrier, and counting_semaphore, and how to choose among them.
Doc 8
Atomics and the Memory Model
std::atomic, the C++ memory model's ordering options, fences, and the real performance cost of stricter ordering.
Doc 9
Lock-Free Data Structures
Single- and multi-producer/consumer ring buffers, the ABA problem, hazard pointers, RCU, and C++26's standardized reclamation support.