# How does CFS prevent a long sleeping task from occupying the CPU?

The Completely Fair Scheduler executes the task that has so far received the least share of CPU time and is thus the most 'disadvantaged'. So if a task sleeps for a really long time, say 3hrs, how does CFS prevent this task from being executed for the next like 3hrs (to adapt its CPU share to the much larger values of the other tasks)?

Or does CFS do so at all? Or did I get something wrong?

Thanks in advance :)

each time CFS places a new/old task into the rbtree it does not reuse its old runtime but rather assigns a new one: se->vruntime = max(se->vruntime, vruntime) where vruntime is the current minimum virtual runtime.