3 ms·
AFAIK the Linux scheduler tries to be completely fair regarding every execution units.
by ybaumes 14y ago
AFAIK the Linux scheduler tries to be completely fair regarding every execution units.
- bnegreve 14y agoWhy is this downvoted ? Is it false ?
- sp332 14y agoThe kernel will try to keep each process running on the same CPU. If one process is using a lot of CPU, it won't (shouldn't) generally switch it around just to keep the CPUs evenly busy.
- flatline 14y agoThis is the Completely Fair Scheduler (CFS) that was introduced in the 2.6 Kernel. It basically does round-robin scheduling with variable time quanta based on niceness/priority. Here is a good overview of the RBTree implementation it uses: http://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt http://www.kernel.org/doc/Documentation/scheduler/sched-desi... I don't know how this deals with distributing tasks across multiple processors however; the basic idea was to improve on the fairly naive runqueue implementation in 2.4 and prior.