Search mechanism for a queue system
First Claim
1. A queue system including a queue and a queue search mechanism, the queue containing a number of locations for storing a corresponding number of queued data items, each queued data item having a number of fields, a pair of the number of fields containing information for indicating locations of preceding and succeeding queued data items and at least one field for storing a key value, the queued data items being ordered in the queue according to key value, the queue search mechanism comprising:
- (a) a key cache structure having a number of entry locations for storing a corresponding number of cache data item structures, each cache data item structure having a number of fields, a first field for storing a unique key value representative of a queued data item and a second field for storing a queue address pointer value designating the location of a queued data item; and
,(b) a control mechanism for performing queue management operations, the control mechanism when inserting a new data item in the queue, first generates a cache index value derived from the key value contained in the new data item to be enqueued for accessing an entry location in the key cache structure, the control mechanism next determines the location in the queue into which the new data item is to be inserted by comparing the key value of the queued data item initially specified by the pointer value of the accessed entry location and as a function of the results of the comparison, searches through successive queued data items in a direction defined by the comparison until a match is obtained with the key value of the new data item defining the appropriate point in the queue into which the new data item is to be inserted.
1 Assignment
0 Petitions
Accused Products
Abstract
A search mechanism improves the performance of a queue system including a queue for storing a plurality of data items and search mechanism by maintaining a key cache data structure having an array of entries, each of which have a key field and a pointer field. The key and pointer fields respectively of each cache entry are used for storing a key value of a different one of the enqueued data items of the queue and a pointer to that enqueued item. The key of each data item to be enqueued is used to generate an index value for accessing a location of the key cache array to obtain immediate access to the corresponding enqueued data item thereby reducing the search time for determining the proper point within the queue for inserting the data item to be added.
96 Citations
15 Claims
-
1. A queue system including a queue and a queue search mechanism, the queue containing a number of locations for storing a corresponding number of queued data items, each queued data item having a number of fields, a pair of the number of fields containing information for indicating locations of preceding and succeeding queued data items and at least one field for storing a key value, the queued data items being ordered in the queue according to key value, the queue search mechanism comprising:
-
(a) a key cache structure having a number of entry locations for storing a corresponding number of cache data item structures, each cache data item structure having a number of fields, a first field for storing a unique key value representative of a queued data item and a second field for storing a queue address pointer value designating the location of a queued data item; and
,(b) a control mechanism for performing queue management operations, the control mechanism when inserting a new data item in the queue, first generates a cache index value derived from the key value contained in the new data item to be enqueued for accessing an entry location in the key cache structure, the control mechanism next determines the location in the queue into which the new data item is to be inserted by comparing the key value of the queued data item initially specified by the pointer value of the accessed entry location and as a function of the results of the comparison, searches through successive queued data items in a direction defined by the comparison until a match is obtained with the key value of the new data item defining the appropriate point in the queue into which the new data item is to be inserted. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A method for operating a queue system including a queue using a queue search mechanism, the queue containing a number of locations for storing a corresponding number of queued data items, each queued data item having a number of fields, a pair of the number of fields containing information for indicating locations of preceding and succeeding queued data items and at least one field for storing a key value, the queued data items being ordered in the queue according to key value, the queue search mechanism comprising:
-
(a) storing in a key cache structure having a number of entry locations included in the search mechanism, a corresponding number of cache data item structures, each cache data item structure having a number of fields, a first field for storing a unique key value representative of a queued data item and a second field for storing a queue address pointer value designating the location of a queued data item; (b) performing queue management operations using a control mechanism included in the search mechanism to insert a new data item in the queue by first generating a cache index value by converting the key value in the new data item to be enqueued into a pointer value within an established range of values for accessing an entry location in the key cache structure, next determining that the accessed cache data entry is valid, then comparing the key value of a valid queued data item initially specified by the pointer value of the accessed entry location with the key value of the new data item to be enqueued and when the key value of the data item to be enqueued is greater than the key value of the valid queued data item, searching the queue entries from that point until a queued data item having a key value which is equal to the key value of the new data item.
-
Specification