Introduction to Scheduling 1

Save this PDF as:

Size: px
Start display at page:

Transcription

1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms FCFS, SJF, RR Exponential Averaging Multi-level Queue Scheduling Performance Evaluation Scheduling Terminology Scheduling Terminology Scheduling/Process State Transition Why/When Processes Switch Objectives for Schedulers Introduction to Scheduling 1

2 Objectives for Schedulers (cont d) CPU burst and I/O Burst Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution Alternating Sequence of CPU And I/O Bursts Histogram of CPU-burst Times 10 Types of Schedulers 11 CPU (Short Term) Scheduler Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them. CPU scheduling decides which process to switch from ready state to running state. 12 Introduction to Scheduling 2

3 CPU Scheduling Algorithms First Come First Served (FCFS) Shortest Job First (SJF) Round Robin (RR) Multi-level Queues Multi-level with Feedback (There are many others) First-Come, First-Served (FCFS) Scheduling Process Burst Time P 1 24 P 2 3 P 3 3 Suppose that the processes arrive in the order: P 1, P 2, P 3 P 1 P 2 P 3 The Gantt Chart for the schedule is: FCFS Scheduling (Cont.) Suppose that the processes arrive in the order P 2, P 3, P 1. The Gantt chart for the schedule is: 0 P 2 P 3 Waiting time for P 1 = 6; P 2 = 0 ; P 3 = 3 Average waiting time: ( )/3 = 3 Much better than previous case. Convoy effect short process behind long process P Waiting time for P 1 = 0; P 2 = 24; P 3 = 27 Average waiting time: ( )/3 = Shortest-Job-First (SJF) Scheduling Associate with each process the length of its next CPU burst. Use these lengths to schedule the process with the shortest time. Two schemes: nonpreemptive once CPU given to the process it cannot be preempted until completes its CPU burst. preemptive if a new process arrives with CPU burst length less than remaining time of current executing process, preempt. This scheme is know as the Shortest-Remaining-Time-First (SRTF). SJF is optimal gives minimum average waiting time for a given set of processes. 16 Example of Non-Preemptive SJF Process Arrival TimeBurst Time P P P P SJF (non-preemptive) 0 P 1 P 3 P Average waiting time = ( )/4-4 P 4 17 Example of Preemptive SJF Process Arrival TimeBurst Time P P P P SJF (preemptive) 0 P 1 P 2 P 3 P 2 P 4 P Average waiting time = ( )/ Introduction to Scheduling 3

4 Priority Scheduling A priority number (integer) is associated with each process The CPU is allocated to the process with the highest priority (smallest integer highest priority). SJF is a priority scheduling where priority is the predicted next CPU burst time. Problem Starvation low priority processes may never execute. Solution Aging as time progresses increase the priority of the process. Determining Length of Next CPU Burst for SJF Can only estimate the length. Can be done by using the length of previous CPU bursts, using exponential averaging. th 1. t n = actual lenght of n CPU burst 2. t n + 1 = predicted value for the next CPU burst 3. a, 0 a 1 4. Define : t = a t + ( -a) t. n= 1 n 1 n Prediction of the Length of the Next CPU Burst Examples of Exponential Averaging a =0 t n+1 = t n Recent history does not count. a =1 t n+1 = t n Only the actual last CPU burst counts. If we expand the formula, we get: t n+1 = a t n +(1 - a) a t n (1 - a ) j a t n (1 - a ) n=1 t n t 0 Since both a and (1 - a) are less than or equal to 1, each successive term has less weight than its predecessor. 22 Exponential Averaging 23 Round Robin (RR) Each process gets a small unit of CPU time (time quantum), usually milliseconds. After this time has elapsed, the process is preempted and added to the end of the ready queue. If there are n processes in the ready queue and the time quantum is q, then each process gets 1/n of the CPU time in chunks of at most q time units at once. No process waits more than (n-1)q time units. Performance q large fi FIFO q small fi q must be large with respect to context switch, otherwise overhead is too high. 24 Introduction to Scheduling 4

5 Example of RR with Time Quantum = 20 Process Burst Time P 1 53 P 2 17 P 3 68 P 4 24 The Gantt chart is: P 1 P 2 P 3 P 4 P 1 P 3 P 4 P 1 P 3 P Time Quantum and Context Switch Time Turnaround Time Varies With The Time Quantum Typically, higher average turnaround than SJF, but better response 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 Multilevel Queue Scheduling 20% to background in FCFS 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 30 Introduction to Scheduling 5

