Tagged articles
AQS
90 articles · Page 1 of 1
This article explains Java's AbstractQueuedSynchronizer (AQS) core model using a service counter analogy, detailing how the state variable and CLH queue manage thread synchronization, the template method pattern separating queuing logic from acquisition rules, and how LockSupport.park/unpark enable efficient thread blocking and waking, illustrated with ReentrantLock and CountDownLatch examples.
AQSAbstractQueuedSynchronizerCLH Queue
0 likes · 7 min read

The article explains CountDownLatch's implementation as a thin wrapper over AQS, detailing how it overrides tryAcquireShared and tryReleaseShared with CAS for thread-safe countdown, and teaches a high-level-to-detail interview answering strategy.
AQSCASCountDownLatch
0 likes · 3 min read

This article provides a comprehensive source-code level comparison of Java's ReentrantLock and synchronized, covering their underlying implementations (JVM monitor vs AQS/CLH), lock upgrade mechanisms, fairness, interruptibility, timeout support, condition variables, and performance characteristics across JDK versions to guide practical selection.
AQSCLH QueueJVM Internals
0 likes · 21 min read

This article provides a comprehensive source-code-level analysis of Java's AbstractQueuedSynchronizer (AQS), detailing its three core components—state, CLH wait queue, and ConditionObject—and walking through exclusive lock acquisition/release, fair vs non-fair locking, shared lock propagation, and condition variable await/signal mechanics with code examples.
AQSCLH QueueJava Concurrency
0 likes · 37 min read

This article provides a line-by-line analysis of Java's AbstractQueuedSynchronizer (AQS), covering its CLH variant queue, CAS-based state management, exclusive and shared synchronization modes, Condition implementation, and core design decisions like CLH vs MCS and volatile vs synchronized.
AQSCASCLH Queue
0 likes · 22 min read


DabaoshiAug 16, 2026 · Backend Development
This article dissects Java’s AbstractQueuedSynchronizer (AQS), explaining its three core components—volatile state, CAS, and a FIFO wait queue—how exclusive and shared modes operate, the step‑by‑step lock acquisition flow, ReentrantLock implementation details, fairness trade‑offs, and the underlying template‑method design pattern.
AQSConcurrencyJava
0 likes · 15 min read

The article explains how Java's AbstractQueuedSynchronizer (AQS) serves as the foundational framework for most JUC utilities by encapsulating state, a FIFO wait queue, and template methods, and demonstrates its design through detailed source analysis of ReentrantLock, Semaphore, CountDownLatch, and a custom latch.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 17 min read

This article walks through ten essential Java concurrency interview topics—including the Java Memory Model, volatile semantics, synchronized lock upgrades, CAS pitfalls, AQS internals, ReentrantLock versus synchronized, ThreadPoolExecutor parameters, ThreadLocal memory‑leak issues, CountDownLatch vs CyclicBarrier, and deadlock conditions—providing code snippets, tables and detailed explanations to help candidates answer interview questions confidently.
AQSCASConcurrency
0 likes · 12 min read

This article thoroughly compares Java's synchronized keyword with ReentrantLock, explains lock implementation details, fairness, interruptibility, timeout, and Condition usage, provides practical code examples and interview tips, and offers guidance on when to choose each synchronization mechanism.
AQSConcurrencyCondition
0 likes · 8 min read

This article provides a thorough technical walkthrough of Java's AbstractQueuedSynchronizer, covering its core state and CLH queue structures, exclusive and shared lock acquisition/release processes, Condition implementation, and interview-ready explanations of its underlying mechanisms.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 8 min read

This article walks through the fundamentals of Java's AbstractQueuedSynchronizer, covering lock‑queue relationships, CLH lock internals, dummy head nodes, state management, and step‑by‑step implementations of acquire, addWaiter, acquireQueued, shouldParkAfterFailedAcquire, and release methods, complete with runnable example code.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 29 min read

In ultra‑high‑concurrency scenarios, synchronized becomes a bottleneck, while ReentrantLock can boost QPS by about 30% thanks to its active AQS state management, avoidance of biased‑lock revocation, more flexible spinning, and richer APIs, and the article outlines when to choose each.
AQSJava ConcurrencyReentrantLock
0 likes · 7 min read

