Why do processes with higher priority to be allocated more timeslice?

Parmenides mobile.parmenides at gmail.com
Mon Sep 26 22:07:07 EDT 2011


Hi Jeff,

2011/9/27 Jeff Donner <jeffrey.donner at gmail.com>:

> Well, if it doesn't need more time then it doesn't matter what its priority is,
> when it goes to sleep waiting for some IO it yields back the
> remainder of its time. You could give it as long a timeslice
> as you like; it won't use more than it needs, because it mostly waits on IO.
>

> A lot of the time the IO process won't be runnable, as it's waiting on IO.
> When the kernel is looking to dole out CPU time at those times, well the
> CPU-bound process is the only one that can take it. So the kernel
> gives it to it, lower priority or not.
>

> CFS doesn't distort anything.

For this example, it is really ok. But, dynamic priority doesn't has
nothing to do with timeslice. I have no intention to give any remarks
conerning whichever scheduler (Forgive me if I seem do that.) :-).
Actually, a common characteristics of Linux's schedulers is that
timeslices will be longer with priorities raising . I am just curious
about why the the schedulers takes this policy. IMHO, this policy
somewhat conflicts with intuition. I think there must be some
motivations to take this policy, but I have no idea about it.



More information about the Kernelnewbies mailing list