[ Team LiB ] Previous Section Next Section

Power Management

With few advances in battery storage density expected in the near-term future, computer-makers have relied on reducing the power consumption of their notebook computers to extend the time a machine can operate between battery charges.

Engineers can use two basic strategies to reduce the power consumption of computers. They can design circuits and components to use less power, and they can manage the power used by the devices. Managing power needs usually means switching off whatever system components aren't being actively used. Although the two design methods can be used separately, they are generally used in tandem to shrink computer power needs as much as possible.

Microprocessors, the most power hungry of computer circuits, were among the first devices to gain built-in power management. System Management Mode endowed processors with the ability to slow down and shut off unnecessary circuits when they were idle. Similarly, makers of hard disk drives have added sleep modes to spin down their platters and reduce power needs. Most computers also incorporate timers to darken their screens to further conserve power.

Although these techniques can be successful in trimming power demands, they lack a unified control system. In response, the industry developed the Advanced Power Management (APM) interface to give overall control to the power-savings systems in computers. More recently, APM has been updated and augmented by the Advanced Configuration and Power Interface specification.

Advanced Power Management

The Advanced Power Management interface specification was jointly developed by Intel and Microsoft to integrate the control of hardware power-saving features with software control. First published in January 1992, as the APM BIOS Interface Specification, the current version, 1.2, was published in February 1996.

Although nominally a BIOS interface, the APM specification describes a layered control system that manages computer devices to reduce power consumption using both BIOS and API interfaces. To be fully functional, APM requires a compatible BIOS and hardware devices that recognize APM control. In addition, hardware devices may have their own built-in automatic power-management functions that are not controlled by your computer's software. For example, a hard disk drive may automatically power down after a given period without a specific command from your computer. The APM specification tolerates but does not affect these built-in functions.


APM is an overall system feature. Although it has the ability to individually control the features of each device it manages, the basic-design APM controls all devices together to conserve power. It manages system power consumption by shifting the overall operating mode of the computer, called APM states. APM shifts the operating state of the system based on the needs of the system as determined from a combination of software commands and events. The various APM states provide for power savings that occur in five levels (six, if you count normal power-hungry operation). The APM specification gives each of these levels a specific state name.

The first state, Full On, means that the system is operating at full power without any management at all. The APM software is not in control, and no power savings can be achieved. A system without APM or with its APM features disabled operates in Full On state.

When the APM system is active, all devices run in their normal, full-power consumption modes. The system is up and ready to do business, operating in what the specification calls the APM Enabled state.

In the APM Standby state, the microprocessor may stop, and many of the system devices are turned off or operate at reduced power. The system usually cannot process data, but its memory is kept alive and the status of all devices is preserved. When your activity or some other event requires system attention, the computer can rapidly shift from the APM Standby to the APM Enabled state.

In the APM Suspend state, the system shifts to its maximum power-savings mode—most devices that follow the APM standard are switched off, and the microprocessor switches to its lowest power state with its clock turned off. Your computer becomes a vegetable.

Hibernation is a special implementation of the APM Suspend state that allows the system to be switched entirely off and still be restored to the point at which it entered the APM Suspend state. When entering the APM Suspend state, the system saves all its operating parameters. In entering the Hibernation state, the system copies memory and other status data to nonvolatile storage, such as the hard disk, allowing you to switch off memory power. A system event can shift back to the APM Enabled state from APM Suspend or Hibernation, but changing modes from APM Suspend to APM Enabled takes substantially longer than from APM Standby to APM Enabled.

The Off state is exactly what the name implies. Power to the system is entirely off. The computer is more a mineral than vegetable. The only event that restores the system is turning it back on. If you enter the Off state directly—say, by switching your computer off—no status information or memory gets saved. The system must run through the entire boot-up process and starts with a clean slate.


APM adds a layered control system to give you, your software, and your hardware a mechanism to shift states manually or automatically.

The bottom layer of the system is the APM BIOS, which provides a common software interface for controlling hardware devices under the specification. APM specifies that the BIOS have at least a real-mode interface that uses interrupt 15(hex) to implement its functions. In addition, the APM BIOS may also use 16- or 32-bit protected mode using entry points that are returned from the protected-mode connection call using the real-mode interrupt.