This article explains the classification of Java locks—including pessimistic, optimistic, fair, and unfair variants—details their state transitions from biased to heavyweight, and walks through the source code of ReentrantLock and Condition to illustrate how synchronization, queuing, and thread parking are implemented in the JVM.
AQSConcurrencyCondition
0 likes · 20 min read

AbstractQueuedSynchronizer (AQS) is the core framework for building Java locks and synchronizers, providing state management, FIFO queuing, and blocking/unblocking mechanisms; this article explains its components, design patterns, thread safety operations, and real-world implementations such as ReentrantLock and Semaphore, with code examples.
AQSConcurrencyJava
0 likes · 11 min read

This comprehensive guide explores Java multithreading fundamentals, covering thread creation, lifecycle, synchronization challenges, context switching costs, deadlock detection, various lock mechanisms such as synchronized, ReentrantLock, ReadWriteLock, and the underlying AbstractQueuedSynchronizer architecture with practical code examples and performance tips.
AQSConcurrencyCondition
0 likes · 42 min read

This article explains the core concepts of Java's AbstractQueuedSynchronizer (AQS), covering semaphore vs. monitor, lock acquisition and release mechanisms, the internal FIFO queue, code examples of ReentrantLock and a custom mutex, and how AQS underpins many concurrency utilities.
AQSConcurrencyJava
0 likes · 28 min read

The article explains Java’s ReentrantLock implementation, contrasting fair locks that queue threads in request order with non‑fair locks that allow immediate acquisition, detailing the internal Sync, FairSync and NonfairSync classes, lock/unlock mechanisms, performance trade‑offs, and guidance on selecting the appropriate lock type.
AQSFair LockJUC
0 likes · 19 min read

This article explains the core concepts of Java’s AbstractQueuedSynchronizer (AQS), its exclusive and shared modes, the template‑method design it uses, and walks through the actual source code showing how ReentrantLock implements both fair and non‑fair locking, complete with diagrams and code snippets for interview preparation.
AQSConcurrencyJava
0 likes · 10 min read

This article explores the origins of Java's JUC package, explains the core concepts of AbstractQueuedSynchronizer—including template methods, exclusive and shared acquisition, CLH queues, CAS, and LockSupport—and demonstrates how locks, conditions, and synchronization mechanisms are implemented and used in real-world Java concurrency.
AQSConcurrencyCondition
0 likes · 30 min read

This article explains Java's AbstractQueuedSynchronizer (AQS) framework, detailing its FIFO queue, state handling, entry‑wait queue, exclusive and shared lock acquisition, condition‑variable queues, and how core concurrency utilities like ReentrantLock, ReadWriteLock, CountDownLatch, Semaphore, and ThreadPoolExecutor are built on it.
AQSConcurrencyLocks
0 likes · 31 min read

This article explains the principles and implementation of Java's Compare-and-Swap (CAS) and AbstractQueuedSynchronizer (AQS), illustrating how CAS enables lock‑free algorithms and how AQS underpins high‑level synchronization constructs like ReentrantLock and CountDownLatch, while also providing practical step‑by‑step examples.
AQSCASConcurrency
0 likes · 5 min read

This article explains how to obtain return values from asynchronous Java methods using FutureTask, covering its AQS foundation, execution flow, get() behavior, and provides concrete source code examples for practical implementation.
AQSAsyncConcurrency
0 likes · 13 min read

This article explains the core concepts of Java's AbstractQueuedSynchronizer, detailing its internal FIFO queue, state management, exclusive and shared modes, and provides complete code examples for custom lock implementation and usage.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 7 min read

The article explains Java’s AbstractQueuedSynchronizer framework and how ReentrantLock uses its inner Sync classes—FairSync and NonfairSync—to manage lock acquisition via CAS, queueing, spinning, and parking, detailing the acquire/release loops, fair vs non‑fair behavior, and interview‑ready insights.
AQSJavaLock
0 likes · 12 min read

