ECE344-Lecture21-Scheduling

ECE344-Lecture21-Scheduling - Lecture 21: Scheduling David...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 21: Scheduling David Lie ECE344 University of Toronto
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 ECE344: Operating Systems Overview Purpose of scheduling Scheduling Algorithms Multiprocessor Issues Modern Systems
Background image of page 2
3 ECE344: Operating Systems Static Priority Scheduling Each thread is assigned a priority when it is started When scheduler runs, it always chooses to run the highest priority thread – Threads can have the same priority. Scheduler executes round robin within those threads.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 ECE344: Operating Systems Multi-level Queue Scheduling An example of a static priority scheduling algorithm Multiple ready queues, each with its own priority Scheduler chooses thread from highest-priority queue that has a ready thread Round-robin scheduling within each queue Typically, IO bound threads have higher priority CPU High priority Low priority
Background image of page 4
5 ECE344: Operating Systems Priority Inversion Priorities and locks can have unintended consequences: High priority thread Mid priority thread Low priority thread
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 ECE344: Operating Systems Feedback Scheduling With static priority algorithms, choosing priority is tricky – Low priority threads may prevent high priority task from running by holding a shared resource (priority inversion) – Low priority process may never run (starvation) With feedback scheduling, priority of a thread is changed dynamically based on thread behavior – E.g., threads that use CPU heavily are assigned low priority – Prevents starvation of a lower priority thread – Can improve performance of interactive or I/O-bound threads – Can be combined with multi-level queue scheduling
Background image of page 6
7 ECE344: Operating Systems Feedback Scheduling Example 3 queues: – High priority queue with scheduling some quantum (3ms), some scheduling discipline (round robin) – Mid priority queue with scheduling another quantum (6ms), another discipline (also round robin) – Low priority queue that is batch FCFS (no pre-emption) Scheduler always schedules from higher priority queue unless queue is
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/20/2012.

Page1 / 19

ECE344-Lecture21-Scheduling - Lecture 21: Scheduling David...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online