Scheduling. Objectives – Fairness – Maximize throughput – Maximize the number of users receiving acceptable response times – Minimize overhead – Balance.

Slides:



Advertisements
Similar presentations
CPU Scheduling Questions answered in this lecture: What is scheduling vs. allocation? What is preemptive vs. non-preemptive scheduling? What are FCFS,
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.
Operating Systems Chapter 6
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,
Operating Systems 1 K. Salah Module 2.1: CPU Scheduling Scheduling Types Scheduling Criteria Scheduling Algorithms Performance Evaluation.
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs. Nonpreemptive Scheduling 8.4Priorities 8.5Scheduling Objectives.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (2) Process Management 10/03/2008 Yang Song (Prepared by Yang Song and.
1 Uniprocessor Scheduling Chapter 9. 2 Aims of Scheduling Assign processes to be executed by the processor(s) Response time Throughput Processor efficiency.
7/12/2015Page 1 Process Scheduling B.Ramamurthy. 7/12/2015Page 2 Introduction An important aspect of multiprogramming is scheduling. The resources that.
02/11/2004CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
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.
CPU Scheduling Chapter 6 Chapter 6.
Chapter 6: CPU Scheduling
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Lecture 11 Processor Scheduling Scheduling Algorithms Worker Threads and the Thread Pool.
CS212: OPERATING SYSTEM Lecture 3: Process Scheduling 1.
Chapter 6 CPU SCHEDULING.
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.
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)
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
1 Our focus  scheduling a single CPU among all the processes in the system  Key Criteria: Maximize CPU utilization Maximize throughput Minimize waiting.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Operating System 9 UNIPROCESSOR SCHEDULING. TYPES OF PROCESSOR SCHEDULING.
Uniprocessor Scheduling Chapter 9. Processor Scheduling Processor scheduling determines the assignment of processes to be executed by the processor over.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
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.
Scheduling. Objectives – Fairness – Maximize throughput – Maximize the number of users receiving acceptable response times – Minimize overhead – Balance.
Introduction to Operating System Created by : Zahid Javed CPU Scheduling Fifth Lecture.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Operating Systems Unit 5: – Processor scheduling – Java – Linux – Windows XP Operating Systems.
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
3. CPU Scheduling. CPU Scheduling Process execution – a cycle of CPU execution and I/O wait – figure Preemptive Non-Preemptive.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
CPU SCHEDULING.
Uniprocessor Scheduling
Uniprocessor Scheduling
Chapter 8 – Processor Scheduling
Chapter 2.2 : Process Scheduling
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 6: CPU Scheduling
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Scheduling

Objectives – Fairness – Maximize throughput – Maximize the number of users receiving acceptable response times – Minimize overhead – Balance resource use – Balance between response time and resource utilization – Avoid indefinite postponement – Enforce priorities – Give preference to processes holding critical resources

Running Ready Blocke d Blocked, suspende d NewExit Ready, suspende d Low-level (short-term) Medium-level (medium-term) High-level (long- term) SCHEDULING LEVELS

Scheduling functions High-leveljob schedulingdetermines which programs are admitted to the system Medium-levelswappingpage-in, page-out Low-leveldispatchingwhich process to execute next – Preemptive vs non preemptive – Priorities

SCHEDULING POLICIES FIFORound RobinSPN (SPF)*SRT*HRRN*FeedbackFair share selection function max {w}constant, time quantum min {s}min {s-e}max {(w+s)/s} min{w}, using queues f {base, CPU, GCPU} decision mode Non preemptive preemptiveNon preemptive preemptiveNon preemptive preemptive throughputno emphasis low if quantum too small high no emphasis response time high if large variance good for short processes good no emphasis overheadminimumlowcan be high effectpenalizes: short and I/O bound fair treatmentpenalize long processes good balance may favor I/O bound favor highest priorities starvationNo Possible NoPossibleNo * require knowledge of process length w = time in the system; e = time executing; s = total time required

First-In-First-Out (FIFO) Scheduling

Round-Robin (RR) Scheduling Quantum size: determines response time to interactive requests –Very large quantum size Processes run for long periods Degenerates to FIFO –Very small quantum size System spends more time context switching than running processes –Middle-ground Long enough for interactive processes to issue I/O request Batch processes still get majority of processor time

Shortest-Process-First (SPF) Scheduling Scheduler selects process with smallest time to finish –Lower average wait time than FIFO Reduces the number of waiting processes –Potentially large variance in wait times –Nonpreemptive Results in slow response times to arriving interactive requests –Relies on estimates of time-to-completion Can be inaccurate or falsified –Unsuitable for use in modern interactive systems

Highest-Response-Ratio-Next (HRRN) Scheduling HRRN scheduling –Improves upon SPF scheduling –Still nonpreemptive –Considers how long process has been waiting –Prevents indefinite postponement

Shortest-Remaining-Time (SRT) Scheduling SRT scheduling –Preemptive version of SPF –Shorter arriving processes preempt a running process –Very large variance of response times: long processes wait even longer than under SPF –Not always optimal Short incoming process can preempt a running process that is near completion Context-switching overhead can become significant

Multilevel Feedback Queues Different processes have different needs –Short I/O-bound interactive processes should generally run before processor-bound batch processes –Behavior patterns not immediately obvious to the scheduler Multilevel feedback queues –Arriving processes enter the highest-level queue and execute with higher priority than processes in lower queues –Long processes repeatedly descend into lower levels Gives short processes and I/O-bound processes higher priority Long processes will run when short and I/O-bound processes terminate –Processes in each queue are serviced using round-robin Process entering a higher-level queue preempt running processes

Multilevel Feedback Queues

Fair Share Scheduling FSS controls users’ access to system resources –Some user groups more important than others –Ensures that less important groups cannot monopolize resources –Unused resources distributed according to the proportion of resources each group has been allocated –Groups not meeting resource-utilization goals get higher priority

Multiprocessor scheduling – Types of multiprocessors loosely coupled functionally specialized tightly coupled – Multiprocessors and parallelism (synchronization granularity) Fine (in a single stream) Medium (within a single application) Coarse (concurrent processes in a system) Very coarse (across network nodes) Independent (unrelated processes)