This article explains the core concepts and common pitfalls of Java's AbstractQueuedSynchronizer (AQS) and its derived utilities such as ReentrantLock, ReentrantReadWriteLock, CountDownLatch, Semaphore, as well as the design and behavior of blocking queues, thread‑pool parameters, CopyOnWriteArrayList, and ConcurrentHashMap, providing code examples and practical guidance.
AQSBlockingQueueConcurrency
0 likes · 21 min read

This article explains the design and implementation of Java’s AbstractQueuedSynchronizer (AQS), detailing its state management, CLH queue, Node structure, and how ReentrantLock (both fair and non‑fair) leverages AQS for lock acquisition and release, with concrete code examples and step‑by‑step analysis.
AQSCLH QueueJava Concurrency
0 likes · 18 min read

This article explains the differences and similarities between Java's ObjectMonitor and the AbstractQueuedSynchronizer (AQS) implementations of heavyweight locks, covering their internal data structures, waiting queues, lock acquisition order, and how synchronized interacts with wait/notify mechanisms.
AQSConcurrencyJVM
0 likes · 11 min read

This article explains Java's AbstractQueuedSynchronizer (AQS) framework, covering its MESA monitor model, entry and condition wait queues, exclusive and shared lock acquisition and release, and how core concurrency utilities like ReentrantLock, ReadWriteLock, CountDownLatch, Semaphore, ThreadPoolExecutor, and CyclicBarrier are built upon it.
AQSConcurrencyCondition
0 likes · 30 min read

This article explains Java's AbstractQueuedSynchronizer (AQS) core architecture, including its state variable, CLH queue, condition queue, template methods, and the detailed implementations of acquire, release, and node management that enable building custom locks and synchronizers.
AQSJavaLocks
0 likes · 17 min read

This article explains why locks are needed in Java, describes the fundamentals of volatile and synchronized, details the monitor‑based implementation of synchronized, introduces CAS operations, and outlines advanced lock mechanisms such as biased, lightweight, lock coarsening, elimination, and the AbstractQueuedSynchronizer framework.
AQSCASConcurrency
0 likes · 11 min read

This article explains how Java's ReentrantLock works, detailing the role of the AbstractQueuedSynchronizer framework, the lock's internal architecture, the FIFO wait‑queue implementation, lock acquisition and release processes, and how these mechanisms avoid the herd effect in multithreaded environments.
AQSConcurrencyJava
0 likes · 11 min read

This article explains the principles of CAS, the ABA problem, and how Java's AbstractQueuedSynchronizer underpins ReentrantLock, comparing fair and non‑fair lock implementations, with code examples and discussion of their performance trade‑offs in.
AQSCASFair Lock
0 likes · 8 min read

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

This article provides a comprehensive walkthrough of Java's ReentrantLock implementation, covering linked list and queue data structures, the AbstractQueuedSynchronizer (AQS) framework, lock acquisition and release mechanisms, fair vs. non-fair locks, and detailed code analysis with illustrative diagrams.
AQSLockReentrantLock
0 likes · 27 min read

This article provides an in‑depth explanation of Java's AbstractQueuedSynchronizer (AQS), covering its core concepts, state management, CLH queue, condition variables, exclusive and shared acquisition/release templates, and includes a complete non‑reentrant lock implementation with illustrative code snippets.
AQSConcurrencyJava
0 likes · 18 min read

This article provides an in‑depth analysis of Java's AbstractQueuedSynchronizer (AQS), explaining its internal data structures, lock acquisition and release mechanisms for ReentrantLock and ReentrantReadWriteLock, and demonstrates how higher‑level concurrency utilities such as Condition, CountDownLatch, CyclicBarrier, and Semaphore are built on top of AQS.
AQSJUCJava
0 likes · 28 min read

This article explains how Java’s ReentrantLock relies on the AbstractQueuedSynchronizer (AQS) to manage lock state and a FIFO wait queue, detailing the step‑by‑step acquisition process with CAS, node insertion, parking, and the release mechanism that unparks successors.
AQSConcurrencyLock
0 likes · 9 min read

