Lock free data structure maintenance
First Claim
1. A method for maintaining a list structure having data nodes in a computer memory accessible by multiple processors, said method comprising the steps of:
- a) maintaining a pool of available data nodes for use in maintaining the list structure;
wherein each data node includes i) a data portion ii) a link for addressing other data nodes in the list structure and iii) a unique identifier for said data node;
b) adding a data node to the list structure from the pool of data nodes and if there is no such available data node in said pool, creating a new data node from available computer memory that includes i) a data portion ii) a link for addressing other data nodes in the list structure and iii) a unique identifier for said data node, and adding the new data node to the list structure;
said adding step comprising a lock free step which checks the identifier of a data node of the list before adding a node to said list structure; and
c) accessing data from the list structure by determining the contents of a specified data node, removing the specified data node from the list structure and adding the specified data node from the list structure to the pool of available data nodes.
2 Assignments
0 Petitions
Accused Products
Abstract
Method and apparatus for maintaining a queue structure having data nodes within a computer memory. The queue is maintained by the steps of maintaining a pool of available data nodes for use in maintaining the queue structure. Data is added to the queue structure by adding a nodes to the queue structure. Each data node includes a data portion, a link for addressing other data nodes in the queue structure, and an identifier. Data within the queue is accessed and then removed from the queue but the data nodes are preserved in memory by adding them to the pool of available data nodes. New data nodes are added to the queue by first checking the data pool, which in an exemplary embodiment is in the form of a stack, to determine if there are any nodes available in the pool before creating a new data node.
-
Citations
17 Claims
-
1. A method for maintaining a list structure having data nodes in a computer memory accessible by multiple processors, said method comprising the steps of:
-
a) maintaining a pool of available data nodes for use in maintaining the list structure;
wherein each data node includes i) a data portion ii) a link for addressing other data nodes in the list structure and iii) a unique identifier for said data node;
b) adding a data node to the list structure from the pool of data nodes and if there is no such available data node in said pool, creating a new data node from available computer memory that includes i) a data portion ii) a link for addressing other data nodes in the list structure and iii) a unique identifier for said data node, and adding the new data node to the list structure;
said adding step comprising a lock free step which checks the identifier of a data node of the list before adding a node to said list structure; and
c) accessing data from the list structure by determining the contents of a specified data node, removing the specified data node from the list structure and adding the specified data node from the list structure to the pool of available data nodes. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method for maintaining a queue structure having data nodes in a computer memory accessible by multiple processors, said method comprising the steps of:
-
a) maintaining a pool of available data nodes for use in maintaining the queue structure;
wherein each data node includes i) a data portion ii) a link for addressing other data nodes in the queue structure and iii) a unique identifier for said data node assigned by one of the multiple processors;
b) adding data to the queue structure by adding a data node from the pool of available data nodes at a rear of the queue structure and if there are no such available data node creating a new data node from available computer memory that includes i) a data portion ii) a link for addressing other data nodes in the queue structure and iii) a unique identifier for said data node assigned a processor, and adding the new data node to the queue structure;
said adding step comprising a lock free step which checks the identifier of data nodes of the queue structure before adding a node; and
c) accessing data from the queue structure by determining the contents of an front data node, removing the front data node from the queue structure and adding the data node removed from the queue structure to the pool of available data nodes. - View Dependent Claims (8, 9)
-
-
10. Computer apparatus comprising:
-
a) a plurality of processors wherein each processor executes a stored program for performing one or more tasks including a task of adding to and deleting data from a data structure made up of a plurality of data nodes; and
b) a shared memory accessible to the plurality of processors for maintaining said data structure wherein each of the plurality of processors has access to the shared memory to allow said processor to add or delete data nodes from the data structure;
c) wherein the stored programs executing on each of the plurality of processors assigns a unique pointer/counter combination to each data node and includes a lock free procedure for updating the data structure by maintaining an available pool of data nodes for use in updating the data structure. - View Dependent Claims (11, 12)
-
-
13. A computer readable medium having computer executable instructions for performing steps on a computer having a computer memory of:
-
a) maintaining a pool of available data nodes for use by multiple processors in maintaining a list structure;
wherein each data node includes i) a data portion ii) a link for addressing other data nodes in the list structure and iii) a unique identifier for the node;
b) adding a data node to the list structure from the pool of data nodes and if there is no such available data node in said pool, creating a new data node from available computer memory that includes i) a data portion ii) a link for addressing other data nodes in the list structure and iii) a unique identifier for said data node, and adding the new data node to the list structure;
said adding step comprising a lock See step which checks the identifier of the data node of the list before adding a node; and
c) accessing data from the list structure by determining the contents of an endmost data node, removing the endmost data node from the list structure and adding the endmost data node from the list structure to the pool of available data nodes. - View Dependent Claims (14, 15, 16, 17)
-
Specification