Invention Grant
US07802032B2 Concurrent, non-blocking, lock-free queue and method, apparatus, and computer program product for implementing same
失效
同时,非阻塞,无锁队列和方法,装置和计算机程序产品实现相同
- Patent Title: Concurrent, non-blocking, lock-free queue and method, apparatus, and computer program product for implementing same
- Patent Title (中): 同时,非阻塞,无锁队列和方法,装置和计算机程序产品实现相同
-
Application No.: US11559004Application Date: 2006-11-13
-
Publication No.: US07802032B2Publication Date: 2010-09-21
- Inventor: David Alan Christenson
- Applicant: David Alan Christenson
- Applicant Address: US NY Armonk
- Assignee: International Business Machines Corporation
- Current Assignee: International Business Machines Corporation
- Current Assignee Address: US NY Armonk
- Agent Matthew J. Bussan
- Main IPC: G06F3/00
- IPC: G06F3/00

Abstract:
A dummy node is enqueued to a concurrent, non-blocking, lock-free FIFO queue only when necessary to prevent the queue from becoming empty. The dummy node is only enqueued during a dequeue operation and only when the queue contains a single user node during the dequeue operation. This reduces overhead relative to conventional mechanisms that always keep a dummy node in the queue. User nodes are enqueued directly to the queue and can be immediately dequeued on-demand by any thread. Preferably, the enqueueing and dequeueing operations include the use of load-linked/store conditional (LL/SC) synchronization primitives. This solves the ABA problem without requiring the use a unique number, such as a queue-specific number, and contrasts with conventional mechanisms that include the use of compare-and-swap (CAS) synchronization primitives and address the ABA problem through the use of a unique number. In addition, storage ordering fences are preferably inserted to allow the algorithm to run on weakly consistent processors.
Public/Granted literature
Information query