The APM BIOS is meant to manage the power of the motherboard. Its code is specific to a given motherboard. Under the APM specification, the APM BIOS can operate independently of other APM layers to effect some degree of power savings in the system by itself. Your computer's operating system can switch off this internal BIOS APM control to manage system power itself, still using the APM BIOS interface functions to control hardware features.

Linking the APM BIOS to your operating system is the APM driver. The driver provides a set of function calls to the operating system, which it translates to BIOS interrupts. The driver is more than a mere translator, however. It is fully interactive with both the BIOS and operating system. For example, the BIOS may generate its own request to power down the system, and the driver then checks with the operating system to determine whether it should permit the power-down operation.

The APM system has a built-in failsafe. The APM driver must interact with the BIOS at least once per second. If it does not, after a second, the BIOS assumes the operating system has malfunctioned and takes self-contained control. The driver can regain control by sending the appropriate commands (interrupts) to the BIOS.

Certain system events termed wake-up calls tell the APM system to shift modes. Interrupts generated by events such as a press of the resume button, the modem detecting an incoming telephone ring, or an alarm set on the real-time clock can command the APM BIOS to shift the system from the APM Suspend to the APM Enabled state.

Advanced Configuration and Power Interface

Customizing the power use of your computer is a natural part of setting up your system. Understanding that, Intel, Microsoft, and Toshiba decided that the best way to integrate power management with your system was to combine it with the computer's setup facilities and to give both a common interface. The result is called the Advanced Configuration and Power Interface, a formal specification that was first published by the threesome as ACPI version 1.0 in December 1996.

ACPI is an integral part of the Microsoft-inspired OnNow initiative, which was created to minimize the delays inherent in starting up and shutting down a computer burdened with megabytes of operating system overhead, to let the computer run tasks while it appears to be off, and to lower the overall power requirement of the computer. At the time OnNow was proposed, operating systems required time to test the host computer, to check out Plug-and-Play devices, and to set up their structures. These functions required a lengthy period to carry out, so booting your system took so long it seemed to be warming up from absolute zero. OnNow was designed to eliminate that wait. The first inkling of OnNow appeared in Windows Me, and Windows XP continues to develop the concept.

OnNow also sought to integrate the power and configuration interfaces of modern (meaning Windows) operating systems so that programmers can write to a common standard.

To bring these features to life, the OnNow design moves the operating system to the center of power management using ACPI and builds a new table structure for storing and organizing configuration information.

As a power-management system, the ACPI specification can accommodate the needs of any operating system, integrating all the necessary power-management features required in a computer, from the application software down to the hardware level. It enables the operating system to automatically turn on and off and adjust the power consumption of nearly any peripheral, from hard disk drives to displays to printers. It can reach beyond the computer to other devices that may be connected into a single system some time in the future—televisions, stereos, VCRs, telephones, and even other appliances. Using the Smart Battery specification, under ACPI the operating system takes command of battery charging and monitoring. It also monitors the thermal operation of the system, reducing speed or shutting down a computer that might overheat.

The ACPI standard itself defines the interface for controlling device power and a means of identifying hardware features. The interface uses a set of five hardware registers that are controlled through a higher-level application programming interface through the operating system. The descriptive elements identify not only power management but also device features through a nested set of tables. The ACPI standard supplements Plug-and-Play technology, extending its existing structure with an architecture-independent implementation, and replaces the Plug-and-Play BIOS with a new ACPI BIOS.

Soft Off

The fundamental and most noticeable change made by ACPI is the power button on the front of new computers. In systems equipped to handle ACPI, this is a soft switch or set of two switches. Although one of these switches may be labeled "Power" and imply that it is an on/off switch, in the ACPI scheme of things the power switch does not actually switch the power to the system on and off. Rather, it sends a command to the system to shut itself off—and not exactly what you think is off.

Using the front panel Off button actually puts the computer in a new mode called Soft Off. In this mode, the computer acts like you've shut it off and requires rebooting to restart it. But it doesn't remove all power from the system. A slight bit of power continues to be supplied to the motherboard and expansion boards, enabling them to monitor external events. For example, a network board will still listen to network traffic for packets targeted at it. A modem or fax board may lie in wait for a telephone call. Or you may set a time (such as midnight) at which the tape backup system starts. When any of these designated external events occurs, the computer automatically switches itself back on to deal with it.

