Why does CPU Time for the System Idle Process increase *faster* than the wall clock?

5,432

Solution 1

One could compute the used CPU time, assuming the task scheduler balances the tasks across all cores evenly (or at least in a distributed manner) as:

CPU Time = Application Time * Number of Cores * Average CPU Utilization

The System Idle Process is just a wrapper for the task scheduler when there is no work to be done by the CPU, so in the case nothing else is running on the system, this usually has a very high utilization. Assuming you have a 4-core system, and your idle process takes up 95% of the CPU, every second you would expect the idle timer's CPU time to increase by:

CPU Time = (1 second) * (4 cores) * (0.95) = 3.8 seconds

Note that as we get better processors and as our operating systems become more optimized, this would theoretically max. out at 100% (e.g. at idle, the CPU has literally NO work compared to it's capabilities), in which case you would expect the CPU Time for the idle process to simply increase at real-time multiplied by the number of cores.


Note that this formula applies even for single-threaded applications, since if a single-threaded application is running constantly on a 4-core machine, the maximum processor utilization would only be 25%; thus, the CPU time for that single-threaded application should nearly match real-time:

CPU Time = (1 second) * (4 cores) * (0.25) = 1 second

Solution 2

The task manager shows CPU time, not real time.

CPU time is the time that was allocated to the given process on any available CPU. So if you have a quad core system, and you only run processes on one core, the idle process will use the remaining time on the other 3 cores.

Thus you will get a CPU time usage of 1 hour 30 minutes during your 30 minute uptime.

Share:
5,432

Related videos on Youtube

Gaia
Author by

Gaia

SOreadytohelp

Updated on September 18, 2022

Comments

  • Gaia
    Gaia almost 2 years

    My computer has been up for 30 min but task manager shows that CPU Time for System Idle Process at 1:30 plus. Every second it advances another 3 or sometimes 4 seconds.

    The machine is also running, at this time very slow (though not generally).

    It's an up to date Win 7 x64.

    Why is System Idle Process faster than real time?

  • Jamie Hanrahan
    Jamie Hanrahan almost 9 years
    Just one quibble: The Idle Process isn't just a "wrapper for the task scheduler". There is an actual idle thread dedicated to each CPU (or for each logical processor if you have HT enabled) and the thread scheduler (not "task scheduler", that's the "scheduled tasks" thing) really does context switch to it when there's nothing else for a CPU to do. Nor do the idle threads really do nothing; they help run other CPUs' DPCs, they notify the power manager of the core's idleness, etc.