1

Which Scheduling Mechanism is used with Linux Kernel (3.0+) by default, I guess Premptive Scheduling ?
Can we select some other mechanism like Deadline First or Round Robin while building (from the menuconfig) ?
And In Round-Robin Mechanism, how time slice is allocated and used in Kernel ? (I mean Is the time slice calculated on run-time ?)

Arpan
  • 613
  • 7
  • 18

1 Answers1

5

Linux is currently using the CFS (Completely Fair Scheduler) scheduler. You can read about it in the kernel documentation. It also contains a real-time scheduler which is disabled by default.

For a very short summary, CFS maintains a time-ordered red-black tree, where all runnable tasks are sorted by the amount of work the CPU has already performed (accounting for wrap-arounds). CFS picks the task with the least amount of work done and "sticks to it". More details are available in the documentation.

Michael Foukarakis
  • 39,737
  • 6
  • 87
  • 123