ACPI envisions that some manufacturers will also put a sleep switch (or standby button) on the front panel or on the keyboard. Pressing it puts the computer in a sleep mode that uses somewhat more power than Soft Off but allows the system to resume operation more quickly.


As with APM, the ACPI design works by shifting modes called ACPI states. The states differ substantially from those in APM. Under ACPI, four basic types of states are defined—Global, Special Sleep, Microprocessor, and Device—and these can be further subdivided. Most importantly, ACPI lets the operating system control all aspects of the power consumption of a computer by shifting the single devices or the entire system between these states.

The ACPI Global states most closely correspond to the APM modes, affecting the entire operation of the computer and how you deal with it. Formally, the states are termed G0 through G3, but they are effectively the same as the APM states, with the addition of Soft Off. The chief operational difference between them is how long it takes your computer to move from each state to normal operation, which can be instantaneous in Sleeping state (corresponding to Suspend), a bit longer in Soft Off (similar but not identical to Hibernation), and a full boot-up from Power Off. Table 31.4 lists the Global ACPI states.

Table 31.4. ACPI States
State Name Appearance Recovery Time
G0 Working state Normal execution Zero
G1 Sleeping state No activity Fast
G2 Soft Off No activity Slow
G3 Power Off No activity Boot-up

Under ACPI, each device, such as your hard disk, modem, or display screen, operates under several similar states (but termed with the letter D) corresponding to various power-saving modes. Similarly, the microprocessor (designed with state names starting with C) can switch to various power-saving states. As a device is needed, your operating system can switch it on or off using the ACPI protocols. Most of these changes happen invisibly—you may only detect a slight (or longer) lag as a device powers up from a lower state.


To handle its configuration function, ACPI must manage a tremendous amount of data, not only about the power needs and management capabilities of the system but also describing the features available for all the devices connected to the system. ACPI stores this information in a hierarchy of tables.

The overall master table is called the Root System Description Table. It has no fixed place in memory. Rather, upon booting up, the BIOS locates a pointer to the table during the memory scan that's part of the boot-up process. The Root System Description Table itself is identified in memory because it starts with the signature "RSDT." Following the signature is an array of pointers that tells the operating system the location of other description tables that provide it with the information it needs about the standards defined on the current system and individual devices.

One of these tables is called the Fixed ACPI Description Table. In it the operating system finds the base address of the registers used for controlling the power-management system. In addition, the Fixed ACPI Description Table also points to the Differentiated System Description Table, which provides variable information about the design of the base system. Some of the entries in this table are differentiated definition blocks, which can contain data about a device or even a program that sets up other structures and defines new attributes. ACPI defines its own languages for programming these functions.

Energy Star

Rather than a technology, the Energy Star standard is a goal. The Energy Star standard itself was created by the United States Environmental Protection Agency in 1992 with the goal of encouraging manufacturers to create business equipment that minimizes power consumption. Since then, the standard has been adopted by Japan, New Zealand, and Sweden.

Energy Star is a certification program that allows compliant computers and peripherals (as well as other devices unrelated to computers) to wear a certification badge. The program specifically covers computers, monitors, printers, fax machines, copiers, scanners, and multifunction devices—as well as telephones, home appliances (including washing machines), and even entire buildings. Equipment conforming to the Energy Star standard must meet strict guidelines on power consumption published by the Environmental Protection Agency.

Manufacturers have a strong incentive to embrace the Energy Star standard and put the label on their products—some businesses and many federal contracts require that new PC equipment meet the Energy Star standards.

All that said, the actual Energy Star standards for PCs are quite simple. Energy Star version 2.0, which applies to products shipped after October 1, 1995, asks only that a PC or monitor be able to switch to a low-power mode that consumes less than 30 watts after 15 to 30 minutes of inactivity (a default you are allowed to adjust). Combination monitor-and-PC units are allowed the full 60 watts. Printers able to generate seven or fewer pages per minute must reduce their drain to 15 watts after 15 minutes; 14 or fewer ppm, 30 watts after 30 minutes; faster or high-end color printers, 45 watts after an hour.

You can find out more about the Energy Star program at its Web site, www.energystar.gov.

    [ Team LiB ] Previous Section Next Section