Re: Re: Scheduler question

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

 



Hello....

 Rajaram Suryanarayanan wrote:
> So if the swap occurs when some process is sleeping, the sleeping
> process after it wakes up goes to the new active array ?

Correct! That way, freshly awaken process will be ready to be executed 
in the CPU. If not, you can imagine that this process will need to wait 
until the next array swap.

Also, remember that both array swap and process insertion/removal 
to/from task array are done in "atomic" style to maintain data 
consistency.

in other word, it is done inside non interruptible code path. Interrupts 
are temporarily disabled disabled during these. For example, check how 
__wake_up() and wake_up() are implemented (in kernel/sched.c)

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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