beautypg.com

Power management – Juniper Systems Allegro DOS Manual User Manual

Page 120

background image

120 Allegro DOS Owner’s Manual

Power Management

The Allegro has several power management functions integrated
within the BIOS. Applications can use these functions to greatly
enhance performance and operating time between battery charges.
There is an internal automatic Power Manager, which can be set off
or on, and fi ve levels of performance, from 0 (miser) to 4 (hyper).

There is a trade-off between battery operating time and performance.
As the processor speed is increased the Allegro uses more power,
causing the batteries to drain more quickly. For optimal power
management, the processor should be run at high speed only when
there is actual processing to be done, and run at low speed or
stopped (sleep mode) the rest of the time. It is analogous to driving
a car. Think of the processor as the car engine and the battery as the
car fuel tank. When you press the gas pedal, the engine runs faster
and in turn uses fuel more quickly.

On most computers that run DOS, the processor is running at full
throttle all of the time, even when there is no work to be done. While
the processor is waiting for input, it is running at full speed in circles
(programmers call this a spin loop). This is a tremendous waste of
power, yet when DOS was designed desktop computers did not run
on batteries and so power saving was not a concern. It is a serious
problem in a battery operated system. Properly controlling CPU
power during idle times has a dramatic effect on battery operating
time. It can be handled at either the BIOS/operating system level, or
at the application level.

Starting and stopping the processor as needed is a simple concept,
but can be diffi cult to implement effectively. The problem is
determining when the processor is not doing any real work and can
be safely shut down. When writing an application, the programmer
usually knows when the processor is idly waiting for input, and by
using Allegro’s power management API can design a very power
effi cient program. If the program has not been designed to use
power management, the Allegro BIOS attempts to manage power
automatically. However, the BIOS does not know for sure what the
processor is doing. It can only guess, based on the level of activity it
can see. For this reason, it is better to design power management into
the program itself.