Thread (9 messages) 9 messages, 4 authors, 2011-10-07

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

From: Parmenides <hidden>
Date: 2011-09-27 02:07:07

Hi Jeff,

2011/9/27 Jeff Donner [off-list ref]:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help