{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture09 - Friday April 17 Note some changes in the course...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Friday, April 17 Note some changes in the course calendar Project #2 Questions? Due Sunday, April 26 Today's topics RSDL Scheduler Linux CFS scheduler Quiz #1 Linux CPU Schedulers "Constant Time Scheduler" (CTS) "Rotating Stairway Deadline Scheduler" (RDSL) "Completely Fair Scheduler" (CFS) RSDL (SD) Scheduler Rotating Staircase DeadLine Scheduler When a process has used its time slice, it is moved down to the next lower priority level, and assigned a new time slice for that level. Each priority level also has a time quota 100level priority queue ("active" array) Roundrobin at each level Each process has a time slice at its level Bit map for O(1) selection Similar to CTS When the highest priority level has used its quota, all processes running at that level are moved down to the next lower priority level. RSDL (SD) Scheduler When a process reaches the "bottom of the stairs", it is moved to the "expired" array at its original priority level When the "active" array becomes empty, the "active" and "expired" pointers are switched Experimentally, RSDL performs better and is more fair than CTS. RSDL was about to be adopted as the default scheduler, when along came ... No need for "sleep averaging", "interactivity index", etc. CFS Completely Fair Scheduler Built on proofs from RSDL that fair scheduling can be achieved without handling "interactivity" Uses Linux's predefined RBtree structure Written by Ingo Molnar Completely different ~1400 lines of code No priority (active / expired) arrays CFS Characteristics Tasks are ordered in the RBtree by "greatest need" Does not attempt to determine if a process is CPUbound or IObound "Need" determined by time spent as runnable Task selected is leftmost in the RBtree After CPU burst, running time is deducted from need, and task is inserted back into the RBtree CFS Characteristics There are a few bells/whistles "nice" values sleeper recognition group scheduling etc. CFS vs. CTS CFS: ~1400 lines of code CTS: ~6700 lines of code RBtree task structure makes CFS "slower" than CTS However ... Emphasize fairness over priority All "lookups" are leftmost node, and pointer is cached ... O(1) Removals and insertions may require rebalancing the tree ... O(log n) Finding insertion point is O(log n), but tree is always balanced CFS vs. CTS Testing shows very small time difference compared to O(1) CTS Testing shows CFS provides much better overall performance Handles programs that confound CTS Questions? Quiz #1 ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online