lec09-scheduling2

lec09-scheduling2 - Lecture 9: CPU Scheduling Chapter 5...

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

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 9: CPU Scheduling Chapter 5 (cont)
Background image of page 1

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

View Full DocumentRight Arrow Icon
5.2 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multilevel Queue Ready queue is partitioned into separate queues: foreground (interactive) background (batch) Each queue has its own scheduling algorithm foreground – RR background – FCFS Scheduling must be done between the queues Fixed priority scheduling; (i.e., serve all from foreground then from background). Possibility of starvation. Time slice – each queue gets a certain amount of CPU time which it can schedule amongst its processes; i.e., 80% to foreground in RR 20% to background in FCFS
Background image of page 2
5.3 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multilevel Queue Scheduling
Background image of page 3

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

View Full DocumentRight Arrow Icon
5.4 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multilevel Feedback Queue A process can move between the various queues; aging can be implemented this way Multilevel-feedback-queue scheduler defined by the following parameters: number of queues scheduling algorithms for each queue method used to determine when to upgrade a process method used to determine when to demote a process method used to determine which queue a process will enter when that process needs service
Background image of page 4
5.5 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Example of Multilevel Feedback Queue Three queues: Q 0 – RR with time quantum 8 milliseconds Q 1 – RR time quantum 16 milliseconds Q 2 – FCFS Scheduling A new job enters queue Q 0 which is served FCFS. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q 1 . At Q 1 job is again served FCFS and receives 16 additional milliseconds. If it still does not complete, it is preempted and moved to queue Q 2 .
Background image of page 5

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

View Full DocumentRight Arrow Icon
5.6 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multilevel Feedback Queues
Background image of page 6
5.7 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition In-class Problems (1) What advantages does a preemptive CPU scheduling algorithm have over a non-preemptive one? Why do different levels of a multi-level feedback queue CPU scheduler have different time quantum? Some would say that round robin CPU scheduling does poorly when faced with jobs of equal length. What is their reasoning?
Background image of page 7

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

View Full DocumentRight Arrow Icon
5.8 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition In-class Problems (2) Assume you are given a uniprocessor system with one gigabyte of memory and a 300 gigabyte disk. The OS on the machine has a demand paged virtual
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 25

lec09-scheduling2 - Lecture 9: CPU Scheduling Chapter 5...

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

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