Tagged articles
11 articles
Page 1 of 1
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.

Javalockingoptimistic lock
0 likes · 10 min read
Understanding Lock Strategies: Optimistic, Pessimistic, Read‑Write, Heavy/Light, Fairness and Reentrancy
Su San Talks Tech
Su San Talks Tech
Dec 16, 2022 · Backend Development

How Redisson Implements Distributed Locks with Redis: A Deep Dive into Lua Scripts and Watchdog

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.

Lua ScriptWatchdogfair lock
0 likes · 24 min read
How Redisson Implements Distributed Locks with Redis: A Deep Dive into Lua Scripts and Watchdog
Su San Talks Tech
Su San Talks Tech
Jul 27, 2021 · Backend Development

Understanding Java Locks: Optimistic vs Pessimistic, Reentrant, Read‑Write, and More

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.

Reentrant Lockconcurrencyoptimistic lock
0 likes · 13 min read
Understanding Java Locks: Optimistic vs Pessimistic, Reentrant, Read‑Write, and More
ITPUB
ITPUB
Sep 17, 2019 · Fundamentals

How a General Deadlock Prediction Algorithm Enhances Linux Lockdep for Read‑Write Locks

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.

Lockdepalgorithmconcurrency
0 likes · 17 min read
How a General Deadlock Prediction Algorithm Enhances Linux Lockdep for Read‑Write Locks
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.

Lockdepconcurrencydeadlock
0 likes · 18 min read
General Deadlock Prediction Algorithm for Linux Kernel Read‑Write Locks