Method and apparatus for lock-free, non-blocking hash table
First Claim
1. A computer-readable medium having stored thereon a data structure representing a linked list in a hash table, comprising:
- a key field providing an identifier for data stored in a node in the linked list;
a protected pointer field comprising a pointer that functions to indicate that a node is part of the linked list when the pointer points to the node and the protected pointer field is in the linked list; and
a reference counter field comprising a reference counter that indicates the number of references currently made to a node, such that the reference counter must be zero and none of the protected pointers in the linked list can be pointing to the node before the node can be destroyed.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus are provided for an efficient lock-free, non-blocking hash table. Under one aspect, a linked list of nodes is formed in the hash table where each node includes a protected pointer to the next node in the list and a reference counter indicating the number of references currently made to the node. The reference counter of a node must be zero and none of the protected pointers in a linked list can be pointing at the node before the node can be destroyed. In another aspect of the invention, searching for a node in the hash table with a particular key involves examining the hash signatures of nodes along a linked list and only comparing the key of a node to a search key of the node if the hash signature of the node matches a search hash signature.
52 Citations
31 Claims
-
1. A computer-readable medium having stored thereon a data structure representing a linked list in a hash table, comprising:
-
a key field providing an identifier for data stored in a node in the linked list; a protected pointer field comprising a pointer that functions to indicate that a node is part of the linked list when the pointer points to the node and the protected pointer field is in the linked list; and a reference counter field comprising a reference counter that indicates the number of references currently made to a node, such that the reference counter must be zero and none of the protected pointers in the linked list can be pointing to the node before the node can be destroyed. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method of searching a hash table to find a node containing a search key, the method comprising:
-
using the search key to form a search hash signature; using the search hash signature to locate the beginning of a linked list of nodes; traversing through the linked list of nodes from the beginning of the linked list, traversing comprising at each node; comparing the search hash signature to a stored hash signature stored in the node; if the search hash signature does not match the stored hash signature, traversing to the next node in the linked list; if the search hash signature matches the stored hash signature, comparing the search key to a stored key stored in the node; if the search key matches the stored key, returning a pointer to the node; and if the search key does not match the stored key, traversing to the next node in the linked list. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
-
Specification