Classification of scheduling policies Preemptive methods (typical representative: RR) Non-preemptive methods (typical representative: FCFS) Preemption.

Slides:



Advertisements
Similar presentations
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
CH 5. CPU Scheduling Basic Concepts F CPU Scheduling  context switching u CPU switching for another process u saving old PCB and loading.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 17 Scheduling III.
Operating Systems Chapter 6
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Operating Systems CPU Scheduling. Agenda for Today What is Scheduler and its types Short-term scheduler Dispatcher Reasons for invoking scheduler Optimization.
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
Day 25 Uniprocessor scheduling. Algorithm: Selection function Selection function – which process among ready processes to select. w – time spent in system,
Chapter 3: CPU Scheduling
Scheduling in Batch Systems
Uniprocessor Scheduling Chapter 9. Aim of Scheduling The key to multiprogramming is scheduling Scheduling is done to meet the goals of –Response time.
Chapter 5-CPU Scheduling
1 Uniprocessor Scheduling Chapter 9. 2 Aims of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
Job scheduling Queue discipline.
02/11/2004CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
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 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 6 CPU SCHEDULING.
Scheduling Chap 2. Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling To improve: Response time: time it takes a system to react to a given input Turnaround Time (TAT)
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 Our focus  scheduling a single CPU among all the processes in the system  Key Criteria: Maximize CPU utilization Maximize throughput Minimize waiting.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
1 Uniprocessor Scheduling Chapter 9. 2 Aim of Scheduling Response time Throughput Processor efficiency.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Uniprocessor Scheduling
Uniprocessor Scheduling Chapter 9. Processor Scheduling Processor scheduling determines the assignment of processes to be executed by the processor over.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
1 Computer Systems II Process Scheduling. 2 Review of Process States.
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.
Introduction to Operating System Created by : Zahid Javed CPU Scheduling Fifth Lecture.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
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
Basic Concepts Maximum CPU utilization obtained with multiprogramming
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.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
CPU SCHEDULING.
Uniprocessor Scheduling
Uniprocessor Scheduling
Chapter 2 Scheduling.
Uniprocessor Scheduling
Chapter 2.2 : Process Scheduling
CPU Scheduling.
Chapter 6: CPU Scheduling
CPU Scheduling Basic Concepts Scheduling Criteria
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Operating System Concepts
Chapter5: CPU Scheduling
Chapter 9 Uniprocessor Scheduling
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Chapter 6: CPU Scheduling
Uniprocessor Scheduling
CPU Scheduling.
CPU Scheduling: Basic Concepts
Chapter 5: CPU Scheduling
Presentation transcript:

Classification of scheduling policies Preemptive methods (typical representative: RR) Non-preemptive methods (typical representative: FCFS) Preemption reasons: Service interrupted by various external events (e.g., clock interrupt, new arrivals in the ready queue and changes of priority within that queue). Once decided to start another process, the policy that selects the new process makes a priority decision: The most urgent process should run next.

Classes of Scheduling Scheduling: Time Management Long term scheduling: which jobs (or job steps) to run next. Medium term scheduling: which running processes to block as resources are overcommitted or because a resource request cannot be served at the time. Short-term scheduling: decides how to share the computer among all processes that currently want to perform some computation (typically tens of times each second).

Scheduling levels combination

Interactive processes Should be given special attention. Users need to see immediate reaction to their commands. Typically stay within the short scheduler’s control for very limited time. I/O bound processes also spend a lot of time getting data from devices or files (e.g., COBOL).

First Come, First Served Non pre-emptive policy Never leaves the domain of the short-term scheduler

FCFS Statistics

Round Robin (RR) q: quantum new arrivals added at the end of the queue q>largest service time: FCFS q~0: Processor Sharing

RR Statistics

Shortest Process Next (SPN) SPN is an attempt to improve the response rate for short processes (alike RR) but without pre-emption. SPN requires explicit information about the service-time reqs of a process. Problem: collection of time req estimates. Solution: low pass filter calculation of the average, exponentially distributed service time.

SPN example

SPN statistics

Pre-emptive shortest process next Combination of RR and SPN PSPN preempts the current process when another process arrives with a total service time req less than the remaining service time of the current process. PSPN gives the best possible average penalty ratio because it keeps the ready list as short as possible.

Highest penalty ratio next (HPRN) Non pre-emptive scheme. When some process departs from the CPU, the ready process with the highest penalty ratio is selected for execution. Penalty ratio = T/t, T: time that process is present/visible to the short term scheduler (includes execution time), t: execution time. T: finish time-arrival time. Problem: estimation of t.

Multiple-level feedback (FB) Ready list split into a number of queues: 0, 1, 2, …. Lower-numbered queues have high priority. When a process is interrupted a new one is selected from the lowest numbered queue that has processes. After a process has consumed some quanta, it is placed at the end of the next-higher numbered queue.

FB schedule

FB statistics

FB variations Quantum size dependent on queue. Queue numbered n has a quantum size 2 n q where q is a “basic size”. First queue: q, Second queue: 2q, Third queue: 4q ….. A process in queue n is schedule RR for 2 n (or n) quanta and then put into another queue. Process promoted to higher priority after spending some time waiting for service in current queue.

FB schedule (exponentially growing quanta)

FB statistics (exponentially growing quanta)

Selfish RR (SRR) Better service to “old” processes than to newcomers. Ready list partitioned into two lists: new and accepted. New processes wait. Accepted processes are serviced RR. Priority of new processes increases at rate α. Priority of accepted processes increases at rate β.

SRR example

SRR statistics

Arrival process assumptions

Penalty ratios for short term scheduling

Missed time for short-term scheduling

Priority information Intrinsic properties: characteristics that distinguish one process from another. Include service-time requirements, storage needs, resources held, and the amount of I/O required. Extrinsic properties: characteristics that have to do with the user who owns the process. Extrinsic properties include the urgency of the process and how much the user is willing to pay to purchase special treatment. Dynamic properties: the load that other processes are placing on resources. Dynamic properties include the size of the ready list and the amount of main store available.

Classification of scheduling policies