Dave Plummer, a former Microsoft engineer and developer of the original Windows Task Manager, revealed online that the CPU usage displayed by the Windows Task Manager is not real-time data, but a periodic average that is refreshed regularly.Plummer was involved in iconic projects such as Windows ZIP file support and the Windows NT Start menu, and he personally built the first version of Task Manager.

In order to ensure that the tool does not waste system resources, he designed this tool to be extremely simple from a programming and engineering perspective so that it can run smoothly on computers in the 1990s. But it is this minimalist design that lays the foundation for inaccurate numerical values.

Plummer said that the refresh of the task manager is driven by a timer and captures data at regular intervals. It shows the statistics of the CPU between two refreshes, not the load at the real time.

If you simply divide the CPU usage time by the refresh interval, the result will be very dependent on the accuracy of the GUI timer.

He made an analogy: It's like putting a metronome in the back of a pickup truck and driving on a potholed dirt road. It's basically impossible to keep it absolutely stable.

Therefore, he adopted a more rigorous algorithm: let the task manager record the total running time of each process since startup (kernel time + user time), subtract the total value of the last refresh from the current value to obtain the CPU consumption of the process during the interval, and then divide it by the total CPU consumption of all processes during this period.

This method looks very complicated, but it is much more accurate than doing division directly.

However, the evolution of technology makes this algorithm inadequate. Modern CPUs support dynamic frequency modulation, turbo acceleration, temperature control frequency reduction and deep sleep, which decouples CPU time usage from the actual workload completed. A single percentage cannot fully reflect the working status of the processor.

Plummer pointed out that CPU usage time used to be a good reflection of workload, but now the correlation between the two is very loose. He believes that the ideal CPU usage should measure the ratio of the actual amount of work completed to the theoretical maximum amount of work that can be completed, but he has retired from Microsoft and cannot promote changes.

Original author’s showdown: Windows Task Manager’s CPU usage is all fake and there is no real-time statistics at all