Questions about the 2.6 Scheduler

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

 



Hello all,

I have a few questions concerning the kernel 2.6 scheduler...

It's clear to me that, sometimes, the kernel directly invokes the
schedule() function in order to activate the scheduler. At other
times, however, the scheduler sets the "need_resched" variable, so
that the scheduler can be activated as soon as possible.

My question is: couldn't the scheduler() always be directly invoked,
eliminating the need for a variable such as need_resched? Or is
need_resched strictly necessary for asynchronous events (such as timer
or device interrupts), so that the scheduler isn't directly invoked
when the kernel is in the middle of some important work (that is,
before the interrupt occured)?

Thanks,

-- Martim

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