This article explores the inner workings of Java’s CountDownLatch from JDK 1.8, detailing its core concepts such as the counter, thread synchronization, shared mode, and AQS mechanisms, and demonstrates practical usage through step‑by‑step code analysis and examples.
AQSConcurrencyCountDownLatch
0 likes · 5 min read


政采云技术Feb 17, 2022 · Backend Development
This article provides an in‑depth overview of Java locking mechanisms, covering lock classifications, the inner workings of the synchronized keyword, ReentrantLock, AbstractQueuedSynchronizer, various lock optimizations, and practical implementations of distributed locks using Redis and Zookeeper.
AQSConcurrencyDistributedLock
0 likes · 28 min read

This article explains the core concepts and implementation details of Java's AbstractQueuedSynchronizer (AQS), covering its three main responsibilities, lock acquisition and release mechanisms, the internal Node structure, and both exclusive and shared lock algorithms with illustrative pseudocode.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 16 min read

This article explains the concepts of spin locks and mutexes, introduces the CLH lock as a fair spin lock used in Java's AbstractQueuedSynchronizer, and provides a detailed step‑by‑step walkthrough of its initialization, lock acquisition, release, testing, and common pitfalls with illustrative code and diagrams.
AQSCLHLockConcurrency
0 likes · 17 min read


政采云技术Oct 22, 2021 · Fundamentals
This article explains three Java concurrency tools - CountDownLatch, CyclicBarrier, and Semaphore - detailing their mechanisms, source code analysis, and practical usage scenarios with code examples.
AQSCountDownLatchCyclicBarrier
0 likes · 13 min read


JavaEdgeSep 26, 2021 · Backend Development
This article explains Java's AbstractQueuedSynchronizer (AQS) framework, covering its FIFO queue mechanism, lock acquisition and release processes for exclusive and shared modes, state handling, and the abstract methods developers must implement to build custom synchronizers.
AQSConcurrencyExclusive Lock
0 likes · 12 min read

CountDownLatch is a one‑time synchronization aid that blocks threads until a set of operations complete, illustrated with usage scenarios, a TestHarness example, and a deep dive into its internal implementation using AbstractQueuedSynchronizer, including code snippets and a flow diagram.
AQSConcurrencyCountDownLatch
0 likes · 10 min read

This article demystifies Java ThreadPoolExecutor behavior, showing why non‑core threads may stay alive, how tasks are assigned in a round‑robin fashion, and the exact source‑code mechanisms that determine thread recycling and active‑thread counts.
AQSCore ThreadsNon-Core Threads
0 likes · 14 min read

This article analyzes the underlying implementations of Java's synchronized and Lock mechanisms, comparing their differences and exploring the role of AbstractQueuedSynchronizer (AQS) in Lock's functionality.
AQSJava ConcurrencyJava Programming
0 likes · 13 min read

This article provides a comprehensive explanation of Java's JUC origins, the design and implementation of AbstractQueuedSynchronizer (AQS), its template methods for exclusive and shared locks, the CLH queue mechanism, lock implementations, condition queues, and related code examples, illustrating how high‑performance concurrency primitives such as ReentrantLock, CountDownLatch, Semaphore, and ReentrantReadWriteLock work under the hood.
AQSConcurrencyCondition
0 likes · 26 min read

This article introduces Java's Semaphore as a thread‑synchronization tool, explains its flow‑control use cases such as database connections and parking lots, provides a complete parking‑lot simulation code sample, and analyzes the underlying AQS‑based implementation including fairness, acquire/release mechanics, and auxiliary methods.
AQSConcurrencyJava
0 likes · 13 min read

This article explains the fundamentals of spin locks, introduces the CLH lock as an improved spin‑lock variant, analyzes its Java implementation details, and describes how Java's AbstractQueuedSynchronizer refactors CLH locks to provide fair, low‑overhead synchronization for concurrent applications.
AQSCLH LockConcurrency
0 likes · 12 min read

This article provides an in-depth explanation of Java's AbstractQueuedSynchronizer (AQS) framework, covering its role in JUC concurrency utilities such as locks, semaphores, CountDownLatch, ReentrantReadWriteLock, and Condition, including template methods, state management, node structures, queue algorithms, and practical code examples.
AQSConcurrencyCondition
0 likes · 25 min read

