OPPO Kernel Craftsman
Aug 12, 2022 · Fundamentals
Understanding Linux rwsem: Mechanisms, Data Structures, and Optimistic Spinning
Linux rwsem is a read‑write semaphore that lets multiple readers or a single writer hold the lock, using a count field, owner pointer, optimistic‑spin queue (osq), and protected wait list; it provides fast, medium, and slow acquisition paths with handoff and optimistic spinning to reduce sleep latency compared to mutexes and spinlocks.
ConcurrencyLinux kernelSynchronization
0 likes · 16 min read