6 Example of Multilevel Feedback Queue Three queues: Q 0 time quantum 8 milliseconds Q 1 time quantum 16 milliseconds Q 2 FCFS Scheduling A new job enters queue Q 0 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. Multilevel Feedback Queues Performance for Schedulers Queuing Theory Analysis Queuing Theory Analysis (cont d) Queuing Theory Analysis (cont d) Introduction to Scheduling 6

7 Queuing Theory Analysis (cont d) Queuing Theory Analysis (cont d) Simulation Analysis Evaluation of CPU Schedulers by Simulation Simulation Analysis (cont d) Empirical Experiments Introduction to Scheduling 7

8 Solaris 2 Scheduling Windows 2000 Priorities Introduction to Scheduling 8

CPU Scheduling. Chapter 5

CPU Scheduling Chapter 5 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait CPU burst distribution

Basic Concepts. Chapter 6: CPU Scheduling. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts

Chapter 6: CPU Scheduling Basic Concepts Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Maximum CPU utilization obtained

Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 1 Basic Concepts Maximum CPU utilization obtained

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

Types of jobs. CPU-bound vs. I/O-bound. Batch, Interactive, real time. Maximum CPU utilization obtained with multiprogramming

CPU Scheduling Types of jobs CPU-bound vs. I/O-bound Maximum CPU utilization obtained with multiprogramming Batch, Interactive, real time Different goals, affects scheduling policies CPU Scheduler Selects

CPU Scheduling CS 571. CPU - I/O Burst Cycle. Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process

CPU Scheduling CS 571 1 CPU - I/O Burst Cycle Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process 2 1 Basic Concepts CPU I/O Burst Cycle Process execution consists

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 Basic Concepts Maximum CPU utilization obtained

Chapter 5: Process Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: Process Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Oct-03 1 Basic Concepts Maximum CPU utilization

CPU Scheduling. Multiprogrammed OS

CPU Scheduling Multiprogrammed OS Efficient Use of Processor By switching between jobs Thread scheduling and process scheduling often used interchangeably Which is done depends on implementation of O/S.

CPU Scheduling. Basic Concepts. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times CPU. Alternating Sequence of CPU and I/O Bursts

Basic Concepts P CPU Scheduling CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating

CS720 - Operating Systems. CPU Scheduling

CS720 - Operating Systems CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Procesor Scheduling Real-Time Scheduling Algorithm Evaluation Slides derived from material in

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various scheduling algorithms

Chapter 6: CPU Scheduling

1 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 2 Basic Concepts Maximum CPU utilization

Module 6: CPU Scheduling. Basic Concepts. Alternating Sequence of CPU And I/O Bursts

Module 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Applied Operating System Concepts 6.1 Basic Concepts

Module 5: CPU Scheduling

Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Operating System Concepts 5.1 Silberschatz and

CPU Scheduling. Operating System Concepts. Alternating Sequence of CPU And I/O Bursts. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times

Operating System Concepts Module 5: CPU SCHEDULING Andrzej Bednarski, Ph.D. student Department of Computer and Information Science Linköping University, Sweden CPU Scheduling Basic Concepts Scheduling

Module 6: CPU Scheduling. Basic Concepts

Module 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Applied Operating System Concepts 6.1 Silberschatz,

Chapter 5: Process Scheduling. Chapter 5: Process Scheduling

Chapter 5: Process Scheduling Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Operating Systems Examples Java Thread Scheduling Algorithm

Chapter 6: CPU Scheduling. Basic Concepts

1 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 Basic Concepts Maximum CPU utilization obtained

Chapter 5: CPU Scheduling!

Chapter 5: CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms! Multiple-Processor Scheduling! Real-Time Scheduling! Algorithm Evaluation! 6.1! Basic Concepts! Long-term scheduler

Chapter 6: CPU Scheduling

Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Chapter 6: 6.1 Basic Concepts Maximum CPU utilization obtained with multiprogramming.

Process Scheduling. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University.

Process Scheduling Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Basic Concepts Scheduling Criteria Scheduling Algorithms Windows NT Scheduler Topics Covered

Chapter 6: CPU Scheduling. Operating System Concepts Essentials 2 nd Edition

Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

