this is to ensure better response time . it seems that u r confused because u might have read that higher priority
processes get longer time slice and the other statement that I/O bound processes dont need a longer timeslice
seem to be contradictory.
actually giving a longer time slice to I/o bound process doesn't mean that the process will consume whole time slice in
a single burst . the consumption of the time slice may be distributed over a number of bursts . the I/o bound processes consume their time slice spread over a number of bursts. the allocation of a longer time slice to an i/o bound process doesnt affect responsiveness as the process will itself leave the cpu and wait for some i/o even before the expiry of the time slice.
on the other hand the processor bound processes do need a longer time slice but if a longer time slice is given to a cpu bound process , it will hog up the cpu for a long time and thus hampering the system response.
you can read the scheduling chapter of linux kernel development by robert love ( to get the idea clearly ) feel free for getting further explanation ( i may not have been able to explain it clearly )
On 9/3/05, raja <vnagaraju@xxxxxxxxxxxx
> wrote:
Hi,
I am a bit confused of relation between priority and time slice.
In a book i have studied It is given that higher priority processes will
get longer time slice.
And I/O bounded process will get elevated priority.
and some where in the same book it is written that I/O Bounded processes
do not need larger time slices.
Will you please clear the doubt.Which needs the highest piority and time
slice
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/