1 / 12

A Comparison Study of Process Scheduling in FreeBSD, Linux and Win2k

A Comparison Study of Process Scheduling in FreeBSD, Linux and Win2k. Introduction Comparison of scheduling based on some parameters On Uniprocessor system – most of it On Multiprocessor system Problems addressed by the schedulers. Introduction. Objectives OSs analyzed

jolene
Download Presentation

A Comparison Study of Process Scheduling in FreeBSD, Linux and Win2k

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Comparison Study of Process Scheduling in FreeBSD, Linux and Win2k Introduction Comparison of scheduling based on some parameters On Uniprocessor system – most of it On Multiprocessor system Problems addressed by the schedulers

  2. Introduction • Objectives • OSs analyzed • FreeBSD 4.4 – pre SMPng • Linux 2.4.18 – pre Preemtible kernel support • Windows 2000 • Convention • Unit of work scheduled is Process

  3. Comparison of scheduling on an uniprocessor system • Responsibility • Win2k – Kernel Dispatcher, running in the context of user process • Linux, FreeBSD – Scheduler process • Process types considered • I/O and interactive processes • CPU bound • Real-time processes – Not in FreeBSD

  4. 16 – 31 1 - 15 50 – 127 0 - 49 >= 1000 0 to 999 Comparison of scheduling on an uniprocessor system • Scheduling instances • How scheduler picks-up a process • Process priorities Win2k FreeBSD Linux Kernel level priorities Kernel level priorities Real-time priorities User level priorities User level priorities Non real-time priorities

  5. Comparison of scheduling on an uniprocessor system • How scheduler picks-up a process • Win2k picks a process with higher priority to run or if there are multiple processes with same priority then it runs them one by one for a quantum each • Linux picks a process with higher Goodness value • FreeBSD picks a process with lowest priority value • Scheduler data structure • Win2k, FreeBSD uses multilevel priority queue • Linux uses linked list of runnable processes • Wait queue

  6. Comparison of scheduling on an uniprocessor system • Quantum of process execution • Trade-off in quantum • Win2k - configurable but it’s 20ms for Professional and 120ms on uniprocessor server • FreeBSD - it’s 100ms • Linux • No quantum for real-time FIFO processes • Epoch • Priority and quantum are related • Quantum = Quantum/2 + priority, for next epoch • Low priority process will never get to run in Win2k and FreeBSD but not the case in Linux • Same priority processes share the quantum in FreeBSD and Linux but will for quantum each in Win2k

  7. Comparison of scheduling on an uniprocessor system • Priority boosting • Win2k, priority boosting for I/O and interactive processes (1-15) • E.g. 1 for disk I/O, 6 – keyboard • FreeBSD, priority is boosted based on CPU usage • When a process is awakened in kernel level then it’s assigned a kernel level priority ( 0 – 49) • User level dynamic priority (50 – 127) is calculated by, Priority=50 + accumulated clock ticks on previous execution/4 + 2*nice Accumulated clocks ticks = (2*load)/(2*load+1) * Accumulated clock ticks + nice • If a process is waiting on I/O for more than a sec. Accumulated clock ticks = ((2*load)/(2*load+1))# of seconds waiting * Accumulated clock ticks • Linux, Priority + quantum left in previous epoch + 1

  8. Scheduling analysis on FreeBSD

  9. Scheduling analysis on Win2k

  10. Scheduling analysis on Win2k

  11. Scheduling analysis on Win2k

  12. Multiprocessor scheduling & problems addressed • Comparison of multiprocessor scheduling • Win2k, Scheduler chooses a processor based on whether it ran the scheduled process before (cache reuse) or it’s the ideal processor of the process • Linux • Boosts priority by 15 if the process was last running on the processor • Scheduling based on Cache Flush Time • Problems addressed by the schedulers • Win2k – priority inversion • FreeBSD – thrashing, solved by high-level scheduler • Linux – Quantum sharing between parent and child processes during forking

More Related