Tag

readwritelock

0 views collected around this technical thread.

Top Architect
Top Architect
Aug 26, 2022 · Backend Development

Deep Dive into Java synchronized and Lock Mechanisms: Principles, JVM Internals, and Optimizations

This article explains thread safety in Java by detailing how the synchronized keyword and various Lock implementations work, covering their underlying JVM mechanisms, lock upgrade paths, optimizations like biased and lightweight locks, and practical differences between synchronized, ReentrantLock, and ReadWriteLock.

JVMJavaLock
0 likes · 19 min read
Deep Dive into Java synchronized and Lock Mechanisms: Principles, JVM Internals, and Optimizations
Selected Java Interview Questions
Selected Java Interview Questions
Aug 22, 2022 · Backend Development

Understanding Java synchronized and Lock Mechanisms: From Basic Locks to Advanced Optimizations

This article explains Java thread‑safety concepts, the synchronized keyword, its underlying monitor implementation, lock‑upgrade stages, JVM optimizations such as lock elimination and coarsening, and compares explicit Lock interfaces like ReentrantLock and ReadWriteLock, helping developers choose the appropriate synchronization tool.

JVMJavaLock
0 likes · 16 min read
Understanding Java synchronized and Lock Mechanisms: From Basic Locks to Advanced Optimizations
Sanyou's Java Diary
Sanyou's Java Diary
Apr 15, 2022 · Backend Development

Why Use Read‑Write Locks When Java Already Offers Thread‑Safe Collections?

This article examines the internal workings of Java's CopyOnWriteArrayList, explains why its weak consistency still necessitates read‑write locks in read‑heavy scenarios, and compares exclusive locks with read‑write locks to achieve strong data consistency without sacrificing performance.

JavaThread Safetyconcurrency
0 likes · 11 min read
Why Use Read‑Write Locks When Java Already Offers Thread‑Safe Collections?
YunZhu Net Technology Team
YunZhu Net Technology Team
Dec 2, 2021 · Fundamentals

Overview and Implementation of an Upgradable ReentrantReadWriteLock in Java

This article explains the principles of Java's ReentrantReadWriteLock, details lock downgrade and upgrade mechanisms, provides a full source analysis of read and write lock implementations, and presents a custom upgradable lock with test code and performance observations.

JavaLockUpgradeReentrantReadWriteLock
0 likes · 22 min read
Overview and Implementation of an Upgradable ReentrantReadWriteLock in Java
Wukong Talks Architecture
Wukong Talks Architecture
Oct 19, 2021 · Backend Development

Understanding Eureka Server Registration Process: A Source Code Walkthrough

This article explains how Eureka Server receives and stores service registration requests by examining the relevant source code, highlighting the use of Jersey for HTTP handling, ConcurrentHashMap for registration storage, and ReentrantReadWriteLock for fine‑grained concurrency control.

Backend DevelopmentConcurrentHashMapEureka
0 likes · 8 min read
Understanding Eureka Server Registration Process: A Source Code Walkthrough
Selected Java Interview Questions
Selected Java Interview Questions
Sep 24, 2021 · Backend Development

Understanding Java ReentrantReadWriteLock: Read‑Write Sharing and Mutual Exclusion

This article explains how Java's ReentrantReadWriteLock provides read‑write separation, allowing concurrent reads while enforcing exclusive access for writes, and demonstrates its behavior with sample code and thread‑execution results that illustrate read‑read sharing, read‑write mutual exclusion, and write‑write mutual exclusion.

JavaReentrantReadWriteLockconcurrency
0 likes · 5 min read
Understanding Java ReentrantReadWriteLock: Read‑Write Sharing and Mutual Exclusion
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Mar 29, 2021 · Databases

Implementing Distributed Read‑Write Locks with MySQL

This article explains how to build a distributed read‑write lock using MySQL tables and transactions, covering the business scenario, lock table design, detailed SQL procedures for write and read operations, logging, dead‑lock handling, and a cleanup job.

DatabaseConcurrencyDeadlockDistributedLock
0 likes · 13 min read
Implementing Distributed Read‑Write Locks with MySQL
Sohu Tech Products
Sohu Tech Products
Feb 19, 2020 · Backend Development

Understanding Java's ReentrantReadWriteLock: Concepts, Implementation, and Usage

This article explains Java's ReentrantReadWriteLock, covering the motivation for read‑write locks, their properties, a simple implementation example, lock upgrade and downgrade mechanisms, the internal AQS‑based design, fairness modes, and the roles of ReadLock and WriteLock classes.

JavaReentrantReadWriteLockSynchronization
0 likes · 10 min read
Understanding Java's ReentrantReadWriteLock: Concepts, Implementation, and Usage
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Feb 17, 2020 · Backend Development

Understanding JVM-Level Locks in Java: synchronized, ReentrantLock, ReentrantReadWriteLock, and LongAdder

This article explains the evolution and implementation of Java's JVM‑level locks—including synchronized, ReentrantLock, ReentrantReadWriteLock, and LongAdder—detailing their lock‑upgrade process, internal object layout, AQS‑based algorithms, and how they improve concurrency and performance in multithreaded applications.

JavaLocksLongAdder
0 likes · 24 min read
Understanding JVM-Level Locks in Java: synchronized, ReentrantLock, ReentrantReadWriteLock, and LongAdder
Java Captain
Java Captain
Aug 17, 2018 · Fundamentals

Understanding Java ReadWriteLock: Theory, Implementation, and Usage

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
Understanding Java ReadWriteLock: Theory, Implementation, and Usage