Non-blocking concurrent queues with direct node access by threads
Abstract
Multiple non-blocking FIFO queues are concurrently maintained using atomic compare-and-swap (CAS) operations. In accordance with the invention, each queue provides direct access to the nodes stored therein to an application or thread, so that each thread may enqueue and dequeue nodes that it may choose. The prior art merely provided access to the values stored in the node. In order to avoid anomalies, the queue is never allowed to become empty by requiring the presence of at least a dummy node in the queue. The ABA problem is solved by requiring that the next pointer of the tail node in each queue point to a “magic number” unique to the particular queue, such as the pointer to the queue head or the address of the queue head, for example. This obviates any need to maintain a separate count for each node.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 17.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A method for attaching a new node onto a queue that includes a queue specific number, a head pointer specifying a head node, and a tail pointer specifying a tail node, wherein the new node has a first pointer and the tail node has a second pointer, comprising: setting the first pointer to specify the queue specific number, wherein the queue specific number uniquely identifies the queue; reading the tail pointer; determining whether the second pointer specifies the queue specific number; and changing the second pointer to specify the new node.
- Claim 2Depends on #1
The method of claim 1 further comprising: determining whether the tail pointer has changed value subsequent to the step of reading the tall pointer; and based on whether the tail pointer has changed value, changing the tail pointer to specify the new node.
- Claim 3Depends on #1
The method of claim 1 wherein the step of
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 17 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (5)
- B. Bershad, et al., "Extensibility, Safety and Performance in the Spin Operating System," 15th ACM Symposium on Operating System Principles, Copper Mountain Resort, Colorado, Dec. 1995, pp. 267-284.
- B. Ford, et al., "The Flux OSKit: A Substrate for Kernel and Language Research," Proceedings of the 16th ACM Symposium on Operating Systems Principles, ACM SIGOPS, Saint-Malo, France, Oct. 1997, pp. 38-51.
- D. Black, et al., "Microkernel Operating System Architecture and Mach," 1st USENIX Workshop on Micro-Kernels and Other Kernel Architectures, Seattle, Apr. 1992, pp. 11-30.
- D. Cheriton, "The V Distributed System", Communications of the ACM, Mar. 1998, vol. 31, No. 3, pp. 314-333.
- D. Cheriton, et al., "A Caching Model of Operating System Kernel Functionality," Proceedings of the First Symposium on Operating Systems Design and Implementation, Seattle, 1994, 15 pages.