METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS
The invention is directed towards minimizing power consumption in computer systems. One embodiment of the invention is a power management system that is used for a computer system that has at least one device and one power domain. This embodiment uses two different power managers to manage the power consumption of the device and the power domain. Specifically, this embodiment has (1) a first power manager that determines when to change power state of the device, and (2) a second power manager that determines when to change power state of the power domain. Each of these power managers decides to change the power state of its corresponding device or domain based on information from several different sources. These sources can include power-management clients and power managers of related domains or devices.
This application is a continuation of U.S. patent application Ser. No. 14/618,975, filed on February 10, 2015 entitled “METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” which is a continuation of U.S. patent application Ser. No. 14/167,720, filed on Jan. 29, 2014 entitled “METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No. 8,990,598 issued on Mar. 24, 2015, which is a continuation of U.S. patent application Ser. No. 13/488,440 filed Jun. 4, 2012 entitled “METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No. 8,650,417 issued on Feb. 11, 2014, which is a continuation of U.S. patent application Ser. No. 13/047,771, filed Mar. 14, 2011, entitled “METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No. 8,214,669 issued Jul. 3, 2012, which is a continuation of U.S. patent application Ser. No. 12/400,777 filed Mar. 9, 2009 entitled “METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No. 7,925,905 issued Apr. 12, 2011, which is a continuation of U.S. patent application Ser. No. 10/934,075 filed Sep. 3, 2004, entitled “ METHOD AND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No. 7,519,838 issued Apr. 14, 2009, which is a continuation of U.S. patent application Ser. No. 09/696,908 filed Oct. 26, 2000 entitled “A HIERARCHICAL POWER MANAGEMENT SYSTEM FOR CONTROLLING THE POWER STATES OF INDIVIDUAL DEVICES AND DOMAINS,” now U.S. Pat. No. 6,802,014 issued Oct. 5, 2004, each of which are incorporated herein by reference in their entirety.
FIELDNumerous power management schemes have been proposed for managing the power consumption of computer systems. Such schemes typically power down idle devices in order to save power and reduce heat. Power conservation is especially important in portable computers that need to maximize their battery life.
BACKGROUNDThe power manager 105 is a centralized piece of software that controls the power consumption of the devices 120. Specifically, this manager communicates with device drivers 115 and with certain devices 120, in order to receive information about the operational states of the devices 120. Based on these operational states and on the power manager's knowledge of the hardware devices, the power manager determines when to change each device's power state.
The power management clients 110 can also order the power manager to change the device power states. For instance, the power management clients might order the power manager to put the system to sleep based on a user's manual request or the computer's automated sleep setting. In portable computers, the power management clients 110 might also request the power manager to put the system to sleep when the battery level is critically low. As shown in
The centralized power management scheme of
Therefore, there is a need in the art for a distributed power management method. Ideally, this method should simplify the structure and operation of the power management system, and impose minimal development and maintenance requirements.
SUMMARYThe invention is directed towards minimizing power consumption in computer systems. One embodiment of the invention is a power management system that is used for a computer system that has at least one device and one power domain. This embodiment uses two different power managers to manage the power consumption of the device and the power domain. Specifically, this embodiment has (1) a first power manager that determines when to change power state of the device, and (2) a second power manager that determines when to change power state of the power domain. Each of these power managers decides to change the power state of its corresponding device or domain based on information from several different sources. These sources can include power-management clients and power managers of related domains or devices.
The novel features of the invention are set forth in the appended claims. However, for purpose of explanation, several embodiments of the invention are set forth in the following figures.
In the following description, numerous details are set forth for purpose of explanation. However, one of ordinary skill in the art will realize that the invention may be practiced without the use of these specific details. In other instances, well-known structures and devices are shown in block diagram form in order not to obscure the description of the invention with unnecessary detail.
The invention is directed towards minimizing power consumption in computer systems. This minimization, in turn, saves power, reduces heat, and maximizes battery life in portable computers. The invention minimizes power consumption by altering the power usage of “devices” and “power domains,” in a manner that does not interfere with the use of the computer systems.
A “device” is a hardware entity in the computer system. Disk drives and displays are examples of devices. A device typically has two or more power states. When a device's power is dependent on the system power, the device typically maintains some kind of state that needs to be saved and restored across changes in system power.
Two power states that devices often have are (1) the “on” state, where the device uses maximum power and has complete functionality, and (2) the “off” state, where the device uses no power and has no capability. Some devices also have other intermediate power states. In a reduced power state, a device (1) might be usable but at some lower level of performance or function, or (2) might not be usable but still retain some configuration or state.
An internal disk drive is an example of a device with more than the two simple power states. In its highest state, it is completely on. The disk drive can also be placed in the next lower state by turning off the drive motor. There is no state or configuration that needs to be saved during this transition. The drive electronics can also be turned off by turning off the entire domain, which supplies the drive. This transition does require state and configuration saving.
A “power domain” is a switchable source of power in the computer system. Such a domain typically provides power for some number of devices or domains, which are members of the power domain. When a power domain is off, all of its members are also off Like devices, each power domain typically has at least two power states, on and off, and it may have additional intermediate states in which its members have some reduced capability.
Power domains are often hierarchical. In other words, one power domain may contain other child power domains, each of these child power domains may contain other child domains, and so on. In some embodiments of the invention, the hierarchical power schemes have one power domain, called the root power domain that represents the main power of the computer system. In other embodiments, however, the hierarchical power schemes have multiple root power domains that define multiple sources of power in a computer system. Such multiple root power domains can define multiple dependent or independent hierarchical power relationships.
Some embodiments of the invention are distributed and hierarchical power management architectures for controlling the power consumption of computer systems.
In some cases, the power manager 315 also monitors the usage of the device. In addition, the power manager 315 is responsible for directing the power-controlling driver 310 to instruct the device 305 to switch power states. The power manager determines when to change the device's power state. The power manager makes this determination based on information that it receives from the driver, from its device's power domain, or from some component (e.g., a power management client) of the computer system.
For instance, when the device 305 becomes idle, the power manager recognizes the operational status of the device through the-power-controlling driver 310 (e.g., the driver notifies the power manager of the idle status of the device). After analyzing this operational status, the power manager might decide that the device can tolerate a lower power state, and thereby it might instruct the power-controlling driver to lower the device's power state.
A power manager might also decide to change its device's power state when the power manager receives information (such as information about the user's keyboard or mouse activity) from a power management client. In addition, the power manager might also instruct the power-controlling driver 310 to change its device's power state, when it receives new output power characteristics for the device's power domain.
In some embodiments, a device's power manager receives the output power characteristics for the device's power domain or domains from power managers of the power domain or domains. A power domain's power manager is presented in
One difference between the power management of the power domain 405 and the device 305 is that the power-controlling driver 410 and power manger 415 alter the character of the power that supplies the members of the power domain, instead of altering the power consumption of a device. Another difference is that, in some embodiments of the invention, the power manager 415 and power-controlling driver 410 of a power domain do not have any idle judgment (i.e., they do not decide whether their power domain is idle or not). In these embodiments, (1) the power domain's manager 415 only decides to raise and lower power in its domain based on requests from its members (i.e., the power manager's of its power domain's children), and if applicable, its parent power domain, and (2) the power-controlling driver 410 directs its domain to switch power states. Typically, the power manager 415 maintains the power domain in the lowest state that all of its children (I.e., its member devices and/or power domains) can tolerate.
In some embodiments, the power managers 315 and 415 and the power-controlling drivers 310 and 410 are data objects subclassed from a common class. In some of these embodiments, the methods associated with these objects perform power management procedures that allow the objects to communicate with each other in order to control the computer system's power usage.
Moreover, in some embodiments, the power managers are linked to form a hierarchy that mimics the computer system's power hierarchy. Specifically, in these embodiments, the power managers of the power domains link to the power managers of their parent and child domains and devices in the power hierarchy. Similarly, the power managers of the devices link to the power managers of their parent power domains. Consequently, in these embodiments, the power managers form a hierarchy that resembles the system's power hierarchy.
In this object hierarchy, the device power manager objects 315 are linked to the devices 305 (in the hierarchical power domain 200 of
As shown in
The power-management clients for the root node typically are concerned with the power usage of the entire computer system. In other words, the calls from these clients often direct the root object to inform its child power-manager objects to turn the system on or off, or to put the system to sleep. The power-management clients for the non-root nodes, on the other hand, are typically concerned only about the power consumption of their respective domains or devices.
As further shown in
This structure data 600 also includes fields 615 and 620 that respectively store the child's current input power requirements, and the parent's current output power characteristics. As further described below, the parent power-manager object stores the child's input power requirements in the connecting object, while the child's power-manager object stores the parent's current output power characteristics in the connecting object.
As shown in
In some embodiments, the input power requirements specify the type of power-draining signals that a device or domain needs in order to operate in a particular state, while the output power characteristics specify the type of power-draining signals that a domain can provide in a particular state. Power-draining signals are any type of signals that drain the computer system's power. Clock signals and operational power signals (e.g., voltage signals) are examples of such power-draining signals.
Some embodiments of the invention power down the computer system in one of two ways. First, they power down the system when the devices have been inactive for a particular duration of time. Second, they power down the system when a power management client orders the root power manager to do so.
Once the process 800 starts, it initially determines (at 805) whether the activity flag of the power manager object has been set. This flag is reset at boot-up and at the end of process 800. The power-controlling driver sets this flag if the device is active (i.e., has at least one activity) during the time interval measured by the timer. Hence, the process 800 uses the timer and the activity flag to determine whether the device has been idle for duration of time. One of ordinary skill will understand that alternative techniques can also be used to determine the idleness of devices. For instance, instead of using activity flags, some embodiments use predicative methods, while others reset the activity timer after each activity. Also, in some embodiments, the power-management client instructs the device's power manager that the device is no longer needed.
If the process 800 determines (at 805) that there was activity during the predetermined time interval, the process transitions to 830, where it resets the timer and the activity flag. On the other hand, if the process determines (at 805) that there was no activity (i.e., that the activity flag was not set), the process determines (at 810) whether the device is in its lowest power state. The process makes this determination by comparing the current power state value of field 705 to the lowest power state value of the device. Some embodiments define the lowest power state to be state 0. Hence, in these embodiments, the process determines (at 810) whether the current power state variable equals 0.
If the device is in its lowest power state, the process transitions to 830 to reset the timer and the activity flag. Otherwise, the process asks (at 815) the power-controlling driver to reduce the power of the device to the next lowest state. Next, the process decrements (at 820) the current power state variable by 1.
The process then sends (at 825) its device's input power requirements in its current, decremented state to its parent power manager or managers. The process retrieves its device's input power requirement in its current, decremented power state from the power array entry 765 that corresponds to the current, decremented power state. The process next transitions to 830 to reset the timer and the activity flag. The process then ends.
After receiving the new input power requirements, the process 900 initially (at the process' power manager, and stores the resulting value in the connecting object for the child. Next, the process (at 910) (1) retrieves all the input power requirements of its children from their corresponding connecting objects, (2) adds the retrieved values, and (3) stores this sum in the aggregate field 720 of its power manager's data structure.
The process then identifies (at 915) the power state corresponding to the aggregate input power requirement that the process computed at 910. In other words, at 915, the process identifies the power array entry 765 that has an output power characteristic equal to the aggregate input power requirement generated at 910. The position of the identified entry specifies the power state for the process' power manager.
The process then determines (at 920) whether the power state identified at 915 is different from the current power state, which is stored in field 705 of data structure 700. If not, the process ends. Otherwise, the process instructs (at 925) its power-controlling driver 410 to change its domain's power level to the power state identified at 915.
Next, the process (at 930) sets the current power state equal to the new power state identified at 915, and stores the current power state in field 705 of the data structure 700. If the process' power manager is not the root power manager, the process sends (at 935) its domain's input power requirements for the power state identified at 915, to its parent power manager or managers. The process retrieves its domain's new input power requirement from the power array entry 765 that corresponds to the current, decremented power state. After notifying its parent power manager or managers, the process ends.
Once the process 1000 starts, it initially notifies (at 1005) each of the root's child power managers that the power will change. In its notification, the process provides the output power characteristics of the root power node in the upcoming reduced power state. The process then transitions to 1010, where it remains until the root power manager receives acknowledgments from each of its child power managers that their domains or devices can tolerate the upcoming reduced power state. In some embodiments, each child power manager provides its input power requirements in the reduced power state when it wants to acknowledge that it can tolerate this power state. The root power manager then analyzes the received input power requirements to deduce that its child power managers can tolerate the reduced power state.
Once the process 1000 receives acknowledgments from all its child power managers, it switches (at 1015) to that reduced power state, and then ends. To switch to the new power state, the process 1000 (1) instructs its corresponding power-controlling driver 410 to change the root domain's power level to the reduced power state, (2) changes its current power state value to the reduced power state, and (3) stores this value in field 705 of its data structure 700.
Once the process 1100 starts, the non-root power process initially (at 1105) masks out the portion of the parent's output power characteristic that does not relate to the process' power manager, and stores the resulting value in the connecting object for the parent. Next, the process (at 1110) (1) retrieves all the output power characteristics of its parents from their corresponding connecting objects, (2) adds the retrieved values, and (3) stores this sum in the aggregate field 715 of its power manager's data structure.
The process then identifies (at 1115) the power state corresponding to the aggregate output power characteristic computed at 1110. In other words, at 1115, the process identifies the power array entry 765 that has an input power requirement equal to the aggregate output power characteristic generated at 1110. The position of the identified entry specifies the power state for the process' power manager.
The process then determines (at 1120) whether the power state identified at 1115 is different from its current state, which is stored in its data structure field 705. If not, the process ends. Otherwise, the process determines (at 1125) whether its power manager has any child power managers.
If not, the process transitions to 1140, which will be described below. On the other hand, if the process' power manager has child power mangers, the process notifies (at 1130) each of the child managers that the power will change. In its notification, the process provides its new output power characteristics in the upcoming reduced power state. The process then transitions to 1135, where it remains until it receives acknowledgments from each of the notified child power managers that their domain or device can tolerate the upcoming reduced power state. In some embodiments, the child power managers acknowledge their tolerance for the reduced power state by providing the process with their input power requirements for this state. The process 1100 can then examine its power array 750 and determine that the new input power requirements of its child managers correspond to the desired reduced power state.
Once the process 1100 determines that all its children have acknowledged its message or that it does not have any children, the process transitions to 1140 to switch to its reduced power state. To switch to the new power state, the process 1100 (1) instructs its corresponding power-controlling driver 310 or 410 to change its domain's or device's power level to the reduced power state, (2) changes its current power state value to the reduced power state, and (3) stores this value in field 705 of its data structure 700.
The process then acknowledges (at 1145) to its parent power manager or managers that its device or domain is in the new reduced power state. In some embodiments, the process 1100 provides this acknowledgment by notifying its parent power manager or managers of its input power requirements in its new power state. After acknowledging its domain's or device's new power state, the process 1100 ends.
After starting, the process 1200 initially determines (at 1205) the new power state required to provide the requested service. Next, the process notifies (at 1210) its parent power manager or managers of its new input power requirements in its new power state. As further described below, each parent power manager notes this new input power requirement in the connecting object for the device and the parent.
The process then determines (at 1215) whether its parents' current output power is sufficient to power the device in its new state. In some embodiments, the process 1200 retrieves its parents' current output power from field 715 of its power manger's data structure 700.
If the process determines that the parents' output power is sufficient, the process switches (at 1220) to the new power state, and then ends. To switch to the new power state, the process 1200 (1) instructs its corresponding power-controlling driver 310 to change the its device's power level to the reduced power state, (2) changes its current power state value to the reduced power state, and (3) stores this value in field 705 of its data structure 700.
On the other hand, if the process determines (at 1215) that the parents' output power is not sufficient, the process sets (at 1225) the desired power state of field 710 to the state identified at 1205, and then ends without switching to the new power state. In this situation, the device's power manager switches to the new power state after it receives notification from its parent power manager or managers that the parent power manager or managers have increased their output power characteristics, as further described below by reference to
The process then identifies (at 1315) the power state corresponding to the aggregate input power requirement that the process computed at 1310. In other words, at 1315, the process identifies the power array entry 765 that has an output power characteristic equal to the aggregate input power requirement generated at 1310. The position of the identified entry specifies the power state for the process' power manager.
The process then determines (at 1320) whether the power state identified at 1315 is greater than the current power state, which is stored in field 705 of data structure 700. If not, the process ends. Otherwise, for non-root power managers, the process 1300 then notifies (at 1325) its parent power manager or managers of its input power requirement in the desired power state identified at 1315. This input power requirement is necessary to satisfy the requesting child's new input power requirement. The non-root power manager retrieves its desired input power requirement for the identified power state from its power array at the entry 765 corresponding to the desired higher power state. The root power manager does not perform 1325 since it does not have a parent to notify.
The process 1300 then determines (at 1330) whether its parents' output power is sufficient to power its domain in the new power state. In some embodiments, the process 1300 retrieves its parents' current output power from field 715 of its power manger's data structure 700.
If the process determines that the parents' output power is sufficient, the process switches (at 1340) to the new power state. To switch to the new power state, the process 1300 (1) instructs its corresponding power-controlling driver 410 to change the its domain's power level to the higher power state, (2) changes its current power state value to the higher power state, and (3) stores this value in field 705 of its data structure 700. The process then notifies (at 1345) each of its child power managers that it has changed power states, and gives them its current output power characteristic in its new power state. After 1345, the process then ends.
On the other hand, if the process determines (at 1330) that the parents' output power is not sufficient, the process sets (at 1335) the desired power state of field 710 to the state identified at 1315, and then ends without switching to the new power state. In this situation, the non-root power manager switches to the new power state after it receives notification from its parent power manager or managers that the parent manager or managers have increased their output power characteristics, as further described below by reference to
The process then identifies (at 1515) the power state corresponding to the aggregate output power characteristic computed at 1510. In other words, at 1515, the process identifies the power array entry 765 that has an input power requirement equal to the aggregate output power characteristic generated at 1510. The position of the identified entry specifies the power state for the process' power manager.
The process then determines (at 1520) whether the power state identified at 1515 is greater than the desired state stored in field 710 of the power manager data structure. If so, the process prepares (at 1525) to switch to the desired power state. Otherwise, the process prepares (at 1530) to switch to the identified power state.
From 1525 and 1530, the process transitions to 1535 to notify each of its power manager's children that the power manager has changed states. With this notice, the process provides the output power characteristic of its power manager in the switched state. The process then ends.
From these various memory units, the processor 1610 retrieves instructions to execute and data to process in order to execute the processes of the invention. The read-only-memory (ROM) 1620 stores static data and instructions that are needed by the processor 1610 and other modules of the computer. The permanent storage device 1625, on the other hand, is read-and-write memory device. This device is a non-volatile memory unit that stores instruction and data even when the computer 1600 is off. Some embodiments of the invention use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as the permanent storage device 1625. Other embodiments use a removable storage device (such as a floppy disk or zip® disk, and its corresponding disk drive) as the permanent storage device.
Like the permanent storage device 1625, the system memory 1615 is a read-and-write memory device. However, unlike storage device 1625, the system memory is a volatile read-and-write memory, such as a random access memory. The system memory stores some of the instructions and data that the processor 1610 needs at runtime. In some embodiments, the invention's processes are stored in the system memory, the permanent storage device 1625, and/or the read-only memory 1620.
The bus 1605 also connects to the input and output devices 1630 and 1635. The input devices enable the user to communicate information and select commands to the computer. The input devices 1630 include an alphanumeric keyboard and a cursor-controller (such as a mouse or a touch-pad). The output devices 1635 display images generated by the computer. The output devices include printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD).
Finally, as shown in
The invention provides distributed power management architecture for a computer system. This architecture has a simple structure and operation, and imposes minimal development and maintenance requirements.
For instance, each power manager only needs to know about its respective device or domain, in the embodiments (1) that provide a power manager for each device and power domain, and (2) that interrelate these power managers through a hierarchical relationship which mimics the hierarchical power distribution architecture. Hence, when a device driver is modified or a new driver or device is added, only the small and discrete power manager for that device needs to be modified or added. In addition, other than having to respond to their parents and children, the power managers of these embodiments do not need to have detailed information about the hierarchical relationships of the domains and devices.
One of ordinary skill will also recognize that the invention can be embodied in other specific forms without departing from the spirit of the invention, even though the invention has been described with reference to numerous specific details. In view of the foregoing, one of ordinary skill in the art will understand that the invention is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims.
Claims
1. A system, comprising:
- a first member device;
- a second member device; and
- a root device, comprising: a processor; and a memory configured to store instructions that when executed by the processor cause the root device to perform steps that include: receiving an idle status signal from the first member device; automatically sending a sleep command to the second member device in response to receiving the idle status signal, wherein the sleep command causes the second member device to enter a first power state; receiving an active status signal from the first member device; and automatically sending a wake command to the second member device in response to receiving the active status signal, wherein the wake command causes the second member device to transition into a second power state.
Type: Application
Filed: Sep 22, 2015
Publication Date: Feb 4, 2016
Inventor: David SUURBALLE (San Francisco, CA)
Application Number: 14/861,554