Power management is defined as the capability of the system to automatically enter power-conserving modes during periods of inactivity. Two main classes of power management exist. The original standard was called Advanced Power Management ( APM ) and has been supported by most systems since Intel first released the 386 and 486 processors. More recently, a new type of power management called Advanced Configuration and Power Interface (ACPI) was been developed and began appearing in systems in 1998. Most systems sold in 1998 or later support the more advanced ACPI type of power management. In APM, the hardware does the actual power management, and the operating system or other software has little control. With ACPI, the operating system and BIOS now handle the power management instead of the hardware. This makes the control more centralized and easier to access, and it enables applications to work with power-management functions. Various components in a computer do not need to run continuously while the system is turned on. Mobile systems often conserve battery power by shutting down these components based on the activities of the user . If, for example, you open a text file in an editor and the entire file is read into memory, there is no need for the hard drive to spin while you are working on the file. After a certain period of inactivity, a power-management system can park the hard drive heads and stop the platters from spinning until you save the file to disk or issue any other command that requires drive access. Other components, such as floppy and CD-ROM drives and PC cards, can also be powered down when not in use, resulting in a significant reduction of the power needed to run the system. Most portables also have systemic power-saver modes that suspend the operation of the entire system when it is not in use. The names assigned to these modes can differ, but there are usually two system states. They differ in that one continues to power the system's RAM whereas the other does not. Typically, a "Suspend" mode shuts down virtually the entire system (except for the memory) after a preset period of inactivity. This requires only a small amount of power and allows the system to be reawakened in a few seconds, rather than having to go through the complete boot process. When in this "Standby" mode, the memory is maintained by the main battery, or the standby battery if the main battery is dead or you are changing the main battery. The standby battery usually powers the RAM for a few minutes to a few hours or more in some models. For this reason, it is important that you save any work before suspending the system. Portable systems usually have a "Hibernate" mode as well, which writes the current contents of the system's memory to a special file on the hard disk and then shuts down the system, erasing memory in the process. The Hibernate mode does not require any power from either the main or standby batteries, so a system can theoretically hibernate indefinitely. When the computer is reactivated (powered up), it reads the contents of the hibernation file back into memory, restoring the system to exactly the condition it was in when hibernation started, and then work can continue. The reactivation process takes a bit longer than a normal resume from Suspend mode, but the system conserves more power by shutting down the memory array. Either mode is much faster than cold-booting the system. Note The memory swap file used for Hibernate mode might, in some machines, be located in a special partition on the hard drive dedicated to this purpose. If you inadvertently destroy this partition, you might need a special utility from the system manufacturer to re-create the file. Newer operating systems such as Windows Me, 2000, and XP create their own hibernation files. In most cases, these functions are defined by the APM standard, a document developed jointly by Intel and Microsoft that defines an interface between an operating system's power-management policy driver and the hardware-specific software that addresses devices with power-management capabilities. This interface is usually implemented in the system BIOS. Advanced Power ManagementAdvanced Power Management (APM) is a specification jointly developed by Intel and Microsoft that defines a series of interfaces between power management “capable hardware and a computer's operating system. When it is fully activated, APM can automatically switch a computer between five states, depending on the system's current activity. Each state represents a further reduction in power use, accomplished by placing unused components into a low-power mode. The five system states are as follows :
APM requires support from both hardware and software to function. Newer systems incorporate software-controlled power-on and power-off capability built in to the hardware. Manufacturers are also integrating the same sort of control features into other system components, such as motherboards, monitors , and disk drives. Operating systems that support APM trigger power-management events by monitoring the activities performed by both the computer user and the applications running on the system. However, the OS does not directly address the power-management capabilities of the hardware. A system can have many hardware devices and many software functions participating in APM functions, which makes communication difficult. To address this problem, both the operating system and the hardware have an abstraction layer that facilitates communication between the various elements of the APM architecture. The operating system runs an APM driver that communicates with the various applications and software functions that trigger power-management activities, while the system's APM-capable hardware devices all communicate with the system BIOS. The APM driver and the BIOS communicate directly, completing the link between the OS and the hardware. Therefore, for APM to function, support for the standard must be built in to the system's individual hardware devices, the system BIOS, and the operating system (which includes the APM driver). Without all these components, APM activities cannot occur. Advanced Configuration and Power InterfaceAs power-management techniques continue to develop, maintaining the complex information states necessary to implement more advanced functions becomes increasingly difficult for the BIOS. Therefore, another standard has been developed by Intel, Microsoft, and Toshiba called Advanced Configuration and Power Interface (ACPI) , which is designed to implement power-management functions in the operating system. Microsoft Windows 98, Me, 2000, and XP automatically use ACPI if ACPI functions are found in the system BIOS when these operating systems are first installed. The need to update system BIOSes for ACPI support is one reason many computer vendors have recommended performing a BIOS update before installing Windows 98, Me, 2000, or XP. If your BIOS and operating system support ACPI, full power-management control is now done by the operating system rather than by the BIOS. ACPI is intended to offer a single place for power-management and system-configuration control; in the past, with APM you would often be able to configure power-management settings in the BIOS setup as well as the operating system. This has often resulted in settings that overlap or conflict with each other. ACPI is supported in newer systems in lieu of APM. Tip If, for any reason, you find that power-management activities cause problems on your system, such as operating system freeze-ups or hardware malfunctions, the easiest way to disable APM is through the system BIOS. Most BIOSes that support APM include an option to disable it. This breaks the chain of communication between the operating system and the hardware, causing all power-management activities to cease . Although you also can achieve the same end by removing the APM driver from the operating system, Windows 9x's Plug and Play (PnP) feature detects the system's APM capabilities whenever you restart the computer and attempts to reinstall the APM driver. If you have a newer system with ACPI, you can disable the power-management settings via the Power Management icon in the Windows control panel. Placing power management under the control of the OS enables a greater interaction with applications. For example, a program can indicate to the operating system which of its activities are crucial, forcing an immediate activation of the hard drive, and which can be delayed until the next time the drive is activated for some other reason. For example, a word processor may be set to automatically save files in the background, which an OS using ACPI can then delay until the drive is activated for some other reason, resulting in fewer random spin-ups of the drive. ACPI goes far beyond the previous standard, Advanced Power Management (APM), which consisted mainly of processor, hard disk, and display control. ACPI not only controls power but also all the Plug and Play hardware configuration throughout the system. With ACPI, system configuration (Plug and Play) and power-management configuration are no longer controlled via the BIOS setup; they are instead controlled entirely within the operating system. ACPI enables the system to automatically turn internal peripherals on and off (such as CD-ROM drives, network cards, hard disk drives, and modems) as well as external devices such as printers, monitors, or any devices connected to serial, parallel, USB, video, or other ports in the system. ACPI technology also enables peripherals to turn on or wake up the system. For example, a telephone answering machine application can request that it be able to respond to answer the telephone within 1 second. Not only is this possible, but if the user subsequently presses the power or sleep button, the system will only go into the deepest sleep state that is consistent with the ability to meet the telephone answering application's request. ACPI enables system designers to implement a range of power-management features that are compatible with various hardware designs while using the same operating system driver. ACPI also uses the Plug and Play BIOS data structures and takes control over the Plug and Play interface, providing an operating system “independent interface for configuration and control. ACPI defines several system states and substates . There are four Global System states labeled from G0 through G3, with G0 being the fully operational state and G3 being mechanically turned off. Global System states are immediately obvious to the user of the system and apply to the entire system as a whole. Within the G0 state, there are four CPU Power states (C0 “C3) and four Device Power states (D0 “D3) for each device. Within the C0 CPU Power state there are up to 16 CPU Performance states (P0 “P15). Device power states are states for individual devices when the system is in the G0 (Working) state. The device states may or may not be visible to the user. For example, it may be obvious when a hard disk has stopped or when the monitor is off; however, it may not be obvious that a modem or other device has been shut down. The device power states are somewhat generic; many devices do not have all four power states defined. Within the G1 Global Sleep state, there are four Sleep states (S1 “S4). The G2 Global Soft Off state is also known as the S5 Sleep state , in which case the system is powered off but still has standby power. Finally, G3 is the Mechanical Off state, where all power is disconnected from the system. The following list shows the definitions and nested relationship of the various Global, CPU/Device Power, and Sleep states:
Figure 7.4 shows the relationships between the various ACPI Global, Device/CPU, and Sleep states. Figure 7.4. ACPI Global, Device/CPU, and Sleep states.
In normal use, a system alternates between the G0 (Working) and G1 (Sleeping) states. In the G1 (Working) state, individual devices and processors can be power managed via the Device Power (D1 “D3) and Processor Power (C1 “C3) states. Any device that is selectively turned off can be quickly powered on in a short amount of time, from virtually instantaneous to only a few seconds (such as a hard disk spinning up). When the system is idle (no keyboard or mouse input) for a preset period of time, the system enters the Global G1 (Sleeping) state, which means also selecting one of the S1 “S4 sleep states. In these states the system appears to be off, but all system context and status are saved, enabling the system to return to exactly where it left off, with varying amounts of latency. For example, returning to the G0 (Working) state from the G1/S4 (Hibernation) state requires more time than when returning from the G1/S3 (Suspend) state. When the user presses the power button to turn the system off, or if he or she selects Shutdown via the operating system, the system enters the G2/S5 (Soft Off) state. In this state no context is saved, and the system is completely off except for standby power. Fully disconnecting AC or battery power causes the system to be in the Global G3 (Mechanical Off) state, which is the only state in which the system should be disassembled. During the system setup and boot process, ACPI performs a series of checks and tests to see whether the system hardware and BIOS support ACPI. If support is not detected or is found to be faulty, the system typically reverts to standard Advanced Power Management control, which is referred to as legacy power management under ACPI. If problems with power management are detected during bootup , the system may lock up with either a red or blue screen showing an ACPI error code. A red screen indicates that the problem is probably related to hardware or the BIOS. A blue screen indicates that the problem is probably related to software or is an obscure problem. The ACPI error codes are described in Table 7.3. Table 7.3. ACPI Error Codes
Virtually all these errors are the result of partial or incomplete ACPI implementations or incompatibilities in either the BIOS or device drivers. If you encounter any of these errors, contact your motherboard manufacturer for an updated BIOS or the device manufacturers for updated drivers. APM BIOS Power Management MenuMost of the BIOS Setup settings related to power management are for APM mode, which will be used only if you run legacy operating systems that are not ACPI aware. In APM mode, BIOS reduces power consumption by spinning down hard drives and reducing power to or turning off monitors that comply with Video Electronics Standards Association (VESA) and Display Power Management Signaling (DPMS). While in Standby mode, the system can still respond to external interrupts, such as those from keyboards, mice, fax/modems, and network adapters. For example, any keyboard or mouse activity brings the system out of Standby mode and immediately restores power to the monitor. If both the motherboard BIOS and operating system support ACPI, the operating system uses ACPI to take over the power management, even overriding the APM BIOS settings. Some systems feature a number of different power-management settings in their BIOSes, which are especially important if you are not using an ACPI-aware operating system. Some of the more common settings are shown in Table 7.4. Table 7.4. Typical Power-Management Settings
Using the power-management settings in the BIOS Setup is especially useful if you are using an older operating system or one that is not ACPI aware, such as Windows 95, DOS, or Linux. If you are using an ACPI-aware operating system such as Windows 98/Me, 2000, or XP, it is better to control the power-management settings through the OS. Many laptop systems also include their own custom supplemental utility software for power management or control, which can add to the operating system ACPI control. |