Linux Multiprocessor Schedulers

You will learn about the three Linux​ multiprocessor​ schedulers in this lesson in a concise manner.

Three different multiprocessor schedulers

Interestingly, in the Linux community, no common solution has approached building a multiprocessor scheduler. Over time, three different schedulers arose: the O(1) scheduler, the Completely Fair Scheduler (CFS), and the BF Scheduler (BFS)Look up what BF stands for on your own; be forewarned, it is not for the faint of heart.. See Meehean’s dissertation for an excellent overview of the strengths and weaknesses of said schedulers“Towards Transparent CPU Scheduling” by Joseph T. Meehean. Doctoral Dissertation at University of Wisconsin—Madison, 2011. A dissertation that covers a lot of the details of how modern Linux multiprocessor scheduling works. Pretty awesome! But, as co-advisors of Joe’s, we may be a bit biased here.; here we just summarize a few of the basics.

Approaches used by the schedulers

Both O(1) and CFS use multiple queues, whereas BFS uses a single queue, showing that both approaches can be successful. Of course, there are many other details which separate these schedulers. For example, the O(1) scheduler is a priority-based scheduler (similar to the MLFQ discussed before), changing a process’s priority over time and then scheduling those with the ​highest priority in order to meet various scheduling objectives; interactivity is a particular focus. CFS, in contrast, is a deterministic proportional-share approach (more like Stride scheduling, as discussed earlier). BFS, the only single-queue approach among the three, is also proportional-share, but based on a more complicated scheme known as Earliest Eligible Virtual Deadline First (EEVDF)“Earliest Eligible Virtual Deadline First: A Flexible and Accurate Mechanism for Proportional Share Resource Allocation” by Ion Stoica and Hussein Abdel-Wahab. Technical Report TR-95-22, Old Dominion University, 1996. A tech report on this cool scheduling idea, from Ion Stoica, now a professor at U.C. Berkeley and world expert in networking, distributed systems, and many other things.. Read more about these modern algorithms on your own; you should be able to understand how they work now!

Get hands-on with 1400+ tech skills courses.