Would like to know what scheduling mechanisms is employed in 15.04, time-sharing or real-time, I'm pretty sure its FIFO, Round Robin, SJF?
P.S: New to Linux
Would like to know what scheduling mechanisms is employed in 15.04, time-sharing or real-time, I'm pretty sure its FIFO, Round Robin, SJF?
P.S: New to Linux
Process scheduler
A process scheduler handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.
Since kernel 2.6.23 (that would be as of Hardy 8.04 LTS) Completely Fair Scheduler (CFS) based on "Rotating Staircase Deadline". Overview from kernel.org:
CFS stands for "Completely Fair Scheduler," and is the new "desktop" process scheduler implemented by Ingo Molnar and merged in Linux 2.6.23. It is the replacement for the previous vanilla scheduler's SCHED_OTHER interactivity code.
80% of CFS's design can be summed up in a single sentence: CFS basically models an "ideal, precise multi-tasking CPU" on real hardware.
"Ideal multi-tasking CPU" is a (non-existent :-)) CPU that has 100% physical power and which can run each task at precise equal speed, in parallel, each at 1/nr_running speed. For example: if there are 2 tasks running, then it runs each at 50% physical power --- i.e., actually in parallel.
On real hardware, we can run only a single task at once, so we have to introduce the concept of "virtual runtime." The virtual runtime of a task specifies when its next timeslice would start execution on the ideal multi-tasking CPU described above. In practice, the virtual runtime of a task is its actual runtime normalized to the total number of running tasks.
I/O scheduler
Input/output scheduling is the method that operating system uses to decide in which order block I/O operations will be submitted to storage volumes.
Phoronix article on scheduling: Linux 3.16: Deadline I/O Scheduler Generally Leads With A SSD.
You can change the I/O scheduler by appending the option "elevator=" to "GRUB_CMDLINE_LINUX_DEFAULT=" in grub.
It is probably easier (assuming sda and deadline) to do it like this though:
To show the list of available schedulers:
cat /sys/block/sda/queue/scheduler
And to alter a scheduler (can be done on the fly):
echo deadline > /sys/block/sda/queue/scheduler
From kernel/git/torvalds/linux.git
You can check what is being used with (assuming sda as primairy):
cat /sys/block/sda/queue/scheduler
I got my information here: http://manpages.ubuntu.com/manpages/hardy/man2/sched_setscheduler.2.html
– leslie_lyj Jun 08 '15 at 11:28