From WikiChip
C-states - ACPI
Revision as of 08:08, 11 November 2018 by David (talk | contribs) (Reverted edits by (talk) to last revision by
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

C-states are the idle state ACPI policies that govern a microprocessor - i.e. states that shut down parts of the microprocessor when cores are not used. Modern microprocessors have several C-states representing an increasingly larger part of the processor that's being shut down. Additionally because new MPUs are also multi-core, most recent microarchitectures include two C-states: core-based C-states called CC-states and a package-based C-states called PC-states.


As with everything in life, the microprocessor doesn't experience consistent heavy workload at all times. In fact, more often than not, for the typical user, the microprocessor ends up executing very little if nothing at all. An idle CPU is a CPU that doesn't do any useful work. Much like when you shut the lights when you leave a room, since the CPU is not doing any useful work it can be momentarily turned off.

Because of the complexity of modern microprocessors - incorporating multiple cores, caches, and other components, there are multiple C-states depending on which part of the system is talked about. In practice there are usually 3 general C-states:

  • CC-states - a set of idle states provided by the hardware controlling the idle states of a physical core.
  • PC-states - a set of idle states provided by the hardware controlling the idle states of the entire package. This also covers various shared resources.
  • OS C-state - a set of logical idle states provided by the operating system to the application software. Those states are logical c-state and may be anything the OS wants them to be.

Modern microprocessors have several C-states representing an increasingly larger part of the processor that's being shut down. More power savings actions are taken for higher C-states. CC-states are concerned with the idle state of an individual core. For example a CC-state of CC0 is your operational state, under this state the CPU is not idle and is actually busy doing useful work. This first state can be thought of as a idle state off state. A CC-state of CC1 is the first real idle state. Under this state, the core clock is gated, effectively shutting down the core's operation. A higher CC-state such as CC2 shuts down additional components such as the external I/O controller, blocking interrupts. Other higher states exist. Note that some systems such as Intel's x86 processors that support Hyper-Threading, thread-level C-states are also available. However, while individual threads can request higher C-states, any power saving actions are only taken once the core C-state (CC-state) is resolved. Core C-state is determined by the lowest thread state, i.e. Equation CC hyphen state equals min left-parenthesis upper T 1 comma upper T 2 comma period period period comma upper T Subscript n Baseline right-parenthesis .

Because modern processors have multiple cores, it's possible for a dual-core processor to have one core at CC0 (doing busy work) while a second core is at CC2 doing nothing. PC-states relate the CC-states of the individual core to the state of the entire processor (i.e. the package). The processor may only enter a specific PC-state when all the components are ready for it to happen, i.e. Equation PC hyphen state equals min left-parenthesis upper C upper C 1 comma upper C upper C 2 comma period period period comma upper C upper C Subscript n Baseline right-parenthesis . If we take our earlier scenario where a dual-core processor has one core at CC0 and a second core at CC2, because the first core is doing busy work we cannot enter PC2 as we cannot disrupt the operating of the working core.

various c-states.svg

The OS C-states are entirely logical C-state. The OS vendors are free to define what an OS C-state correlates to as they see fit. On some operating systems such as Microsoft Windows, the logical C-state is fairly equivalent to the physical core's CC-state. This is usually the case for other operating systems but it's not a requirement.


New text document.svg This section is empty; you can help add the missing info by editing this page.

Text document with shapes.svg This article is still a stub and needs your attention. You can help improve this article by editing this page and adding the missing information.