06-CPU_Scheduling_II_2spp

06-CPU_Scheduling_II_2spp - 1 CSE 421/521 Operating Systems...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1 CSE 421/521 - Operating Systems Fall 2011 Tevfik Ko ş ar University at Buffalo September 15 th , 2011 Lecture - VI CPU Scheduling - II 2 Roadmap • Multilevel Feedback Queues • Estimating CPU bursts • System Calls • Virtual Machines 3 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 4 Multilevel Queue Scheduling 5 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 6 Example of Multilevel Feedback Queue • Three queues: – Q – RR with time quantum 8 milliseconds – Q 1 – RR time quantum 16 milliseconds – Q 2 – FCFS • Scheduling – A new job enters queue Q 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 . 7 Multilevel Feedback Queues 8 Determining Length of Next CPU Burst • Can only estimate the length • Can be done by using the length of previous CPU bursts, using exponential averaging + 9...
View Full Document

This document was uploaded on 10/01/2011.

Page1 / 15

06-CPU_Scheduling_II_2spp - 1 CSE 421/521 Operating Systems...

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

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