System and method for implementing scalable adaptive reader-writer locks
Abstract
NUMA-aware reader-writer locks may leverage lock cohorting techniques and may support reader re-entrancy. They may implement a delayed sleep mechanism by which a thread that fails to acquire a lock spins briefly, hoping the lock will be released soon, before blocking on the lock (sleeping). The maximum spin time may be based on the time needed to put a thread to sleep and wake it up. If a lock holder is not executing on a processor, an acquiring thread may go to sleep without first spinning. Threads put in a sleep state may be placed on a turnstile sleep queue associated with the lock. When a writer thread that holds the lock exits a critical section protected by the lock, it may wake all sleeping reader threads and one sleeping writer thread. Reader threads may increment and decrement node-local reader counters upon arrival and departure, respectively.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 36 · Forward citations: 7.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method, comprising: performing by a computer: beginning execution of a multithreaded application that comprises one or more requests to acquire a reader-writer lock, wherein the reader-writer lock controls write access to a critical section of code by concurrently executing threads of the application and further controls access to the critical section of code in read-only mode, wherein the reader-writer lock allows at most one writer thread to hold the reader-writer lock for writing at a time, and wherein the reader-writer lock allows multiple reader threads to hold the reader-writer lock in
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (7 of 7 total)
References Cited — Backward Prior Art (36)
Non-Patent Literature (5)
- "NUMA-Aware locking routines-design and implementation in Linux" downloaded from-sc.tamu.edu/ whitepapers/altix/numalocks.pdf, pp. 1-10, 2009.
- “NUMA-Aware locking routines—design and implementation in Linux” downloaded from—sc.tamu.edu/ whitepapers/altix/numalocks.pdf, pp. 1-10, 2009.
- 0. Krieger, M. Stumm, R. Unrau, and J. Hanna. "A fair fast scalable reader-writer lock" ICPP 1993. pp. 1-4.
- A. Agarwal and M. Cherian. "Adaptive backoff synchronization techniques". SIGARCH Comput. Archit. News, 17:396-406, Apr. 1989.
- D. Dice and A. Garthwaite. "Mostly Lock Free Malloc". In Proceedings of the 3rd International Symposium on Memory Management, pp. 163-174, 2002.