
The process busyLoop1.exe spends almost all its time in the Blocked (Wait) state. As soon as the process enters the Running state, it blocks itself on a call to Sleep().

The process busyLoop2.exe also spends almost all its time in the Blocked state, waiting for the console I/O operations to complete. As soon as the process enters the Running state, it blocks itself by making a call to printf().

There is a big difference between busyLoop1 and busyLoop2. When busyLoop2 is blocked, the operating system kernel is busy doing work for the process (the I/O operation). When busyLoop1 is blocked, there is nothing the operating system needs to do for it, so it does not use any "kernel time". You can use the programs ProcessExplorer.exe, ProcessHacker.exe, or qslice.exe to observe that busyLoop2 accumulates "kernel time" but busyLoop1 doesn't.


The process busyLoop3.exe spends all its time in either the Running state or the Ready state. This process can never be in the Blocked state. (And this process does not accumulate any "kernel time" since it never makes any operating system requests.)
