What scheduling algorithms does Linux kernel use?

32,045

Solution 1

The linux kernel has several different available scheduling algorithms both for the process scheduling and for I/O scheduling. Download it from www.kernel.org and call

make menuconfig

You will get a full list of all available options with a built-in help. One guy that once came up with his O(1) scheduler is Con Kolivas. Definitively have to have a look at what he did. I was once a great break-through.

Solution 2

Note: As Abdullah Shahin noted, this answer is about IO queing scheduler, not for processes.

If you just want to check what scheduler your linux system is using and which are available you can run the following command:

cat /sys/block/sda/queue/scheduler

The one between the [] is the one it's using at the moment. The other ones are available. To change it:

sudo bash -c 'echo deadline > /sys/block/sda/queue/scheduler'

Be carefull to set it back to default though, unless you know what you are doing and want.

Default (in newer Ubuntu distros at least) is CFQ (Completely Fair Scheduling):

http://en.wikipedia.org/wiki/CFQ

Interview with the creator (Jens Axboe):

http://kerneltrap.org/node/7637

Solution 3

As others have already mentioned, there are several scheduling algorithms available, according to the intended use.

Check this article if you want to learn more about scheduling in Linux.

Solution 4

i believe "completely fair scheduler" is in use with latest kernels. I think you can good amount of information if you just search for it in google.

link : http://en.wikipedia.org/wiki/Completely_Fair_Scheduler

Solution 5

A new addition to Linux Kernel is EDF (Earliest Deadline First) for guaranteed RealTime support http://lkml.org/lkml/2009/9/22/186 http://www.evidence.eu.com/content/view/313/390/

Share:
32,045
Admin
Author by

Admin

Updated on September 10, 2021

Comments

  • Admin
    Admin over 2 years

    What scheduling algorithms does Linux kernel use?

    Where can I get more info about linux's kernel? (OS first course... student level)