Browse Prior Art Database

Low-Overhead Processor Idle Detection in a Multitasking Operating System

IP.com Disclosure Number: IPCOM000113801D
Original Publication Date: 1994-Oct-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 119K

Publishing Venue

IBM

Related People

Waldron, TC: AUTHOR

Abstract

Disclosed is a method for reducing the processor cycles required to obtain processor idle time by replacing the traditional use of computation-bound low-priority threads with a sampling of the processor based on clock interrupt cycles.

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

Low-Overhead Processor Idle Detection in a Multitasking Operating
System

      Disclosed is a method for reducing the processor cycles
required to obtain processor idle time by replacing the traditional
use of computation-bound low-priority threads with a sampling of the
processor based on clock interrupt cycles.

      Virtually every traditional multitasking operating system has a
program to measure how busy the processor is at any time.  Such
programs vary widely in their forms for presenting processor
utilization data, with the simplest form indicating processor usage
as a percentage over a predefined time interval, while more complex
forms present the data in some form of a color graph which displays
processor utilization as a function of a selectable time interval.

      This tendency to develop programs showing processor utilization
is even more prevalent in priority preemptive operating systems,
where the total absence of a standard user interface returning actual
processor utilization has brought about the development of
computing-intensive programs.  Such programs typically have two or
more scheduleable units, or threads of execution.  The first thread
generally has the highest priority available in the system, while the
second thread generally has the lowest priority thread available in
the system.  The lowest-priority thread, which merely increments a
counter every time it executes, is computation-bound.  The
high-priority thread simply subtracts the maximum count possible,
considering the speed of the system, from the count received from the
low-priority thread.  In effect, this tandem combination uses every
available processor cycle.

      This use of threads having the highest and lowest priority
available in the system exhibits several problems.  Many other
applications also use threads having the lowest priority available in
the system.  For example, the advanced power management application
for portable and laptop computers also uses the lowest priority
available to signal a device driver to conserve the batteries.  Even
the operating system uses the lowest priority for certain
housekeeping functions.  In the virtual memory management routine of
the IBM OS/2* 2.0 operating system, the Ager starts at the lowest
priority to mark unused memory pages for extraction.  This has the
effect of causing the threads at the lowest level to operate in a
round robin fashion, stealing valuable processor cycles needed by
threads doing actual work.  Additionally, advanced operating systems,
such as OS/2 2.0 perform other more subtle processing, permitting the
system to anticipate user actions when there are no actual threads to
schedule.  The presence of a thread using all available processor
cycles prohibits such an anticipated action from ever executing.  The
highest priority of the...