Method and apparatus for implementing atomic queues
First Claim
1. A queue structure suitable for use in an overall computer system, the queue structure being arranged for data to be stored sequentially therein, wherein the queue structure facilitates access to the data within the overall computer system, the queue structure further being arranged to be accessed by a plurality of threads, the plurality of threads being associated with the overall computer system, the queue structure comprising:
- a head node, the head node including a head field and a disruption field, the disruption field being arranged to indicate a number of times the queue structure is accessed; and
a first data-containing node, the first data-containing node being identified by the head field in the head node, wherein the first data-containing node includes a link field and a data field.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatus for implementing queues without disabling interrupts or using locks are disclosed. According to one aspect of the present invention, a queue structure, which is accessible to a plurality of threads, that is suitable for use in a computer system includes a head node and a first data-containing node. The head node includes a head field and a disruption field that is arranged to indicate a number of times the queue structure is accessed. The first data-containing node, which is identified by the head field in the head node, includes a link field and a data field. In one embodiment, the head node also includes a rank field, which is arranged to identify a preference level associated with the plurality of threads. In such an embodiment, the head field may be the first field in the head node, the rank field may be the second field in the head node, and the disruption field may be the third field in the head node.
-
Citations
37 Claims
-
1. A queue structure suitable for use in an overall computer system, the queue structure being arranged for data to be stored sequentially therein, wherein the queue structure facilitates access to the data within the overall computer system, the queue structure further being arranged to be accessed by a plurality of threads, the plurality of threads being associated with the overall computer system, the queue structure comprising:
-
a head node, the head node including a head field and a disruption field, the disruption field being arranged to indicate a number of times the queue structure is accessed; and a first data-containing node, the first data-containing node being identified by the head field in the head node, wherein the first data-containing node includes a link field and a data field. - View Dependent Claims (2, 3)
-
-
4. A queue structure suitable for use in an overall computer system, the queue structure being arranged for data to be stored sequentially therein, wherein the queue structure facilitates access to the data within the overall computer system, the queue structure further being arranged to be accessed by a plurality of threads, the plurality of threads being associated with the overall computer system, the queue structure comprising:
-
a head node, the head node including a head field and a disruption field, the disruption field being arranged to indicate a number of times the queue structure is accessed; a first data-containing node, the first data-containing node being identified by the head field in the head node, wherein the first data-containing node includes a link field and a data field; and a second data-containing node, the second data-containing node including a link field and a data field. - View Dependent Claims (5, 6)
-
-
7. A method for implementing a queue in a computer system, the method comprising:
-
providing a first data-containing node, the first data-containing node including a link field and a data field; and providing a head node, the head node including a head field and a disruption field, the head field being arranged to identify the first data-containing node, the disruption field being arranged to indicate whether the queue has been disrupted. - View Dependent Claims (8, 9, 10)
-
-
11. A computer-implemented method for enqueuing an additional node on a queue, the additional node including a link field, the queue including a head and at least one node, the head including a head field and a disruption field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the computer-implemented method comprising:
-
acquiring the disruption level of the queue; reading the contents from the head field into the link field of the additional node; determining whether the queue has been disrupted; and storing an address of the additional node into the head field when it is determined that the queue has not been disrupted. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A computer-implemented method for enqueuing an additional node on a queue, the additional node including a link field, the queue including a head and at least one node, the head including a head field and a disruption field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the computer-implemented method comprising:
-
acquiring the disruption level of the queue, the disruption level being arranged to indicate whether the queue has been disrupted; determining whether the queue has been disrupted using the disruption level; and storing an address of the additional node into a link field of the at least one node when it is determined that the queue has not been disrupted. - View Dependent Claims (17, 18)
-
-
19. A computer-implemented method for enqueuing an additional node on a queue, the additional node including a link field, the queue including a head and at least one node, the head including a head field, a disruption field, and a rank field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the rank field arranged to contain a rank of the queue, the computer-implemented method comprising:
-
acquiring the disruption level of the queue; determining whether the queue has been disrupted; storing an address of the additional node into a link field of the at least one node when it is determined that the queue has not been disrupted; and acquiring the rank of the queue. - View Dependent Claims (20, 21)
-
-
22. A computer system arranged to enqueue an additional node on a queue, the additional node including a link field, the queue including a head and at least one node, the head including a head field and a disruption field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the computer system comprising:
-
a thread arranged to acquire the disruption level of the queue, the disruption level being arranged to indicate whether the queue has been disrupted; a mechanism for reading the contents from the head field into the link field of the additional node; a mechanism for determining whether the queue has been disrupted; and a mechanism for storing an address of the additional node into the head field when it is determined that the queue has not been disrupted. - View Dependent Claims (23, 24)
-
-
25. A computer system for enqueuing an additional node on a queue, the additional node including a link field, the queue including a head and at least one node, the head including a head field and a disruption field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the computer system comprising:
-
a thread for acquiring the disruption level of the queue; a mechanism for determining whether the queue has been disrupted; and a mechanism for storing an address of the additional node into a link field of the at least one node when it is determined that the queue has not been disrupted. - View Dependent Claims (26, 27)
-
-
28. A computer program product arranged for enqueuing an additional node on a queue, the additional node including a link field, the queue including a head and at least one node, the head including a head field and a disruption field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the computer program product comprising:
-
computer code that acquires the disruption level of the queue; computer code that reads the contents from the head field into the link field of the additional node; computer code that determines whether the queue has been disrupted; computer code that stores an address of the additional node into the head field when it is determined that the queue has not been disrupted; and a computer readable medium that stores the computer codes. - View Dependent Claims (29, 30)
-
-
31. A computer-implemented method for dequeuing a first node from a queue, the queue including a head, the head including a head field and a disruption field, the head field including contents arranged to identify the at least one node, the disruption field arranged to contain a disruption level of the queue, the first node including a link field, the computer-implemented method comprising:
-
acquiring the disruption level of the queue; determining whether the queue has been disrupted; and storing contents of the link field of the first node into the head field when it is determined that the queue has not been disrupted. - View Dependent Claims (32, 33, 34)
-
-
35. A computer-implemented method for dequeuing a first node from a queue, the queue including a head, the first node, and a second node, wherein the second node immediately precedes the first node, the first node including a link field, the head including a head field and a disruption field, the head field including contents arranged to identify one of the plurality of nodes, the disruption field arranged to contain a disruption level of the queue, the computer-implemented method comprising:
-
acquiring the disruption level of the queue; determining whether the queue has been disrupted; and storing contents of the link field of the first node into a link field of the second node when it is determined that the queue has not been disrupted. - View Dependent Claims (36, 37)
-
Specification