Re: Scheduler question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


Hareesh Nagarajan <hareesh.nagarajan@xxxxxxxxx> wrote:
On 2/23/06, Rajaram Suryanarayanan 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/


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 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

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux