Real Systems, Performance & Frontiers

power management

Power management is how the operating system tries to do the same work using less energy — crucial for a phone that must last a day on a battery, and just as crucial for a data centre whose electricity bill and cooling are enormous. Picture turning off lights in empty rooms and dimming the ones you barely need: the OS does this for the hardware, switching idle parts off and slowing down parts that are not under pressure, so energy is not burned doing nothing.

There are two main levers. Sleep states put idle hardware into progressively deeper low-power modes: a core with nothing to do can halt and draw almost no power until an interrupt wakes it, and the whole machine can suspend, keeping memory alive but everything else dark. The OS must decide how deep to sleep, because waking from a deeper state takes longer. The second lever is dynamic voltage and frequency scaling (DVFS): the OS lowers the CPU's clock speed and voltage when the workload is light and raises them when it is heavy. Because a chip's dynamic power rises roughly with voltage squared times frequency, running slower at lower voltage can save energy dramatically. On phones this is why background tasks are batched and the screen — often the biggest drain — is dimmed and switched off aggressively; in data centres it is why idle servers are powered down or consolidated.

The honest tension is the race-to-idle trade-off: sometimes the most energy-efficient choice is to run the CPU at full speed to finish quickly and then sleep deeply, rather than crawling along at low frequency the whole time — it depends on the workload and the chip. And power management can fight performance and responsiveness: a deeply sleeping core takes time to wake, so saving energy can add latency. The OS is constantly balancing energy against speed, and the right answer changes with the situation.

Your phone sits on the desk untouched. The OS drops idle CPU cores into a deep sleep state, lowers the clock of the one core still handling background sync, and switches off the screen entirely. When you pick it up, an interrupt wakes a core and ramps its frequency back up within milliseconds — fast enough that the phone feels instantly responsive.

Sleep the idle, slow the relaxed, wake fast on demand.

Slower is not always greener. Race-to-idle means it can save more energy to run flat-out, finish, and sleep deeply than to creep along at low frequency — the best choice depends on the workload and the hardware.

Also called
energy managementDVFS, sleep states能源管理