Various mechanisms exist for power management on a computing platform. Some methods are implemented at the platform or firmware level, and some are implemented at the operating system level. The Microsoft® Windows® operating system (OS) uses C-state power management features to control the power state of the processor during idle times.
Windows® OS C-state power management features a processor utilization based C-state selection algorithm. C-States processor power states are distinguishable from P-states. A P-State is a system performance state used when the system is not idle to select the processor frequency and voltage. The correct frequency and voltage may be selected to best handle the workload.
The P-state is only applicable when the processor is operating at C0. There are typically C-states from C0 to C9. For instance, C0 is used when the processor is not idle. When the processor has no work to do, other C-states may be entered. C1 state, for instance, disables the CPU clock. For some Intel Corp. platforms, C2 is not used by the processor; instead C2 may notify the chipset that the processor is idle. C3 flushes the L1 cache in multi-core processors to maintain lower power. It will be understood that latency for returning from C3 (a deeper C-state) is longer than if returning from C1 (a shallower C-state).
According to the Advanced Configuration Power Interface Specification, Revision 3.0b, Oct. 10, 2006, available at URL www*acpi*info/DOWNLOADS/ACPIspec30b.pdf, (where periods are replaced with asterisks in URLs in this document to avoid inadvertent hyperlinks),                “to save power in the Working state, the OS puts the CPU into low-power states (C1, C2, and C3) when the OS is idle. In these low-power states, the CPU does not run any instructions, and wakes when an interrupt, such as the OS scheduler's timer interrupt, occurs. The OS determines how much time is being spent in its idle loop by reading the ACPI Power Management Timer. This timer runs at a known, fixed frequency and allows the OS to precisely determine idle time. Depending on this idle time estimate, the OS will put the CPU into different quality low-power states (which vary in power and latency) when it enters its idle loop.”        
For instance, when a processor is going to enter idle mode, an operating system policy is responsible for selecting a target C-state for the processor. The power management service of the OS evaluates the processor's utilization over a past period; if the utilization is higher than a threshold, the policy will select a one-step shallower C-state (called demotion) than the C-state selected for last idle; if the utilization is lower than a threshold, the policy will select a one-step deeper C-state (called promotion) than the C-state selected for last idle. The demotion/promotion threshold typically used by the Microsoft® Windows® OS is defined by the standard Advanced Configuration and Power Interface (ACPI) and shown in Table 1, below. The second column shows percentages indicating a utilization ratio counted over a period of time. The C-states are mapped to ACPI standard C-state. For instance, if the utilization is less than 50%, the OS will promote the C-state from C1 to C2. If the utilization is greater than 60% the OS will demote the C-state from C2 to C1. This policy works very well for a wide range of workloads until introduction of long latency C-states such as CC6 (core power gating). It will be understood that the CC6 C-state is mapped to the ACPI C3 C-state, as shown in the Table. For purposes of the following discussion, ACPI C-state standard notation will be used.
TABLE 1Windows ® C-State Policy Promotion/demotion ThresholdsACPI_C1_TO_C2_THRES<50%ACPI_C2_TO_C3_THRES<40%ACPI_C2_TO_C1_THRES>60%ACPI_C3_TO_C2_THRES>60%
The processor power states C0-C3 are defined in ACPI as follows:                C0 is the operating state.        C1 (often known as Halt) is a state where the processor is not executing instructions, but can return to an executing state quickly.        C2 (often known as Stop-Clock) is a state where the processor maintains all software-visible state, but may take longer to wake up.        C3 (often known as Sleep) is a state where the processor does not need to keep its cache coherent, so it is typically flushed, but maintains other state. Some processors may have variations on the C3 state that differ in how long it takes to wake the processor.        
USPTO Backgrounds
USPTO Backgrounds