CPU Scheduling. Schedulers Process migrates among several queues –Device queue, job queue, ready queue Scheduler selects a process to run from these queues.

Slides:



Advertisements
Similar presentations
CPU Scheduling.
Advertisements

1 Uniprocessor Scheduling Types of scheduling –The aim of processor scheduling is to assign processes to be executed by the processor so as to optimize.
CPU Scheduling CPU Scheduler Performance metrics for CPU scheduling
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 2 nd Edition Chapter 6a: CPU Scheduling.
 Basic Concepts  Scheduling Criteria  Scheduling Algorithms.
CPU Scheduling Chapter 5. CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Thread Scheduling UNIX.
CENG 334 – Operating Systems 05- Scheduling
Chapter 3: CPU Scheduling
CS444/CS544 Operating Systems Scheduling 1/31/2007 Prof. Searleman
Scheduling in Batch Systems
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
CPU Scheduling. Schedulers Process migrates among several queues –Device queue, job queue, ready queue Scheduler selects a process to run from these queues.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (2) Process Management 10/03/2008 Yang Song (Prepared by Yang Song and.
CPU Scheduling. Announcements CS 4410 was due two days ago! CS 4411 projects due next Wednesday, September 17 th Everyone should have access to CMS (
CPU Scheduling. Announcements CS 414 Homework next Wednesday, Feb 7th CS 415 initial design documents due TODAY, Friday, Feb 2nd –Project due following.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Job scheduling Queue discipline.
CPU Scheduling Prof. Sirer (dr. Willem de Bruijn) CS 4410 Cornell University.
A. Frank - P. Weisberg Operating Systems CPU Scheduling.
Modified from Silberschatz, Galvin and Gagne ©2009 Lecture 8 Chapter 5: CPU Scheduling.
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Main Job: Assign processes to be executed by the processor(s) and processes to be loaded in main.
Threads & Scheduling What are threads?
CISC3595 CPU Scheduling.
Operating Systems Part III: Process Management (CPU Scheduling)
CPU Scheduling Chapter 6 Chapter 6.
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Chapter 6 CPU SCHEDULING.
1 Scheduling Processes. 2 Processes Each process has state, that includes its text and data, procedure call stack, etc. This state resides in memory.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
CSCI 315 Operating Systems Design1 Introduction to CPU Scheduling Notice: The slides for this lecture have been largely based on those from the course.
CPU Scheduling Gursharan Singh Tatla 1-Feb-20111www.eazynotes.com.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Minimize response time Maximize throughput Maximize processor efficiency.
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm.
Process A program in execution. But, What does it mean to be “in execution”?
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 7: CPU Scheduling Chapter 5.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
CIS250 OPERATING SYSTEMS Chapter 6 - CPU Scheduling Basic Concepts The objective of multi-programming is have a program running at all times Maximize.
Processor Scheduling Hank Levy. 22/4/2016 Goals for Multiprogramming In a multiprogramming system, we try to increase utilization and thruput by overlapping.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling CSCI Introduction By switching the CPU among processes, the O.S. can make the system more productive –Some process is running at.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
Operating Systems CPU Scheduling.
CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 6: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
Operating System Concepts
So far…. Firmware identifies hardware devices present
TDC 311 Process Scheduling.
Operating systems Process scheduling.
CPU scheduling decisions may take place when a process:
Chapter 5: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
Processor Scheduling Hank Levy 1.
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
CPU Scheduling: Basic Concepts
CS703 - Advanced Operating Systems
CPU Scheduling.
Chapter 5: CPU Scheduling
Presentation transcript:

CPU Scheduling

Schedulers Process migrates among several queues –Device queue, job queue, ready queue Scheduler selects a process to run from these queues Long-term scheduler: –load a job in memory –Runs infrequently Short-term scheduler: –Select ready process to run on CPU –Should be fast Middle-term scheduler –Reduce multiprogramming or memory consumption

Process Scheduling “process” and “thread” used interchangeably Many processes in “ready” state Which ready process to pick to run on the CPU? –0 ready processes: run idle loop –1 ready process: easy! –> 1 ready process: what to do? NewReadyRunningExit Waiting

When does scheduler run? Non-preemptive minimum –Process runs until voluntarily relinquish CPU process blocks on an event (e.g., I/O or synchronization) process terminates Preemptive minimum –All of the above, plus: Event completes: process moves from blocked to ready Timer interrupts Implementation: process can be interrupted in favor of another New Ready Running Exit Waiting

Process Model Process alternates between CPU and I/O bursts –CPU-bound jobs: Long CPU bursts –I/O-bound: Short CPU bursts –I/O burst = process idle, switch to another “for free” –Problem: don’t know job’s type before running An underlying assumption: –“response time” most important for interactive jobs (I/O bound) Matrix multiply emacs

Scheduling Evaluation Metrics Many quantitative criteria for evaluating sched algo: –CPU utilization: percentage of time the CPU is not idle –Throughput: completed processes per time unit –Turnaround time: submission to completion –Waiting time: time spent on the ready queue –Response time: response latency –Predictability: variance in any of these measures The right metric depends on the context

“The perfect CPU scheduler” Minimize latency: response or job completion time Maximize throughput: Maximize jobs / time. Maximize utilization: keep I/O devices busy. –Recurring theme with OS scheduling Fairness: everyone makes progress, no one starves

Problem Cases Blindness about job types –I/O goes idle Optimization involves favoring jobs of type “A” over “B”. –Lots of A’s? B’s starve Interactive process trapped behind others. –Response time sucks for no reason Priorities: A depends on B. A’s priority > B’s. –B never runs