Chapter 6: CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Operating System Concepts 6.1 Basic Concepts Maximum CPU utilization obtained with multiprogramming. CPU I/O Burst Cycle

CPU scheduling. CPU Scheduling. No.4. CPU burst vs. I/O burst. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

EECS 3221 Operating System Fundamentals No.4 CPU scheduling Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University CPU Scheduling CPU scheduling is the basis of multiprogramming

CPU scheduling. Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times. CPU Scheduler

CPU scheduling Alternating Sequence of CPU And I/O Bursts Maximum CPU utilization is obtained by multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait.

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts

Objectives Chapter 5: CPU Scheduling Introduce CPU scheduling, which is the basis for multiprogrammed operating systems Describe various CPU-scheduling algorithms Discuss evaluation criteria for selecting

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

Chapter 5: Process Scheduling. Operating System Concepts with Java 8 th Edition

Chapter 5: Process Scheduling Operating System Concepts with Java 8 th Edition 5.1 Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms

Objectives. 5.1 Basic Concepts. Scheduling Criteria. Multiple-Processor Scheduling. Algorithm Evaluation. Maximum CPU.

Chapter 5: Process Scheduling Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms To discuss evaluation criteria for selecting the CPU-scheduling algorithm for a particular

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms Chapter 5: Process Scheduling To discuss evaluation criteria for selecting the CPUscheduling algorithm for a particular

Agenda. CPU Scheduling. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times. Alternating Sequence of CPU And I/O Bursts

TDDB3: Concurrent programming and operating systems [SGG7] Chapter 5 Agenda CPU Scheduling Introduce CPU scheduling Describe various CPU scheduling algorithms Discuss evaluation criteria of CPU scheduling

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

Objectives Chapter 5: CPU Scheduling Introduce CPU scheduling, which is the basis for multiprogrammed operating systems Describe various CPU-scheduling algorithms Discuss evaluation criteria for selecting

5.1 Basic Concepts. Chapter 5: Process Scheduling. Alternating Sequence of CPU And I/O Bursts. 5.1 Basic Concepts

5.1 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait CPU burst distribution Chapter 5: Process

CPU Scheduling. Date. 2/2/2004 Operating Systems 1

CPU Scheduling Date 2/2/2004 Operating Systems 1 Basic concepts Maximize CPU utilization with multi programming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait.

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

Introduction to process scheduling. Process scheduling and schedulers Process scheduling criteria Process scheduling algorithms

Lecture Overview Introduction to process scheduling Process scheduling and schedulers Process scheduling criteria Process scheduling algorithms First-come, first-serve Shortest-job-first Priority Round-robin

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling 1.1 Maximum CPU utilization obtained with multiprogramming CPU I/O Burst

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples Java Thread Scheduling

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms!

CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms! First-Come-First-Served! Shortest-Job-First, Shortest-remaining-Time-First! Priority Scheduling! Round Robin! Multi-level Queue!

Chapter 5: CPU Scheduling. Operating System Concepts with Java 8 th Edition

Chapter 5: CPU Scheduling 5.1 Silberschatz, Galvin and Gagne 2009 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU

CPU Scheduling: Basic Concepts

CPU Scheduling: Basic Concepts Idea: Maximum CPU utilization obtained with multiprogramming" CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait" Dispatcher grants CPU

Operating Systems Fall 2012 Lecture 4: CPU Scheduling

482000000000357 Operating Systems Fall 2012 Lecture 4: CPU Scheduling Assist. Prof. Ediz ŞAYKOL ediz.saykol@beykent.edu.tr Operating System - Main Goals Interleave the execution of the number of processes

ECE3055 Computer Architecture and Operating Systems

ECE3055 Computer Architecture and Operating Systems Lecture: CPU Scheduling Prof. Hsien-Hsin Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology H.-H. S. Lee 1 Overview

Chapter 5: CPU Scheduling. Chapter 5: CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

CPU Scheduling. CPU Scheduling

CPU Scheduling Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

CPU Scheduling Algorithms

CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those from the course text Operating Systems Concepts, 9th ed., by Silberschatz, Galvin, and Gagne. Many, if not

Chapter 5: CPU Scheduling. Operating System Concepts 7 th Edition, Jan 14, 2005

