惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
T
Tenable Blog
D
DataBreaches.Net
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
V
Visual Studio Blog
B
Blog
雷峰网
雷峰网
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
InfoQ
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
The Cloudflare Blog
L
LangChain Blog
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
The Exploit Database - CXSecurity.com
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Attack and Defense Labs
Attack and Defense Labs
Martin Fowler
Martin Fowler
SecWiki News
SecWiki News
T
Threat Research - Cisco Blogs
J
Java Code Geeks
Cyberwarzone
Cyberwarzone
Forbes - Security
Forbes - Security
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
O
OpenAI News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Schneier on Security
Schneier on Security
S
Security @ Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News
H
Help Net Security
Y
Y Combinator Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
量子位
U
Unit 42
S
SegmentFault 最新的问题
V
V2EX
D
Docker

The Register - Software: OSes

Fedora: Microsoft is all aboard, but Deepin is dumped Microsoft promises to do better, but it has a long way to go First big Microsoft update after vow to 'win back fans' Who needs ghost train scares when Windows is such a fright? Microsoft boss tells investors the company is working to 'win back fans' Microsoft boss says company is working to 'win back fans' Linux cryptographic code flaw offers fast route to root Fedora 44 is out – countless versions of it Microsoft sets its sights on the past with 86-DOS and PC-DOS Microsoft updates the Windows Update Experience Windows second-chance setup hurts IT, productivity Ubuntu Resolute Raccoon drops Xorg, keeps X11 apps alive More ancient Linux device support facing the ax WSL9x hacks Linux into ancient Windows 9x systems UK tribunal sends £2B claim accusing Microsoft of overcharging for licensing to trial Zorin OS 18.1 released - and the Lite edition reappears Linux 7.1 will have an optional new NTFS driver Microsoft releases Windows Server update to fix April update 20-year-old Enlightenment E16 bug finally gets patched 20-year-old Enlightenment E16 bug finally gets patched Raspberry Pi OS ends open-door policy for sudo Firefox Nightly adds Web Serial after years of saying no Windows Update: Torture chamber for seldom-used PCs Windows Update: Torture chamber for seldom-used PCs Notepad loses Copilot icon as Microsoft gives subtlety a try Notepad loses Copilot icon as Microsoft gives subtlety a try Microsoft attempts to untangle Windows Insider program Adobe finally patches PDF pest after months of abuse NHS pays £46K to prep next Microsoft licensing round Linux 7.0 debuts as Linus Torvalds ponders AI's impact Linux 7.0 debuts as Linus Torvalds ponders AI's impact Red Hat RHELocates its Chinese engineering team to India Showing the Windows 10 desktop was the yeast they could do Apple's chips are winners, but Windows fails help it most The end of Linux i486 support looks nigh The end of Linux i486 support looks nigh Windows asks a networking question on a Stratford billboard Some 'broken by update' PCs were already doomed SystemRescue 13 lands with Linux 6.18 and bcachefs support Memo: Red Hat Global Engineering plans to lean in to AI Microsoft plans another out-of-band Windows fix Ubuntu beta arrives with GNOME 50, sans Google Drive support Ubuntu beta arrives with GNOME 50, sans Google Drive support Microsoft pulls Windows update after installation problems Microsoft pulls Windows update after installation problems Microsoft cracks down on old Windows kernel drivers Microsoft cracks down on old Windows kernel drivers Linux kernel czar says AI bug reports aren't slop anymore How Windows 95 fought off badly behaved installers Open source isn't a tip jar – it's time to charge for access Age checks creep into Linux as systemd gets a DOB field Systemd-free antiX 26: Debian 13, in bonsai form Systemd-free antiX 26: Debian 13, in bonsai form Windows boss promises to heal the operating system's wounds Windows boss promises to heal the operating system's wounds Smart TVs and voice assistants are the next gatekeepers Microsoft releases emergency fix for account internet error Microsoft releases emergency fix for account internet error Microsoft: Removing some Copilots will improve Windows 11 WSL, WINE updates speed cross-OS app performance MS update kills Microsoft account sign-ins in Windows 11 GNOME 50 debuts with X11 axed, Wayland front and center Microsoft publishes a workaround for Samsung's C:\ drive woes Systemd 260 kills SysV, tells AI not to misbehave Out-of-band getting out of hand as Microsoft pushes hotpatch for Bluetooth Microsoft pushes out-of-band hotpatch for Bluetooth Big moves in Linux filesystems as new bcachefs lands and KDE adds support for Apple's APFS Age verification isn't sage verification when it's inside operating systems Age verification isn't sage verification inside OSes Microsoft points at Samsung after Galaxy app bug locks users out of C:\ RAM is getting expensive, so squeeze the most from it Nanny state vs. Linux: show us your ID, kid Smart mirror shows dumb Windows in elevator Microsoft adding Xbox mode to Windows 11 – even the Professional edition DR-DOS rises again – rebuilt from scratch, not open source Hotpatching goes default in Windows Autopatch whether you like it or not Hotpatching goes default in Windows Autopatch Linux PC vendor System76 tries to talk Colorado down over OS age checks System76 tries to talk Colorado down over OS age checks US state laws push age checks into the operating system Microsoft finally gets around to fixing Windows 10 Recovery Environment after breaking it in October BunsenLabs Carbon keeps the CrunchBang flame alive with Debian 13 Bootleg Windows, Office scheme crashes, triggers 22-month lockup for Florida woman
Task Manager's CPU%: an obituary for the recent past
Richard Speed Richard Speed · 2026-04-21 · via The Register - Software: OSes

OSes

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

Spoiler: There's no magic value. Just a timer, some kernel calls, and too much coffee

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

Task Manager in Windows XP

Task Manager in Windows XP

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

Plummer 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 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."

"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."

"Petzold" refers to the books by 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.

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.

"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."

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!" ®