Hybrid multi-threaded access to data structures using hazard pointers for reads and locks for updates
Abstract
Hybrid multi-threaded access to data structures is provided in which hazard pointers are used for reads and locks are used for updates. Where a reader is attempting to read a data structure, the reader maintains a hazard pointer to the data structure before reading it, without globally acquiring a lock on the data structure. Upon the reader being finished reading the data structure, it removes the hazard pointer from the data structure. Where an updater is attempting to update the data structure, the updater globally acquires a lock on the data structure before updating it. Upon the updater being finished updating the data structure, it releases the lock from the data structure. To delete the data structure, first it is determined whether any hazard pointers point to the data structure, and where no hazard pointers do, the data structure is deleted.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 4.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method comprising: where a reader is attempting to read a data structure, the reader maintaining a hazard pointer to the data structure before reading the data structure, without globally acquiring a lock on the data structure; upon the reader being finished reading the data structure, removing the hazard pointer from the data structure; and, where an updater is attempting to update the data structure, the updater globally acquiring a lock on the data structure before updating the data structure; upon the updater being finished updating the data structure, releasing the lock from the data st
- Claim 2Depends on #1
The method of claim 1 , further comprising, to delete the data structure, determining whether any hazard pointers point to the data structure; and, where no hazard pointers point to the data structure, deleting the data structure.
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (4 of 4 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (3)
- M. Herlihy et al., "The repeat offender problem: A mechanism for supporting dynamic-sized, lock-free data structures," in Procs. of 16th Int'l Symp. on Distributed Computing (Oct. 2002).
- M.M. Michael, "Safe memory reclamation for dynamic lock-free objects using atomic reads and writes," in Procs. of 21st Annual ACM Symp. on Principles of Distributed Computing (Aug. 2002).
- Maged M. Michael, High performance dynamic lock-free hash tables and list-based sets, Proceedings of 14th Annual ACM Symposium on parallel algorithms and architectures, Winnipeg, Manitoba, Canada, pp. 73-82 (year 2002).