System and method for optimizing insertions for timer queue operations
AssigneeUnisys Corporation
InventorsSalil Dangi, Roger Andrew Jones
Life of this patent
Estimating the term…
Abstract
A circular queue is created with N Fixed Timer Entries associated with a specific address pointer for each entry. An association is developed to relate each fixed entry pointer to its just previous pointer and to its just next occurring pointer. A selected transient New Timer Entry can be inserted between any two selected adjacent Fixed Timer Entries without need to sequence serially through the entire set of fixed entries.
Claims6
In a system holding a CPU with a heap memory and disk memory connected to a computer having access to multiple application programs, a method for creating a circular queue comprising the steps of:
- (a) creating a timer queue index array TQ of size N where N represents a series of Fixed Timer Entries (FTEs) which are indexed TQ [i], where i ranges from 0 to (N−1) wherein said creating includes:
- (a1) initiating the allocation of Fixed Timer Events by assigning the initial FTE to the index of “0” so that this initial FTE becomes indexed as TQ [0];
- (a2) counting one timer tick and setting the next FTE to an index of “1” so as to form a timer queue index TQ[1];
- (a3) counting a sequence of timer ticks until the last FTE becomes the timer index TQ[N−1];
- (a4) assigning the last FTE TQ[N−1] to revert back to the first FTE TQ [0] thus to establish a recurring loop event for the Fixed Timer Events (FTEs);
- (b) arranging said timer queue index array TQ so that the final FTE, TQ[N−1], will then revert to the first FTE TQ[0] to form a circular queue of N Fixed Timer entries.
The method of claim which includes the step of:
- (a) counting each index (i) in sequence with a timer counting means and utilizing a pointer (Pi) which points to each next Fixed Timer Event with the consumption of one timer-tick.
In a system holding a CPU with a heap memory and disk memory connected to a computer having access to multiple application programs, a method for creating a circular queue comprising the steps of:
- (a) creating a timer queue index array TQ of size N where N represents a series of Fixed Timer Entries (FTEs) which are indexed TQ [i], where i ranges from 0 to (N−1);
- (b) arranging said timer queue index array TQ so that the final FTE, TQ[N−1], will then revert to the first FTE TQ[0] to form a circular queue of N Fixed Timer entries;
- (c) counting each index (i) in sequence with a timer counting means and utilizing a pointer (Pi) which points to each next Fixed Timer Event with the consumption of one timer-tick;
- (d) initiating a command sequence for insertion of a New Timer Entry (NTE) to be inserted between a first FTEa and a second next-consecutive FTEb, wherein said initiating includes:
- (d1) locating the present moment pointer to find out how many timer ticks it resides from index (0), to establish the current time pointer Pi;
- (d2) allocating the number “X” of timer ticks after which the New Timer Entry (NTE) is to be inserted;
- (d3) counting timer ticks which will count “X” ticks beyond the current Pointer Pi to locate the Fixed Timer Event (FTE) at index Pi+“X”;
- (d4) creating a pointer in the memory heap which assigns the NTE (new timer entry) as the next event after the prior located FTE (Pi=+X−1);
- (d5) creating a pointer to assign the next event after the NTE to be FTE (Pi=+X).
- (e) accomplishing said NTE (New Timer Entry) insertion between FTEa and FTEb without consuming any timer tick counts.
Dependencies are inferred from the claim text.