Invention Grant
- Patent Title: System and method for generating a lock-free dual queue
- Patent Title (中): 用于生成无锁双重队列的系统和方法
-
Application No.: US11323442Application Date: 2005-12-30
-
Publication No.: US07962923B2Publication Date: 2011-06-14
- Inventor: William E. Hopkins
- Applicant: William E. Hopkins
- Applicant Address: US CO Broomfield
- Assignee: Level 3 Communications, LLC
- Current Assignee: Level 3 Communications, LLC
- Current Assignee Address: US CO Broomfield
- Main IPC: G06F3/00
- IPC: G06F3/00 ; G06F9/44 ; G06F9/46 ; G06F13/00

Abstract:
A method of supporting condition synchronization for a shared data structure so as to provide concurrent access. A protocol is provided between a thread creating a request as part of a remove operation and a thread fulfilling a request as part of an add operation. The protocol provides for the thread making such a request to check the request_value field of the request node and then wait on its own condition variable. A requesting thread sets a requestor_id field of a request node with a value that identifies the thread. A fulfilling thread sets a request_value field of a request node with the address of the data node with the value, and then signals the requesting thread as identified by the requestor_id field. Upon receiving the signal, the requesting thread wakes up and retrieves the value from the data node pointed to it by the request_value field of the request node. If a wait times out, the requesting thread attempts to signal that the wait timed out by performing a CAS operation on the request_value field to modify it from zero to non-zero. If the CAS operation succeeds, the request timed out and the remove operation return failure. If the CAS operation fails, the request was fulfilled since the fulfilling thread set the request_value field with the address of the data node.
Public/Granted literature
- US20070157200A1 System and method for generating a lock-free dual queue Public/Granted day:2007-07-05
Information query