This article introduces Java's CountDownLatch synchronization tool, explains its purpose as a gate or counter, demonstrates basic and advanced usage with code examples—including a simple counter and a student race scenario—and provides an in‑depth analysis of its underlying AQS‑based source code.
AQSConcurrencyCountDownLatch
0 likes · 15 min read

This article explains the internal state management, waiting queue, and node states of Java's AbstractQueuedSynchronizer (AQS), demonstrates how to create a custom reentrant lock by extending AQS, and walks through the lock acquisition and release process with detailed code examples.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 17 min read

This article explains the principles of Java's AbstractQueuedSynchronizer (AQS), compares semaphore and monitor mechanisms, analyzes the source code of ReentrantLock, and demonstrates how to create a custom non-reentrant mutex using AQS, with detailed diagrams and code examples.
AQSConcurrencyJava
0 likes · 29 min read

This article explains the concepts of spin locks and mutex locks, introduces the CLH lock as a fair spin lock used in Java's AbstractQueuedSynchronizer, and provides a detailed walkthrough of its Java implementation, initialization, lock and unlock processes, along with code examples and visual illustrations.
AQSCLH LockConcurrency
0 likes · 19 min read

This article breaks down the inner workings of Java’s ReentrantLock, explaining spin locks, the role of AbstractQueuedSynchronizer, fair vs. non‑fair locking, and step‑by‑step thread execution with code examples and diagrams to illustrate the complete lock acquisition and release process.
AQSConcurrencyJava
0 likes · 17 min read

This article explains the core concepts of Java's AbstractQueuedSynchronizer (AQS), its internal FIFO double‑linked list structure, key code snippets, how threads acquire and release resources in exclusive and shared modes, and provides practical insights for mastering Java concurrency.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 12 min read

This article explains the concept of reentrant locks in Java, compares ReentrantLock with the synchronized keyword, and provides a detailed walkthrough of the internal source code for lock acquisition, fairness policies, and lock release using AQS, complete with code examples.
AQSConcurrencyJava
0 likes · 17 min read

This article explains the shared‑mode acquisition in Java's AbstractQueuedSynchronizer, walks through the core template methods, compares them with exclusive mode, and demonstrates a classic application by dissecting the Semaphore source code and its usage patterns.
AQSConcurrencyJava
0 likes · 14 min read

This article explains Java's lock mechanisms, comparing synchronized and the Lock interface, detailing their usage, implementation via AQS, system‑level primitives, and providing code examples to help developers choose the appropriate synchronization tool.
AQSConcurrencyJava
0 likes · 11 min read

This article explains why Java introduced the Lock API after Java 1.5, compares it with synchronized, details the explicit lock features, walks through the AQS (AbstractQueuedSynchronizer) implementation, and shows how ReentrantLock, fairness, reentrancy, and conditions are built on top of AQS.
AQSConcurrencyJava
0 likes · 36 min read

This article provides a comprehensive analysis of Java's ThreadPoolExecutor, covering its underlying JUC synchronizer framework, core and non‑core thread handling, state management, key configuration parameters, and detailed walkthrough of critical source‑code methods such as execute, addWorker, and runWorker, supplemented with illustrative code examples.
AQSConcurrencyCoreThreadPool
0 likes · 30 min read

This article provides a comprehensive overview of Java's java.util.concurrent package, detailing its core components such as atomic classes, locks, collections, executors, tools, as well as an in‑depth explanation of the AbstractQueuedSynchronizer (AQS) framework, its fields, methods, and related concurrency utilities like FutureTask, BlockingQueue, ForkJoin, and work‑stealing algorithms.
AQSConcurrencyForkJoin
0 likes · 22 min read

This article provides a comprehensive walkthrough of Java's AbstractQueuedSynchronizer (AQS), its state and FIFO wait queue, the inner workings of ReentrantLock with both non‑fair and fair lock strategies, and the detailed mechanics of Condition objects with code examples and diagrams.
AQSConditionFairLock
0 likes · 21 min read

