1. 6.1 Start with the Hardwarehistorical

    Hardware foundations needed to understand the JMM: von Neumann architecture, caches, coherence, pipelines, reordering, memory barriers, and memory consistency models.

  2. 6.2 2.Synchronizedhistorical

    1. What it is. An implementation of pessimistic locking in Java. Compared with volatile, it is a heavyweight lock and can guarantee atomicity, ordering, and visibility. 2. When to use it. 3. How to use it. 4. Principle analysis of synchronized blocks. 5. Principle analysis of synchronized methods.

  3. 6.3 3.volatilehistorical

    What volatile is, when it is more suitable than synchronized, an assembly experiment, and visibility/ordering analysis.

  4. 6.4 CAShistorical

    1. What it is. To understand CAS, first understand optimistic and pessimistic locking. 1.1. Optimistic vs. pessimistic locking. 1.2. CAS. 2. How to use it.

  5. 6.5 5.AQShistorical

    1. What it is. A queue synchronizer used to implement other concurrency utilities in JUC. 2. How to use it. 3. Principle analysis: queue structure, lock acquisition, enqueueing, parking, cancellation, interruption recovery, and lock release.

  6. 6.6 6.ReentrantLockhistorical

    What ReentrantLock is, comparison with synchronized, implementation principle, and references.

  7. 6.7 7.Lock Conditionhistorical

    1. What it is. Similar to Object.wait/notify with synchronized; Condition.await/signal work with Lock to implement conditional waiting and wake-up. 2. Usage. 3. Implementation principles: Condition queue, await, transfer to AQS queue, signalAll, and signal.

  8. 6.8 8.CyclicBarrierhistorical

    What CyclicBarrier is, usage with and without a barrier action, and source analysis based on Lock, Condition, generations, and await.

  9. 6.9 9.CountDownLatchhistorical

    What CountDownLatch is, how to use it, comparison with CyclicBarrier, and its AQS-based countDown/await implementation.

  10. 6.10 10.CopyOnWriteArrayListhistorical

    1. What it is. This list adopts the idea of separating reads and writes (weak consistency): reads can proceed concurrently without locking; writes require locking, copying the original data, modifying the copy, and then writing it back to the list. 2. How to use it. 3. Principles. 3.1. Constructor. The underlying implementation uses an Object array and accesses it through getArray/setArray.