Chapter 5: CPU Scheduling Operating System Concepts 7 th Edition, Jan 14, 2005 Silberschatz, Galvin and Gagne 2005 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

Chapter 4: CPU Scheduling. Basic Concepts. Objectives. Basic Concepts Scheduling Criteria Scheduling Algorithms. Operating Systems Examples

Chapter 4: CPU Scheduling Chapter 4: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Operating Systems Examples, Silberschatz, Galvin and Gagne 2009

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

Announcements Reading Chapter 5 Chapter 7 (Monday or Wednesday) Basic Concepts CPU I/O burst cycle Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution What are the

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating

ECE3055 Computer Architecture and Operating Systems

ECE3055 Computer Architecture and Operating Systems Lecture: CPU Scheduling Prof. Hsien-Hsin Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology H.-H. S. Lee 1 Overview

Chapter 6: CPU Scheduling

Department of Electr rical Eng ineering, Chapter 6: CPU Scheduling 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Feng-Chia Unive ersity Outline Basic Concepts Scheduling Criteria Scheduling

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm Evaluation Objectives To introduce

Lecture 5 Process Scheduling (chapter 5)

Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 5 Process Scheduling (chapter 5) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The slides

CS 571 Operating Systems. CPU Scheduling. Angelos Stavrou, George Mason University

CS 571 Operating Systems CPU Scheduling Angelos Stavrou, George Mason University CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms First-Come-First-Served Shortest-Job-First, Shortest-remaining-Time-First

Process and Thread Scheduling. Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005

Process and Thread Scheduling Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005 Scheduling Context switching an interrupt occurs (device completion, timer interrupt)

Announcements Project #2. Basic Concepts

Announcements Project #2 Is due at 6:00 PM on Friday Program #3 Posted tomorrow (implements scheduler) Reading Chapter 6 Basic Concepts CPU I/O burst cycle Process execution consists of a cycle of CPU

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 5: PROCESS SCHEDULING Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor

Chapter 5: CPU Scheduling. Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

Chapter 5: Process Scheduling

Chapter 5: Process Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Edited by Ghada Ahmed, PhD ghada@fcih.net Silberschatz, Galvin and Gagne 2013 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating

CS420: Operating Systems

CPU Scheduling James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Scheduling Concepts

CPU Scheduling. Dr. Yingwu Zhu

CPU Scheduling Dr. Yingwu Zhu Overview In discussing process/threads management and synchronization, we talked about context switching among processes/threads on the ready queue But we have not glossed

CPU SCHEDULING. Scheduling Objectives. Outline. Basic Concepts. Enforcement of fairness in allocating resources to processes

Scheduling Objectives CPU SCHEDULING Enforcement of fairness in allocating resources to processes Enforcement of priorities Make best use of available system resources Give preference to processes holding

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Linux Example

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Based on original slides by Silberschatz, Galvin and Gagne 1 Basic Concepts CPU I/O Burst Cycle Process execution

Chapter 5: CPU Scheduling!

Chapter 5: CPU Scheduling Operating System Concepts 8 th Edition, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling

CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling

CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Basic Concepts An OS must allocate resources amongst competing processes The resource

Chapter 5: Process Scheduling

Chapter 5: Process Scheduling Chapter 5: Process Scheduling 5.1 Basic Concepts 5.2 Scheduling Criteria 5.3 Scheduling Algorithms 5.3.1 First-Come, First-Served Scheduling 5.3.2 Shortest-Job-First Scheduling

Scheduling I. Introduction to scheduling. Scheduling algorithms

Scheduling I Introduction to scheduling Scheduling algorithms 1 Role of Dispatcher vs. Scheduler Dispatcher Low-level mechanism Responsibility: context switch Scheduler High-level policy Responsibility:

Slides from Silberschatz, Galvin and Gagne 2003 Thu D. Nguyen Michael Hicks

Slides from Silberschatz, Galvin and Gagne 2003 Thu D. Nguyen Michael Hicks Basic Concepts CPU-I/O burst cycle - Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution

Lecture 5 CPU Scheduling

Lecture 5 CPU Scheduling (Uniprocessor System) 1 Lecture Contents 1. Basic Concepts 2. Scheduling Criteria 3. Scheduling Algorithms 2 Switching CPU among processes in multiprogrammed OSs makes a computer

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition,

Chapter 6: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating

Scheduling for uniprocessor systems Introduction

