Tagged articles
read-write lock
11 articles · Page 1 of 1
This article explores how Alibaba’s Nuwa service and the open‑source ZooKeeper implement distributed read‑write locks using sequential files, detailing the challenges of maintaining cversion order during failover and the community’s solutions to ensure consistency and reliability.
ConsensusFailoverZooKeeper
0 likes · 14 min read

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.
Linux kernelarm64optimistic spinning
0 likes · 12 min read

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.
ConcurrencyLinux kernelSynchronization
0 likes · 22 min read

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.
JavaOptimistic Locklocking
0 likes · 10 min read

This article explains how Redisson provides Redis‑based distributed locks, covering atomic lock acquisition via Lua scripts, lease time handling, watchdog auto‑extension, re‑entrant and fair locks, read‑write locks, multi‑lock batching, and the RedLock algorithm for high‑availability scenarios.
Fair LockLua ScriptRedis
0 likes · 24 min read

A recent Go article sparked a lively poll and discussion about the reasonableness of Go's read‑write lock design, revealing surprising community opinions, common misconceptions, and deeper questions about reentrant locks, communication versus sharing, and Go's concurrency philosophy.
BackendReentrant Lockpoll
0 likes · 5 min read

An in‑depth analysis of a deadlock caused by Go’s sync.RWMutex in a microservice, comparing its non‑reentrant read‑write lock behavior with Java’s ReentrantReadWriteLock, illustrating the root cause, code examples, and design rationale behind Go’s lock implementation.
JavaRWMutexdeadlock
0 likes · 12 min read

This article explains the various Java lock mechanisms—including optimistic and pessimistic locks, exclusive and shared locks, reentrant, read‑write, fair/unfair, spin, segment locks, and lock‑escalation techniques—detailing their principles, Java implementations, usage scenarios, and optimization strategies.
ConcurrencyOptimistic LockReentrant Lock
0 likes · 13 min read


ITPUBSep 17, 2019 · Fundamentals
This article explains the challenges of deadlock detection in Linux kernel lockdep, especially with read‑write locks, and presents a formally proven general deadlock prediction algorithm that models lock dependencies using a two‑thread abstraction, lemmas, and lock‑type promotion to reliably predict potential deadlocks.
AlgorithmConcurrencyLockdep
0 likes · 17 min read

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.
ConcurrencyLockdepdeadlock
0 likes · 18 min read

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.
BackendConcurrencyDistributed Lock
0 likes · 9 min read
