6.8 Power Optimization Strategies for Processes

We learned in Section 3.7 about the features that CPUs provide to manage power consumption. 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.

Power-down trade-offs

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.

Reentering 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.

Predictive power management

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, because 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 6.19. 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.

image

Figure 6.19 An L-shaped usage distribution.

Based on this distribution, they proposed a shutdown 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.

A more advanced technique is based on a more thorough analysis of the system state [Ben99]. As shown in Figure 6.20, we need to consider several elements of the total managed system: The service provider is the machine whose power is being managed; the service requestor is the machine or person making requests of that power-managed system; a queue is used to hold pending requests (e.g., while waiting for the service provider to power up); and the power manager is responsible for sending power management commands to the provider. The power manager can observe the behavior of the requestor, provider, and queue. Each of these elements can be modeled by a Markov model, which is a probabilistic state machine. Benini et al. [Ben99] showed that a power management policy that maximizes system performance while meeting a power consumption limitation can be solved in polynomial time.

image

Figure 6.20 Architecture of a power-managed system.

ACPI

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 operating systems. It was targeted initially to PCs. The role of ACPI in the system is illustrated in Figure 6.21. ACPI provides some basic power management facilities and abstracts the hardware layer, the operating system has its own power management module that determines the policy, and the operating system then uses ACPI to send the required controls to the hardware and to observe the hardware’s state as input to the power manager.

image

Figure 6.21 The Advanced Configuration and Power Interface and its relationship to a complete system.

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 operating system 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.

The power manager typically includes an observer, which receives messages through the ACPI interface that describe the system behavior. It also includes a decision module that determines power management actions based on those observations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.210.91