Tag

NonFairLock

0 views collected around this technical thread.

Top Architect
Top Architect
Jul 17, 2022 · Backend Development

Understanding CAS, ABA Problem, and AQS in Java Concurrency: Fair vs Non‑Fair Locks

This article explains the fundamentals of CAS (compare‑and‑swap), the ABA problem and its version‑stamp solution, introduces AbstractQueuedSynchronizer (AQS) as the core of Java concurrency utilities, and compares fair and non‑fair lock implementations in ReentrantLock with code examples and diagrams.

ABAAQSCAS
0 likes · 9 min read
Understanding CAS, ABA Problem, and AQS in Java Concurrency: Fair vs Non‑Fair Locks
Top Architect
Top Architect
Jul 9, 2021 · Backend Development

Understanding ReentrantLock: Fair and Non-Fair Lock Mechanisms in Java

This article explains the internal workings of Java's ReentrantLock, comparing fair and non‑fair lock acquisition, detailing the role of AQS, CLH queues, CAS operations, thread parking, and unlock procedures with full source‑code excerpts.

ConcurrencyFairLockJava
0 likes · 10 min read
Understanding ReentrantLock: Fair and Non-Fair Lock Mechanisms in Java