GPUers
|
中文
Columns
Notes
Books
About
Home
Columns
Linux Kernel Locking: Principles and Implementation
How the kernel's locks work at the source level, from atomics and memory barriers to spinlock, mutex, rwsem, ww_mutex, RCU and seqlock, and when to use each.
Memory Management
· Complete
Part 1. Foundations
Chapter 1. Atomics and Memory Barriers: The Foundation of Every Lock
Part 2. Spinning Locks
Chapter 2. spinlock and qspinlock: From Test-and-Set to the MCS Queue
Subscribers
Chapter 3. rwlock and qrwlock: The Spinning Trade-offs of Readers and Writers
Subscribers
Chapter 4. osq_lock: The Optimistic Spin Queue
Subscribers
Part 3. Sleeping Locks
Chapter 5. mutex: Optimistic Spinning and Handoff
Subscribers
Chapter 6. rwsem: Count Encoding and Lock Stealing in the Reader-Writer Semaphore
Subscribers
Part 4. Lock-Free and Special-Purpose Primitives
Chapter 7. ww_mutex: Wound/Wait Deadlock Avoidance
Subscribers
Chapter 8. seqlock and seqcount: Lock-Free Reads Driven by a Sequence Number
Subscribers
Extensions
Chapter 9. semaphore: The Plainest Counting Semaphore
Subscribers
Chapter 10. RCU and SRCU: Lock-Free Reads Driven by Grace Periods
Subscribers
Chapter 11. lockdep: How Deadlock Detection Works
Subscribers
Chapter 12. locktorture: Stress-Testing Lock Implementations
Subscribers