News: 1776762912

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Task Manager's CPU meter is an obituary for the recent past, says the engineer who built it

(2026/04/21)


Windows has always had a built-in portal to the very recent past: Task Manager's CPU usage meter.

[1]

Task Manager in Windows XP

"The CPU number in Task Manager is a moving little obituary for the immediate past," [2]explained former Microsoft engineer Dave Plummer, "Not what happened at the moment that your eyeballs landed on the row."

'Windows sucks,' former Microsoft engineer says, explains how to fix it [3]READ MORE

Plummer [4]wrote the original version of Task Manager, back when it was a lean, mean, process-killing machine rather than the considerably chubbier and cuddlier tool of today. He has since led viewers through a [5]tour of the source code , admitting along the way that he left his telephone number in the comments while chasing a strange bug in how CPU numbers were being reported. That bug is the subject of his latest explanation.

So how did Task Manager report the CPU percentage? The answer is complicated. Windows had no magical CPU usage value waiting to be read. Instead, Plummer's Task Manager was timer-driven. Every time the timer fired, the code asked the kernel for cumulative execution times and compared them to the previous sample.

"For an individual process, the math essentially is the cumulative current CPU time minus the previous cumulative CPU time. And that gives you how much CPU has been consumed by that process during the interval between the samples," he said.

"The per-process percentage is just that process's delta divided by the total delta."

[6]

"Now," the veteran engineer continued, "if that looks like the sort of thing you write when you've been locked in an office too long with a copy of Petzold and a lot of coffee, that's because it basically is."

[7]

[8]

"Petzold" refers to the books by [9]Charles Petzold , which were an indispensable companion to Windows programmers in the 1990s, well into the 2000s and beyond. Many long-serving engineers are likely still to have a well-thumbed copy or two on their shelves.

Elegant as the solution was, it had wrinkles. Occasional quirks in the Windows kernel's reporting could make percentages fail to add up to 100, prompting a festooning of asserts in the code - and a request to contact Plummer directly if CPU usage ever exceeded that figure.

[10]

And then there is the problem of modern hardware. Plummer said: "Back in the day, the scheduler's time accounting and the processor's actual throughput were much more tightly coupled because the CPU clocks were comparatively static. On modern CPUs, though, the hardware is constantly changing gears.

"A mostly idle core may be downclocked, parked, or dropped into a state of sleep, sipping power through a cocktail straw, and then the instant that real work shows back up, it can jump up to a much higher frequency or even turbo past its nominal clock."

As Task Manager's accounting was fundamentally time-based, the work accomplished in any given interval varied wildly depending on what frequency the silicon was running at.

[11]Microsoft veteran's worst Windows bug was Pinball running at 5,000 FPS

[12]Microsoft whiz dishes the dirt on the Blue Screen Of Death's colorful past

[13]Windows 11 needs an XP SP2 moment, says ex-Microsoft engineer

[14]MS Task Manager turns 30: Creator reveals how a 'very Unixy impulse' endured in Windows

"The meter isn't wrong, but it's measuring sort of occupancy rather than productivity." It was built for a simpler era, before CPU frequency scaling and throttling became the norm.

"When the numbers [today] feel a little slippery, it's not because the tool is broken so much as the hardware stops being simple enough for a single percentage to tell you the whole story."

[15]

Plummer told The Register : "My main impetus was to account for every cycle, making sure each was properly attributed to the right 'cost center' and then determining how much actual work occurred in that time window. That seems pretty accurate, and I guess more important, 'felt' right to me in term of what the machine was doing."

He was unable to comment on how the modern iteration of Task Manager performed the trick, telling us, "I know how I would have done it but hate to assume!" ®

Get our [16]Tech Resources



[1] https://regmedia.co.uk/2020/05/26/tm-winxp.png

[2] https://youtu.be/HiHMQN3kQlQ?si=oz9GOrIGMDDNf1qP

[3] https://www.theregister.com/2025/11/07/does_windows_really_suck_that/

[4] https://www.theregister.com/2020/05/26/task_manager_confession/

[5] https://www.theregister.com/2023/10/04/task_manager_inner_world/

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2aedKw0ydiLAHpkVWBO8PcgAAAII&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[7] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aedKw0ydiLAHpkVWBO8PcgAAAII&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[8] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aedKw0ydiLAHpkVWBO8PcgAAAII&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[9] https://www.charlespetzold.com/

[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44aedKw0ydiLAHpkVWBO8PcgAAAII&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[11] https://www.theregister.com/2025/09/09/dave_plummers_worst_windows_bug/

[12] https://www.theregister.com/2024/08/02/who_wrote_windows_bsod/

[13] https://www.theregister.com/2025/12/01/windows_needs_another_xp_sp2/

[14] https://www.theregister.com/2025/11/12/thirty_years_of_task_manager/

[15] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33aedKw0ydiLAHpkVWBO8PcgAAAII&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[16] https://whitepapers.theregister.com/



I feel vindicated :)

Gerhard den Hollander

A decent while ago I needed to write a cpu load indicator that would sit in the corner of a GUI (a float between 0.0 and 1.0)

On Linux this was trivial, as there are syscalls that will give you the current system load, divide this by the number of CPUs and you have a nice number between 0 and 100% (or way over 100% , but I dealt with that by changing the color to deep red ( <80% was green, 80 - 95 was orange, 95 - 100 was read, and > 100 was deepred).

Then trying to do the same for windows turned out to be a bit more tricky, and in the end, i basically gave up and ended up using pretty much the same trick as described above, which gave a surprisingly accurate number when comparing with the taskmgr ...

Reichel's Law:
A body on vacation tends to remain on vacation unless acted upon by
an outside force.