Tag

read-write lock

1 views collected around this technical thread.

OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jan 5, 2024 · Fundamentals

Read‑Write Semaphore (rw_semaphore) and Per‑CPU rwsem in the Linux Kernel (ARM64)

The article explains Linux kernel read‑write semaphores, detailing the classic rw_semaphore’s optimistic‑spinning and hand‑off mechanisms, then introduces the per‑CPU rwsem for ARM64, which replaces global counters with per‑CPU data and an RCU fast‑path to cut cache‑coherency traffic at the cost of losing optimistic spinning.

ARM64Linux kerneloptimistic spinning
0 likes · 12 min read
Read‑Write Semaphore (rw_semaphore) and Per‑CPU rwsem in the Linux Kernel (ARM64)
OPPO Kernel Craftsman
OPPO Kernel Craftsman
May 26, 2023 · Fundamentals

Understanding Linux rwsem Read‑Write Semaphore in Kernel 5.15.81

Linux introduced the read‑write semaphore (rwsem) as a sleep lock that lets multiple readers hold the lock concurrently, improving read‑heavy workload performance, and the article details its internal state representation, acquisition paths for reads and writes, optimistic spinning, handoff mechanisms, and trade‑offs, noting that mobile kernels may need further tuning.

Linux kernelSynchronizationconcurrency
0 likes · 22 min read
Understanding Linux rwsem Read‑Write Semaphore in Kernel 5.15.81
Selected Java Interview Questions
Selected Java Interview Questions
Feb 23, 2023 · Backend Development

Understanding Lock Strategies: Optimistic, Pessimistic, Read‑Write, Heavy/Light, Fairness and Reentrancy

This article explains various lock strategies—including optimistic and pessimistic locks, read‑write locks, heavyweight vs. lightweight locks, spin locks, fair vs. unfair locks, and reentrant locks—detailing their definitions, use‑cases, underlying mechanisms, and illustrative examples for concurrent programming in Java and other languages.

Javaconcurrencylocking
0 likes · 10 min read
Understanding Lock Strategies: Optimistic, Pessimistic, Read‑Write, Heavy/Light, Fairness and Reentrancy
Didi Tech
Didi Tech
Sep 3, 2019 · Fundamentals

General Deadlock Prediction Algorithm for Linux Kernel Read‑Write Locks

The paper reverse‑engineers Linux’s Lockdep and introduces a universal deadlock prediction algorithm that treats mutexes as write‑locks of read‑write locks, using a two‑thread model and indirect‑dependency analysis to accurately detect potential deadlocks in complex rwlock scenarios.

Linux kernelconcurrencydeadlock
0 likes · 18 min read
General Deadlock Prediction Algorithm for Linux Kernel Read‑Write Locks
Architect's Tech Stack
Architect's Tech Stack
Mar 13, 2019 · Backend Development

Implementing Distributed Locks with Zookeeper: Exclusive and Read‑Write Locks

This article explains how Zookeeper can be used to build distributed locks, detailing the implementation of exclusive locks and two variants of read‑write locks, complete with step‑by‑step processes, node structures, watcher mechanisms, and practical considerations for backend systems.

Exclusive LockZookeeperbackend
0 likes · 9 min read
Implementing Distributed Locks with Zookeeper: Exclusive and Read‑Write Locks