> Thanks for all your replies. > But my question was different. I will try to make it more clear. > When will the swapping of the active priority array and expired array happen > ? > > The sleeping processes which have timeslice remaining will not be in the > active array, as they are not in RUNNABLE state. Suppose, all the processes > currently in the active array have exhausted their timeslices. Will the How can a process be in the active array when its timeslice has exhausted. Well, In the 2.6 kernel, as soon the timeslice of a process is exhausted , the next timeslice is calculated at that time only and then it is inserted into the expired array. And when finally when there is no active process which can go into the RUNNABLE state from the active array, then the arrays are swapped. Incase in between some process has gone into the SLEEP state, then when it wakes up it goes into the current active array. It hardly matters at that moment wether the active and expired array has been swapped or not. Even if the active array and expired arrays have swapped for more than 10 times, when the sleeping process wakes up, the process which wakes up, if it has time slice left (it will have ) will always go into the current active array. > kernel now swap the arrays or will it wait for the sleeping processes also > to be reinserted back in to the array, and exhaust their timeslices and then > swap the arrays ? > > Thanks, > > Rajaram. > > > What are the most popular cars? Find out at Yahoo! Autos > > -- Regards, Sandeep A man with one watch knows what time it is; a man with two watches is never quite sure. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/