Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Efficient Algorithm for Operating System Timer Management

IP.com Disclosure Number: IPCOM000107523D
Original Publication Date: 1992-Mar-01
Included in the Prior Art Database: 2005-Mar-21
Document File: 2 page(s) / 75K

Publishing Venue

IBM

Related People

Blades, JA: AUTHOR [+3]

Abstract

The operating system timer management algorithm disclosed will provide better accuracy of timed events, more flexibility, and better efficiency via reduced path length. Better accuracy is provided by implementing a real-time timer to manage timed events. The flexibility exists to adjust the timer granularity to better meet requirements. The algorithm is faster because the code path length has been reduced by one third.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Efficient Algorithm for Operating System Timer Management

       The operating system timer management algorithm disclosed
will provide better accuracy of timed events, more flexibility, and
better efficiency via reduced path length. Better accuracy is
provided by implementing a real-time timer to manage timed events.
The flexibility exists to adjust the timer granularity to better meet
requirements. The algorithm is faster because the code path length
has been reduced by one third.

      To reduce path length a better method of enqueuing a timer
element onto the timer queue was implemented.  When a new timer is
requested, the steps to enqueue it are as follows.  First, the stop
value of the new timer element is computed by adding the requested
delay and the timer count register value.  The timer count register
is a real-time counter incrementing at a small time value, "tick"
(currently ten microseconds).  Next, the stop value of the new timer
element is compared with the stop value of the last timer element on
the queue.  If the new element's stop value is less then the last
element's stop value, a current element's backward pointer is
followed to the second to last timer element and the test is done
again.  This step is repeated until the new element's stop value is
greater then the current element's stop value.  The loop is then
exited without changing the current element pointer.  The new element
is enqueued behind the current element pointer by adjusting forward
and backward pointers.  If the new element happens to be at the front
of the queue, its stop value is loaded into the timer compare
register.  The value in the timer compar...