LRW Lock: Light-weight Read Write Lock
Efficient management of concurrent access to shared resources is crucial in modern multi-threaded systems to avoid race conditions and performance bottlenecks. Traditional locking mechanisms, such as standard read-write locks, often introduce substantial overhead in read-heavy workloads due to their blocking nature. To address these challenges, we introduce the LRW lock: lightweight read-write lock. It allows concurrent read access and ensures exclusive write access. The lock considers atomic operations to provide active readers and writers. This paper initially presents algorithms to acquire read and write locks using a locking object of the LRW lock. Later, it provides the design of non-blocking procedures tryReadLock() and tryWriteLock() for read and write operations. The procedures offer flexibility for time-sensitive applications. To understand the efficiency of the LRW lock, we consider different concurrent data structures and the state-of-the-art locking objects. Experimental results show that the implementation that considers LRW lock outperforms the state-of-the-art locking objects and consumes less memory footprint. The LRW lock leverages atomic operations to track active readers and writers efficiently.
Authors
- Praveen Alapati (ORCID: https://orcid.org/0000-0002-6746-3136)
- Brahmaiah Gandham (ORCID: https://orcid.org/0009-0007-4709-1201)
- Kapil Kumar Attinagaramu
Institutions
- Mahindra University (IN)
Publication Details
- Published
- 2025-03-06
- DOI
- https://doi.org/10.1109/rait65068.2025.11089368
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00