Light-weight Locks
Nitin Garg, Ed Zhu, Fabiano C. Botelho

TL;DR
This paper introduces lwlocks, a new family of lightweight synchronization primitives optimized for minimal memory use and high concurrency, enabling more fine-grained locking in data structures.
Contribution
The paper presents lwlocks, a novel synchronization primitive with significantly reduced memory footprint and enhanced features like asynchronous locking, improving concurrency control.
Findings
Lwlocks occupy only 4 bytes compared to 56 bytes for pthread primitives.
Lwlocks support asynchronous locking, enabling higher concurrency.
They are effectively used in the Data Domain File System for in-memory inode cache.
Abstract
In this paper, we propose a new approach to building synchronization primitives, dubbed "lwlocks" (short for light-weight locks). The primitives are optimized for small memory footprint while maintaining efficient performance in low contention scenarios. A read-write lwlock occupies 4 bytes, a mutex occupies 4 bytes (2 if deadlock detection is not required), and a condition variable occupies 4 bytes. The corresponding primitives of the popular pthread library occupy 56 bytes, 40 bytes and 48 bytes respectively on the x86-64 platform. The API for lwlocks is similar to that of the pthread library but covering only the most common use cases. Lwlocks allow explicit control of queuing and scheduling decisions in contention situations and support "asynchronous" or "deferred blocking" acquisition of locks. Asynchronous locking helps in working around the constraints of lock-ordering which…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Distributed systems and fault tolerance · Advanced Data Storage Technologies