Politecnico di Milano Introduction Lecturer: William Fornaciari Politecnico di Milano william.fornaciari@elet.polimi.it Home.dei.polimi.it/fornacia SUMMARY Basic Concepts Scheduling Criteria Scheduling

Escalonamento de Processos

Escalonamento de Processos SLIDES 6B Short-Term Scheduling Known as the dispatcher Executes most frequently Invoked when an event occurs Clock interrupts I/O interrupts Operating system calls Signals Scheduling

Scheduling Reading: Silberschatz chapter 6 Additional Reading: Stallings chapter 9 EEL 358 1 Outline Introduction Types of Scheduling Scheduling Criteria FCFS Scheduling Shortest-Job-First Scheduling Priority

CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU and I/O Bursts

CS307 Basic Concepts Maximize CPU utilization obtained with multiprogramming CPU Scheduling CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait CPU burst distribution

III. Process Scheduling

Intended Schedule III. Process Scheduling Date Lecture Hand out Submission 0 20.04. Introduction to Operating Systems Course registration 1 27.04. Systems Programming using C (File Subsystem) 1. Assignment

III. Process Scheduling

III. Process Scheduling 1 Intended Schedule Date Lecture Hand out Submission 0 20.04. Introduction to Operating Systems Course registration 1 27.04. Systems Programming using C (File Subsystem) 1. Assignment

Basic Concepts (1) Multiprogramming requires CPU scheduling CPU-I/O burst cycle CPU scheduler

CPU Scheduling Basic Concepts (1) Multiprogramming requires CPU scheduling CPU-I/O burst cycle CPU scheduler Short-term scheduler Ready queue may be a FIFO queue, priority queue, tree, linked list, etc.

Lecture 6- CPU Scheduling Continued

Lecture 6- CPU Scheduling Continued Instructor : Bibhas Ghoshal (bibhas.ghoshal@iiita.ac.in) Autumn Semester, 2015 Bibhas Ghoshal IOSY 332C & IOPS 332C: OS Autumn Semester, 2015 1 / 24 Shortest Remaining

ICS 143 - Principles of Operating Systems

ICS 143 - Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Note that some slides are adapted from course text slides 2008 Silberschatz. Some

CS307 Operating Systems CPU Scheduling

CS307 CPU Scheduling Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2016 Basic Concepts Maximize CPU utilization obtained with multiprogramming CPU I/O Burst

Operating Systems Scheduling

Operating Systems Scheduling ECE 344 Week 9 Scheduling Task: Determine which process is allowed to run What are the objectives? Maximize CPU utilization Throughput (tasks per unit of time) Minimize Turnaround

multiple processes are kept in memory simultaneously when one process is waiting, another process executes

Terminology. Reference: Section 4.2, 5.1 Time-sharing / multiprogramming Typical proc. alternates between CPU bursts and I/O bursts To maximize CPU utilization: multiple processes are kept in memory simultaneously

Describe various CPU-scheduling algorithms. Describe various multi- processor CPU-scheduling algorithms

CPU Scheduling Objectives Describe various CPU-scheduling algorithms Describe various multi- processor CPU-scheduling algorithms To discuss evaluation criteria for selecting a CPUscheduling algorithm for

CSC 539: Operating Systems Structure and Design. Spring 2006

CSC 539: Operating Systems Structure and Design Spring 2006 CPU scheduling historical perspective CPU-I/O bursts preemptive vs. nonpreemptive scheduling scheduling criteria scheduling algorithms: FCFS,

CPU Scheduling. Overview: CPU Scheduling. [SGG7/8/9] Chapter 5. Basic Concepts. CPU Scheduler. Scheduling Criteria. Optimization Criteria

TDDB68 Concurrent programming and operating systems CPU Scheduling Overview: CPU Scheduling CPU bursts and I/O bursts Scheduling Criteria Scheduling Algorithms Priority Inversion Problem Multiprocessor

Processor Scheduling. Background. Scheduling. Scheduling

Background Processor Scheduling The previous lecture introduced the basics of concurrency Processes and threads Definition, representation, management We now understand how a programmer can spawn concurrent

Process Management. Processes. CS 502 Spring 99 WPI MetroWest/Southboro Campus

Process Management CS 502 Spring 99 WPI MetroWest/Southboro Campus Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Threads Interprocess Communication 1 1 Process