This article explains why Java uses locks to prevent dirty reads and data inconsistency, compares volatile and synchronized mechanisms, details monitor-based lock implementation, lock optimizations like biased and lightweight locks, introduces CAS and AbstractQueuedSynchronizer, and illustrates these concepts with code examples and diagrams.
AQSCASConcurrency
0 likes · 13 min read

This article provides a comprehensive analysis of Java's AbstractQueuedSynchronizer (AQS) framework, explains how ReentrantLock is built on AQS, walks through lock acquisition and release mechanisms, discusses queue management, and demonstrates how to create a custom lock using AQS.
AQSConcurrencyJava
0 likes · 32 min read

This article explains the fundamentals of Java's AbstractQueuedSynchronizer (AQS), covering its basic concepts, core components, lock and unlock mechanisms, condition objects, and provides a pseudo‑code example for building a custom AQS implementation.
AQSJavaLock
0 likes · 14 min read


JavaEdgeJan 4, 2020 · Backend Development
This article explains how Java’s Unsafe class provides low‑level park and unpark methods, how the LockSupport utility wraps them for easier use, and demonstrates building a simple exclusive lock with AbstractQueuedSynchronizer, covering state handling, blocking mechanisms, and thread‑queue management.
AQSConcurrencyCustomLock
0 likes · 7 min read

This article provides a comprehensive overview of Java concurrency concepts, covering thread‑safety issues, variable visibility, atomic operations, the use of synchronized, volatile, ReentrantLock, ReadWriteLock, CountDownLatch, and other AQS‑based synchronizers, with code examples illustrating each mechanism.
AQSJavaLocks
0 likes · 34 min read

The article explains Java’s AbstractQueuedSynchronizer as the foundation of many concurrency utilities, details how ReentrantLock leverages AQS’s FIFO CLH queue, state field, and lock acquisition/release mechanisms, compares it with synchronized, and demonstrates building a custom lock with AQS.
AQSConcurrencyJava
0 likes · 33 min read

This article provides a comprehensive overview of various Java lock mechanisms—including fair, non‑fair, reentrant, read/write, biased, lightweight, heavyweight, and spin locks—explaining their classifications, usage, underlying AQS implementation, and includes illustrative code snippets for each type.
AQSConcurrencyJava
0 likes · 22 min read

This article explains the different types of Java locks—including fair, reentrant, exclusive, read‑write, optimistic, pessimistic, segment, biased, lightweight, heavyweight, and spin locks—describes their characteristics, usage scenarios, and provides concrete code examples for each implementation.
AQSJavaReentrantLock
0 likes · 15 min read

This tutorial walks through building a simple Java lock using AbstractQueuedSynchronizer (AQS), starting with a basic MyLock class, adding thread parking with Unsafe, creating a FIFO thread container, and refining lock and unlock methods to achieve correct synchronization and avoid lock starvation.
AQSConcurrencyJava
0 likes · 15 min read

This article explains why read‑write locks are needed, presents a simple Java implementation, and dives into the inner workings of ReentrantReadWriteLock, covering state encoding, acquisition and release algorithms, lock downgrading, and fairness policies.
AQSJavaLock
0 likes · 18 min read

This article explains the internal workings of Java's Semaphore, detailing its AQS-based architecture, fair and non‑fair synchronization strategies, core methods such as acquire, release, and their implementations, and provides a practical example demonstrating semaphore usage for thread coordination.
AQSConcurrencyJava
0 likes · 12 min read

This article explains the execution flow, source‑code details, and wake‑up logic of Java's AbstractQueuedSynchronizer shared‑lock mode, covering acquireShared, doAcquireShared, setHeadAndPropagate, doReleaseShared, and releaseShared methods with full code snippets and practical guidance.
AQSConcurrencyJava
0 likes · 11 min read

This article explains the purpose, differences, internal structure, and core methods of Java's CountDownLatch, shows how it leverages AQS for shared lock semantics, and provides a complete example demonstrating its usage in a thread‑synchronization scenario.
AQSConcurrencyCountDownLatch
0 likes · 8 min read

