Do sleeping processes get the same CPU time?

Processes do not consume CPU resources while they are sleeping. They may add some overhead since the Kernel has to juggle them around, but that is very insignificant.

However, because of the way the question is worded, I should mention that when using Linux's CFS (Completely Fair Scheduler), it attempts to give programs increased CPU time in proportion to the time it sleeps - that is, if a process sleeps a lot, when it is resumed, it gets a higher priority.

See http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ for a description of CFS.


By definition, a sleeping process is not executing on the cpu, so obviously the amount of cpu time it is using is zero.