POWER OPTIMIZATION STRATEGIES FOR PROCESSES:
The RTOS and system architecture can use static and dynamic power management mechanisms to help manage the system’s power consumption. A power management policy [Ben00] is a strategy for determining when to perform certain power management operations. A power management policy in general examines the state of the system to determine when to take actions.
However, the overall strategy embodied in the policy should be designed based on the characteristics of the static and dynamic power management mechanisms.
Going into a low-power mode takes time; generally, the more that is shut off, the longer the delay incurred during restart. Because power-down and power-up are not free, modes should be changed carefully. Determining when to switch into and out of a power-up mode requires an analysis of the overall system activity.
· Avoiding a power-down mode can cost unnecessary power.
· Powering down too soon can cause severe performance penalties.
Re-entering run mode typically costs a considerable amount of time. A straightforward method is to power up the system when a request is received. This works as long as the delay in handling the request is acceptable. A more sophisticated technique is predictive shutdown.
The goal is to predict when the next request will be made and to start the system just before that time, saving the requestor the start-up time. In general, predictive shutdown techniques are probabilistic they make guesses about activity patterns based on a probabilistic model of expected behavior. Because they rely on statistics, they may not always correctly guess the time of the next activity.
This can cause two types of problems:
· The requestor may have to wait for an activity period. In the worst case, the requestor may not make a deadline due to the delay incurred by system start-up.
· The system may restart itself when no activity is imminent. As a result, the system will waste power.
Clearly, the choice of a good probabilistic model of service requests is important. The policy mechanism should also not be too complex, since the power it consumes to make decisions is part of the total system power budget.
Several predictive techniques are possible. A very simple technique is to use fixed times. For instance, if the system does not receive inputs during an interval of length Ton, it shuts down; a powered-down system waits for a period Toff before returning to the power-on mode.
The choice of Toff and Ton must be determined by experimentation. Srivastava and Eustace [Sri94] found one useful rule for graphics terminals. They plotted the observed idle time (Toff) of a graphics terminal versus the immediately preceding active time (Ton).The result was an L-shaped distribution as illustrated in Figure 3.12. In this distribution, the idle period after a long active period is usually very short, and the length of the idle period after a short active period is uniformly distributed.
Based on this distribution, they proposed a shut down threshold that depended on the length of the last active period—they shut down when the active period length was below a threshold, putting the system in the vertical portion of the L distribution.
The Advanced Configuration and Power Interface (ACPI) is an open industry standard for power management services. It is designed to be compatible with a wide variety of OSs. It was targeted initially to PCs. The role of ACPI in the system is illustrated in Figure 3.13.
ACPI provides some basic power management facilities and abstracts the hardware layer, the OS has its own power management module that determines the policy, and the OS then uses ACPI to send the required controls to the hardware and to observe the hardware’s state as input to the power manager.
ACPI supports the following five basic global power states:
· G3, the mechanical off state, in which the system consumes no power.
· G2, the soft off state, which requires a full OS reboot to restore the machine to working condition. This state has four substates:
· S1, a low wake-up latency state with no loss of system context;
· S2, a low wake-up latency state with a loss of CPU and system cache state;
· S3, a low wake-up latency state in which all system state except for main memory is lost; and
· S4, the lowest-power sleeping state, in which all devices are turned off.
· G1, the sleeping state, in which the system appears to be off and the time required to return to working condition is inversely proportional to power consumption.
· G0, the working state, in which the system is fully usable.
· The legacy state, in which the system does not comply with ACPI.