Lecture 23: Process Scheduling for Interactive Systems

Slides:



Advertisements
Similar presentations
Scheduling Introduction to Scheduling
Advertisements

CPU Scheduling.
Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
Operating Systems CPU Scheduling. Agenda for Today What is Scheduler and its types Short-term scheduler Dispatcher Reasons for invoking scheduler Optimization.
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
02/06/2008CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
02/11/2004CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
CS212: OPERATING SYSTEM Lecture 3: Process Scheduling 1.
More Scheduling cs550 Operating Systems David Monismith.
Round Robin Scheduling A preemptive scheduling designed for Time Sharing Systems The Ready Queue is treated as a circular queue A small execution.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
1 Scheduling The part of the OS that makes the choice of which process to run next is called the scheduler and the algorithm it uses is called the scheduling.
Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times.
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
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
ITFN 2601 Introduction to Operating Systems Lecture 4 Scheduling.
Process Control Management
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
CSC 322 Operating Systems Concepts Lecture - 10: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
Lecture 12 Scheduling Models for Computer Networks Dr. Adil Yousif.
First In First Out SJF is a scheduling policy that selects a waiting process with the smallest execution time to execute next. Shortest Job First Shortest.
Process Scheduling. Scheduling Strategies Scheduling strategies can broadly fall into two categories  Co-operative scheduling is where the currently.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
1 Module 5: Scheduling CPU Scheduling Scheduling Algorithms Reading: Chapter
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5a: CPU Scheduling
Chapter 2 Scheduling.
Operating Systems Processes Scheduling.
Day 25 Uniprocessor scheduling
Lecture 24: Process Scheduling Examples and for Real-time Systems
Scheduling (Priority Based)
CPSC 457 Operating Systems
CPU Scheduling.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Lecture 16 Syed Mansoor Sarwar
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
TDC 311 Process Scheduling.
COT 4600 Operating Systems Spring 2011
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
CGS 3763 Operating Systems Concepts Spring 2013
Chapter 5: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
Processor Scheduling Hank Levy 1.
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
CPU SCHEDULING CPU SCHEDULING.
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
CPU Scheduling CSE 2431: Introduction to Operating Systems
Presentation transcript:

Lecture 23: Process Scheduling for Interactive Systems

Review: Scheduling Algorithms for Batch Systems First come first serve Shortest job first Shortest remaining time next

Review: Scheduling Algorithm Goals All Systems Fairness – giving each process a fair share of the CPU Policy enforcement – seeing that stated policy is carried out Balance – keeping all parts of the system busy

Review: Scheduling Algorithm Goals Interactive Systems Response time – respond to requests quickly Proportionality – meet users’ expectations

Scheduling Algorithms for Interactive Systems Round-Robin scheduling Priority scheduling Multiple queues Lottery scheduling

Round Robin Give CPU time to each process by turn Quantum = CPU time allotted every turn how to choose the value of the quantum? Too small might mean high context switch overhead Too large might mean bad response times

Priority Scheduling Different Priorities: Background process sending mail vs: Shell process accepting input Requirement: Schedule jobs with highest priority first Issue: high priority jobs should not overwhelm the others Might decrease priority with time

Multiple Queues – static version System level processes High Interactive processes Background processes Low Lower priority queues don’t run if higher priority queues non-empty Could time slice between queues

Multiple Queues – dynamic version High Quantum = 1 Quantum = 2 Low Quantum = 4 Process enters high priority level If takes more than 1 quantum, moved to second highest priority, …..

Multiple Queues – dynamic version Higher priority = faster service, but short service times Reduce number of context switches for long processes

Lottery Scheduling Example: 3 processes, priorities 2, 3, 5 Distribute 20, 30, 50 tickets respectively System holds “lottery” 50 times a second Winner gets 20 ms of CPU time Gives probabilistic guarantees

RR, Q = 10 Arrival time CPU burst P1: 4 36 8 112 1 13 I/O burst 16 13 16 20 P1: 4 36 8 112 1 I/O burst P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Gantt chart

RR, Q = 10 13 16 20 P1: 4 36 8 112 1 P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Which process goes next, and when? Gantt chart P1 idle P2 P3 P4 0 4 13 23 27 29

RR, Q = 10 40 82 47 179 13 16 20 P1: 4 36 8 112 1 P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Gantt chart P1 idle P2 P3 P4 P2 0 4 13 23 27 29 42

RR, Q = 10 162 End Run 179 13 16 20 P1: 4 36 8 112 1 P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Gantt chart P1 idle P2 P3 P4 P2 P1 P3 P2 P3 0 4 13 23 27 29 42 50 90 92

RR, Q = 10 End 205 179 13 16 20 P1: 4 36 8 112 1 P2: 23 40 2 P3: 4 20 112 40 2 40 2 40 1 P4: 2 150 3 10 1 Gantt chart P1 idle P2 P3 P4 P2 P1 P3 P2 P3 P1 P3 idle 0 4 13 23 27 29 42 50 90 92 162 163 165