This article explains the concept and internal design of Java's Semaphore, shows how to create fair or non‑fair instances, details the acquire and release operations, compares fairness strategies, and provides a complete parking‑lot example with runnable code and output.
AQSConcurrencyFair vs Nonfair
0 likes · 8 min read

This article explains the internal mechanisms of Java's AbstractQueuedSynchronizer, detailing how the CLH synchronization queue, the shouldParkAfterFailedAcquire method, and the LockSupport utility work together to decide when a thread should spin, block, or be unblocked, with full code examples and step‑by‑step analysis.
AQSCLHQueueConcurrency
0 likes · 8 min read

This article explains the inner workings of Java's AbstractQueuedSynchronizer (AQS), covering exclusive and shared lock acquisition, interrupt handling, timeout control, and release mechanisms, complete with detailed code examples and flow‑chart illustrations.
AQSConcurrencyExclusive
0 likes · 13 min read

This article explains the internal CLH FIFO queue used by Java's AbstractQueuedSynchronizer, detailing the Node structure, how threads are enqueued with addWaiter and enq methods, and how they are dequeued to acquire synchronization state, complete with code examples and diagrams.
AQSCLH
0 likes · 7 min read

This article explains the internal design of Java's AbstractQueuedSynchronizer (AQS), covering its state management, FIFO sync queue, node structure, exclusive lock acquisition and release processes, and key helper methods, with detailed diagrams from JDK 8 implementation.
AQSAbstractQueuedSynchronizerConcurrency
0 likes · 11 min read

This article explains the role of Java's AbstractQueuedSynchronizer (AQS) as the core framework for building locks and other synchronizers, detailing its state management, FIFO queue mechanism, and the essential methods developers need to implement custom concurrency utilities.
AQSBackendConcurrency
0 likes · 7 min read


21CTOMay 9, 2018 · Backend Development
This article explains why locks are needed in concurrent programming, explores the fundamentals of volatile and synchronized, details monitor mechanisms, lock optimizations like biased and lightweight locks, compares CAS and AQS, and illustrates Java lock implementations with diagrams and code examples.
AQSCASConcurrency
0 likes · 11 min read

This article explains why locks are needed in Java, describes the fundamentals of volatile and synchronized, details monitor-based synchronization, explores lock optimizations such as biased and lightweight locks, and covers CAS and the AbstractQueuedSynchronizer framework for building concurrent structures.
AQSCASJava
0 likes · 12 min read

This article explains why locks are essential for preventing dirty reads and data inconsistency, explores the principles behind volatile, synchronized, monitor, CAS, and AQS, and illustrates Java’s lock implementations, optimizations, and practical usage examples such as ConcurrentHashMap.
AQSCASConcurrency
0 likes · 10 min read

This article provides a high‑level summary of Java concurrency, covering thread creation methods, thread models, thread pools, Future and CompletableFuture, the Fork/Join framework, volatile, CAS, AQS, synchronized locks, and concurrent queue implementations, with code examples and reference links for deeper study.
AQSCASConcurrency
0 likes · 39 min read

This article explains the Java Condition interface, its relationship with ReentrantLock and AQS, demonstrates usage examples, and delves into the internal waiting queue and signaling mechanisms that enable advanced thread coordination beyond basic synchronized monitors.
AQSConcurrencyCondition
0 likes · 8 min read

This article explains why lock optimization matters in high‑concurrency Java applications and presents practical techniques such as reducing lock hold time, shrinking lock granularity, using read‑write locks, lock splitting, lock coarsening, and lock elimination to improve performance.
AQSConcurrencyJava
0 likes · 8 min read

This article explores Java’s Lock interface and its underlying implementation, detailing the role of AbstractQueuedSynchronizer (AQS) in building ReentrantLock, the internal class hierarchy, synchronization mechanisms, and provides a step‑by‑step guide to creating a custom lock using AQS.
AQSConcurrencyCustomLock
0 likes · 12 min read

This article provides a comprehensive overview of Java's AbstractQueuedSynchronizer (AQS), explaining its design, exclusive and shared synchronization modes, key methods such as acquire, release, and their implementations, and demonstrates a simple Mutex application with detailed code analysis.
AQSJavaLock
0 likes · 18 min read
