Exercises — Dynamic voltage and frequency scaling (DVFS)
Recall The three formulas you will reuse everywhere
Dynamic power: — energy per switch () times switches per second (). Static (leakage) power: — current that trickles through powered-on transistors even when nothing switches. Task energy at fixed work cycles: where . For pure dynamic power this collapses to — the frequency cancels, so energy depends on voltage, not speed (as long as leakage is ignored).
Symbols used on this page, defined once:
Level 1 — Recognition
L1.1 — Which term is quadratic?
In , if you double the frequency only (voltage fixed), what happens to dynamic power? If you double the voltage only (frequency fixed)?
Recall Solution
WHAT: Read off the exponents. appears to the power 1, to the power 2. Double : . Power doubles (×2). Double : . Power quadruples (×4). WHY it matters: the quadratic is the whole reason DVFS lowers voltage, not just frequency.
L1.2 — Read the P-state table
Using the parent note's Intel table, which P-state gives the lowest power, and which gives the highest frequency?
Recall Solution
Lowest power: P3 (0.90 V, 2.0 GHz, 22 W). Highest frequency: P0 (1.35 V, 4.0 GHz, 95 W). P0 is "sprint," P3 is "coast." See Clock generation and PLs for how the frequency is actually generated, and Voltage regulators for how the voltage is delivered.
L1.3 — Name the constraint
Why can't you set P3's frequency (2.0 GHz) with P0's voltage impossible-low value (say 0.5 V)? One sentence.
Recall Solution
Because lower voltage makes transistors switch slower (), so below some voltage the logic cannot finish before the next clock edge — the chip produces wrong results. Voltage and frequency must scale together.
Level 2 — Application
L2.1 — Proportional scaling savings
A core runs at . You scale both down by . By what fraction does dynamic power drop? By what fraction does task energy drop (task = fixed cycles)?
Recall Solution
Power: . Power drops by . Energy: the task takes , longer by . So . Energy drops by . WHY the difference: power scales as (three factors of ), but energy loses one factor of back because the slower clock stretches the runtime. Net: energy .
L2.2 — Plug into the table
Move from P1 (1.20 V, 3.5 GHz) to P3 (0.90 V, 2.0 GHz). Treating power as pure dynamic (), what is the ratio ?
Recall Solution
So the model predicts P3 draws about 32.1% of P1's dynamic power. (The table's listed 22 W vs 65 W = 33.8% is close — the small gap is leakage plus rounding.)
L2.3 — Energy of a fixed job
A task needs cycles. Run it at P0 (4.0 GHz, 95 W) vs P2 (2.8 GHz, 40 W). Compute time and energy for each.
Recall Solution
P0: , . P2: , . Savings: energy, at the cost of s () more time.

Level 3 — Analysis
L3.1 — Voltage-only vs voltage+frequency
Student A halves frequency only: , fixed. Student B halves frequency and drops voltage to . Compare their dynamic powers as fractions of the original.
Recall Solution
A: . → 50% of original. B: . → 24.5% of original. Analysis: B burns less than half what A burns, for the same clock speed, purely from the term. This is the difference between DFS and DVFS.
L3.2 — Deadline floor
A control loop must run cycles every . What is the minimum frequency? If the chip's max is 4.0 GHz, is DVFS's low P-state usable here?
Recall Solution
This exceeds the 4.0 GHz max — the task as written cannot meet its deadline at any P-state. You must cut (optimize the code) below cycles. See Real-time systems and CPU scheduling: for hard deadlines, DVFS may not scale down below the deadline floor.
L3.3 — Where dynamic and static power cross
Let and , with , , and held fixed. At what frequency do the two powers equal each other?
Recall Solution
Set : Below 2 GHz, leakage dominates; above it, switching dominates. Crawling below 2 GHz wastes energy on leakage.

Level 4 — Synthesis
L4.1 — Total-energy sweet spot
A job needs cycles. Model total power as where tracks linearly: with , . Use , . Compute total energy at GHz and say which is best.
Recall Solution
First : at 1 GHz, ; at 2 GHz, ; at 4 GHz, . Time . Energy .
1 GHz: ; ; . 2 GHz: ; ; . 4 GHz: ; ; .
Best: 1 GHz at 0.75 J. Here leakage is small enough that slowing down still wins. Contrast with L4.2 where leakage is larger.
L4.2 — When leakage flips the answer
Same setup as L4.1 but with a leaky deep-submicron chip: . Recompute energy at 1, 2, 4 GHz. Which wins now?
Recall Solution
Leakage term is 6× bigger. 1 GHz: ; ; . 2 GHz: ; ; . 4 GHz: ; ; . Best is still 1 GHz (3.25 J) — but notice the gap between 1 GHz and 4 GHz shrank from 6× (L4.1) to 2.2×. Push leakage higher and the answer flips to racing. This is the Race-to-idle vs race-to-dark tension, and why Power gating exists: cut leakage to zero by shutting the block off.
L4.3 — Race-to-idle with sleep
A job needs cycles. Coast: run at 1 GHz forever (active power 0.6 W). Race-to-idle: run at 4 GHz (active power 4.5 W), finish early, then drop to a sleep state drawing 0.05 W. Compare total energy over a fixed 4-second window.
Recall Solution
Coast: active, then idle at coast? Assume coast still runs the core the full window: but the job finishes at 2 s. To compare fairly over 4 s, coast finishes at 2 s then also sleeps. Active energy ; sleep ; total . Race: active ; sleep ; total . Coast wins here (1.3 J < 2.425 J) because racing's high active power dwarfs the leakage it avoids. Race-to-idle only wins when sleep saves more (very high leakage or high fixed platform power). See Thermal management: racing also spikes temperature.
Level 5 — Mastery
L5.1 — Transition cost changes the schedule
Switching P-states isn't free: the voltage regulator takes and burns per transition (see Voltage regulators, Clock generation and PLs). A workload alternates between 1 ms bursts (need P0, 95 W) and 4 ms idles (P3, 22 W). Over one full 5 ms burst+idle cycle, compare (a) DVFS switching each phase vs (b) staying at P0 the whole time.
Recall Solution
(a) DVFS: 2 transitions per cycle (P0→P3 and P3→P0). Burst: . Idle: . Transitions: . Total . (b) Stay P0: . DVFS saves . The 0.04 mJ transition cost is negligible here because phases (ms) transition time (µs).
L5.2 — When transitions dominate
Now the workload flips every instead of every millisecond. Same , . Is DVFS even physically possible here? What should the governor do?
Recall Solution
Each phase lasts , but a single transition needs just to settle. The voltage cannot arrive before the phase is already over — DVFS cannot track this workload. Governor decision: do not switch. Pick one steady P-state (e.g. a mid P-state matching average demand), or use faster Power gating for the idle micro-gaps. The lesson: DVFS only helps when workload phases are much longer than the transition latency. Use Processor performance counters to measure phase length before deciding.
L5.3 — Full optimization: minimize energy under a deadline
A job needs cycles and must finish within a deadline . Power model with , , , (ignore leakage). What single frequency minimizes energy while still meeting the deadline?
Recall Solution
Ignoring leakage, energy = and frequency cancels — so energy shrinks as (hence ) shrinks. Lower is always better for energy. The deadline stops us: we must have , i.e. . So run at exactly 2 GHz — the slowest speed that still meets the deadline. Then and This is the classic result: stretch the job to exactly fill its deadline, no slower, no faster. (With leakage, the answer nudges up from the deadline floor — L4 style — because crawling too long leaks too much.)
Self-test recall
Cover the right side and answer: