On 2/23/06, Rajaram Suryanarayanan <rajaram_linux@xxxxxxxxx> wrote: > Hi, > > The scheduler subsystem swaps between the active priority array and expired > priority array after all the tasks of that processor have exhausted their > time slices. My question is what happens to the sleeping processes ? Will more time a process spends sleeping (sleep_avg), would mean the process is interactive, which would result in increase in process "priority" > scheduler wait till all sleeping processes wake up and exhaust their > timeslices and then swap the active and expired arrays..? no. when a task is sleeping, the time spent sleeping does not count towards their usage of the timeslice. so a process that is woken up (on an event, of course) from the wait queue that it is waiting on, is re-inserted into the active array. if the process is highly interactive, and its time slice has expired, then it is put into the active array. hareesh -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/