Operating Systems Process Scheduling Prof. Dr. Armin Lehmann

Similar documents
CPU Scheduling. Chapter 9

CSC 1600: Chapter 5. CPU Scheduling. Review of Process States

CSE 5343/7343 Fall 2006 PROCESS SCHEDULING

Scheduling Processes 11/6/16. Processes (refresher) Scheduling Processes The OS has to decide: Scheduler. Scheduling Policies

א א א א א א א א

CSC 553 Operating Systems

Lecture 3. Questions? Friday, January 14 CS 470 Operating Systems - Lecture 3 1

Comp 204: Computer Systems and Their Implementation. Lecture 10: Process Scheduling

CPU Scheduling: Part I. Operating Systems. Spring CS5212

Introduction to Operating Systems. Process Scheduling. John Franco. Dept. of Electrical Engineering and Computing Systems University of Cincinnati

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling

CPU scheduling. CPU Scheduling

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

CPU Scheduling. Jo, Heeseung

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

Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - V CPU Scheduling - I. University at Buffalo.

Chapter 9 Uniprocessor Scheduling

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

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

CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Unix Scheduler

FIFO SJF STCF RR. Operating Systems. Minati De. Department of Mathematics, Indian Institute of Technology Delhi, India. Lecture 6: Scheduling

Scheduling. CSE Computer Systems November 19, 2001

CS510 Operating System Foundations. Jonathan Walpole

Operating System 9 UNIPROCESSOR SCHEDULING

CS 143A - Principles of Operating Systems

Intro to O/S Scheduling. Intro to O/S Scheduling (continued)

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Uniprocessor Scheduling

Motivation. Types of Scheduling

Roadmap. Tevfik Ko!ar. CSC Operating Systems Spring Lecture - V CPU Scheduling - I. Louisiana State University.

Announcements. Program #1. Reading. Is on the web Additional info on elf file format is on the web. Chapter 6. CMSC 412 S02 (lect 5)

Simulation of Process Scheduling Algorithms

CS 153 Design of Operating Systems Winter 2016

Salisu Aliyu Department of Mathematics, Ahmadu Bello University, Zaria, Nigeria

CPU Scheduling. Jo, Heeseung

CPU Scheduling (Chapters 7-11)

Principles of Operating Systems

Project 2 solution code

Journal of Global Research in Computer Science

Reading Reference: Textbook: Chapter 7. UNIX PROCESS SCHEDULING Tanzir Ahmed CSCE 313 Fall 2018

A Paper on Modified Round Robin Algorithm

CPU Scheduling. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

CPU Scheduling. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

CPU Scheduling. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

IJCSC VOLUME 5 NUMBER 2 JULY-SEPT 2014 PP ISSN

CPU Scheduling. Disclaimer: some slides are adopted from book authors and Dr. Kulkarni s slides with permission

SE350: Operating Systems. Lecture 6: Scheduling

CS 111. Operating Systems Peter Reiher

Asia Pacific Journal of Engineering Science and Technology

Process Scheduling Course Notes in Operating Systems 1 (OPESYS1) Justin David Pineda

Review of Round Robin (RR) CPU Scheduling Algorithm on Varying Time Quantum

Lecture 11: CPU Scheduling

Advanced Types Of Scheduling

Lecture 6: CPU Scheduling. CMPUT 379, Section A1, Winter 2014 February 5

Process Scheduling I. COMS W4118 Prof. Kaustubh R. Joshi hdp://

Bhavin Fataniya 1, Manoj Patel 2 1 M.E(I.T) Student, I.T Department, L.D College Of Engineering, Ahmedabad, Gujarat, India ABSTRACT I.

A COMPARATIVE ANALYSIS OF SCHEDULING ALGORITHMS

Scheduling Algorithms. Jay Kothari CS 370: Operating Systems July 9, 2008

An operating system executes a variety of programs: Batch system - jobs Time-shared systems - user programs or tasks

LEAST-MEAN DIFFERENCE ROUND ROBIN (LMDRR) CPU SCHEDULING ALGORITHM

SCHEDULING AND CONTROLLING PRODUCTION ACTIVITIES

CSE 451: Operating Systems Spring Module 8 Scheduling

Comparative Analysis of Basic CPU Scheduling Algorithms

Operating Systems. Scheduling

Pallab Banerjee, Probal Banerjee, Shweta Sonali Dhal

CPU scheduling CPU 1. P k P 3 P 2 P 1 CPU 2. CPU n. The scheduling problem: Which jobs should we assign to which CPU(s)?

Process Scheduling for John Russo generated Mon Nov 07 13:57:15 EST 2011

A NOVEL METHOD BASED ON PRIORITY FOR ENHANCEMENT ROUND-ROBIN SCHEDULING ALGORITHM

A SURVEY ON TRADITIONAL AND EARLIER JOB SCHEDULING IN CLOUD ENVIRONMENT

Improvement of Queue Management for Real Time Task in Operating System

Homework 2: Comparing Scheduling Algorithms

OPERATING SYSTEMS. Systems and Models. CS 3502 Spring Chapter 03

A HYBRID ALGORITHM FOR MULTIPROCESSOR SCHEDULING

Motivating Examples of the Power of Analytical Modeling

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS

September 30 th, 2015 Prof. John Kubiatowicz

DRR Based Job Scheduling for Computational Grid and its Variants

Efficient Round Robin Scheduling Algorithm with Dynamic Time Slice

An Optimized Task Scheduling Algorithm in Cloud Computing Environment

Real-Time and Embedded Systems (M) Lecture 4

Scheduling: Introduction

CS 425 / ECE 428 Distributed Systems Fall 2018

Example. You manage a web site, that suddenly becomes wildly popular. Performance starts to degrade. Do you?

CS 425 / ECE 428 Distributed Systems Fall 2017

OPTIMAL ALLOCATION OF WORK IN A TWO-STEP PRODUCTION PROCESS USING CIRCULATING PALLETS. Arne Thesen

Improving Throughput and Utilization in Parallel Machines Through Concurrent Gang

Mixed Round Robin Scheduling for Real Time Systems

Queue based Job Scheduling algorithm for Cloud computing

Lecture 11: Scheduling

A New Proposed Dynamic Quantum for Priority Based Round Robin Scheduling Algorithm

TASK SCHEDULING BASED ON EFFICIENT OPTIMAL ALGORITHM IN CLOUD COMPUTING ENVIRONMENT

Design and Performance Evaluation of Smart Job First Dynamic Round Robin (SJFDRR) Scheduling Algorithm with Smart Time Quantum

TCSS 422: OPERATING SYSTEMS

A Survey of Resource Scheduling Algorithms in Green Computing

Comparative Study of Parallel Scheduling Algorithm for Parallel Job

Application the Queuing Theory in the Warehouse Optimization Jaroslav Masek, Juraj Camaj, Eva Nedeliakova

Recall: FCFS Scheduling (Cont.) Example continued: Suppose that processes arrive in order: P 2, P 3, P 1 Now, the Gantt chart for the schedule is:

LOAD SHARING IN HETEROGENEOUS DISTRIBUTED SYSTEMS

ENGG4420 CHAPTER 4 LECTURE 3 GENERALIZED TASK SCHEDULER

Transcription:

Operating Systems Process Scheduling Prof. Dr. Armin Lehmann lehmann@e-technik.org Fachbereich 2 Informatik und Ingenieurwissenschaften Wissen durch Praxis stärkt Seite 1 Datum 11.04.2017

Process Scheduling If more resources within a system are requested than available, access has to be coordinated. Therefore a so called Scheduler is utilized. The Scheduler sorts the processes into the queue with some policy. We will only consider single processor machines. These machines can only handle one process after another (sequential). Seite 2

Process Scheduling In a computing system we can identify two different types of scheduling tasks: long term scheduling (job scheduling) short term scheduling (processor allocation) End of Job User Long Term Scheduling Short Term Scheduling Seite 3

Target Conflicts Each scheduling policy has certain targets, e.g.: CPU utilization optimize efficiency of utilization Throughput maximize number of jobs per time unit Fairness no job should be preferred, only if explicit set Turnaround time minimize the time a job needs from its beginning to end Waiting time minimize time a process waits in ready state list response time minimal response to user s request Seite 4

Non-preemtive Scheduling Processes run until they quit or change from active to waiting state (e.g., I/O or event) These processes will not be interrupted during running state This type of scheduling is useful only if it is known which processes are existing and which characteristics they have Seite 5

First Come First Serve (FCFS) FCFS is a very simple policy Processes will be sorted into queue as they arrive Each process will be executed no matter how long it takes Therefore a FIFO (Fist In First Out) queue is implemented This strategy has a very limited performance Seite 6

First Come First Serve (FCFS) Example: 3 jobs with length 10, 4, and 3 arrive almost at the same time Job 1 Job 2 Job 3 0 10 14 17 Turnaround time: Job 1 = 10, Job 2 = 14, Job 3 = 17, average 13.67 Job 3 Job 2 Job 1 0 3 7 17 Turnaround time: Job 3 = 3, Job 2 = 7, Job 1 = 17, average 9 Seite 7

Shortest Job First (SJF) The process that is estimated to be the shortest will be preferred This policy avoids the disadvantages coming with FCFS Interactive processes will be preferred, the mostly wait for I/O As a result the average response time will be low Problem of this policy is: If many short jobs arrive at the same time a long job may not be executed (starvation) Seite 8

Highest Response Ratio Next (HRRN) Uses the ratio of turnaround time to actual service time Values are approximated based on past history R = w+ s s R = response ratio w = time spent waiting for the processor s = expected service time Seite 9 [Stal]

Comparison of Scheduling Policies Process Arrival Time Service Time A 0 3 B 2 6 C 4 4 D 6 5 E 8 2 FCFS A B C D E Seite 10 [Stal]

Comparison of Scheduling Policies Process Arrival Time Service Time A 0 3 B 2 6 C 4 4 D 6 5 E 8 2 SJF A B C D E Seite 11 [Stal]

Comparison of Scheduling Policies Process Arrival Time Service Time A 0 3 B 2 6 C 4 4 D 6 5 E 8 2 HRRN A B C D E Seite 12 [Stal]

Comparison of Scheduling Policies Process A B C D E Arrival Time 0 2 4 6 8 Service Time (T s ) 3 6 4 5 2 Mean FCFS Finish Time 3 9 13 18 20 Turnaround Time (T t ) 3 7 9 12 12 8.60 T t /T s 1.00 1.17 2.25 2.40 6.00 2.56 SJF Finish Time 3 9 15 20 11 Turnaround Time (T t ) 3 7 11 14 3 7.60 T t /T s 1.00 1.17 2.75 2.80 1.50 1.84 HRRN Finish Time 3 9 13 20 15 Turnaround Time (T t ) 3 7 9 14 7 8.00 T t /T s 1.00 1.17 2.25 2.80 3.50 2.14 Seite 13 [Stal]

Characteristics of Scheduling Policies FCFS SJF HRRN Selection Function max(w) min(s) Response Time May be high, especially if there is a large variance in process execution times Provides good response time for short processes w + s R = s Provides good response time Overhead Minimum Can be high Can be high Effect on Processes Penalizes short processes; penalizes I/O bound processes Penalizes long processes Starvation No Possible No Good balance w = time spent in systemso far, waiting s = total service time required by the process Seite 14 [Stal]

Priority Scheduling (PS) A priority will be assigned to each process as soon as it starts If a new process arrives, then it will be sorted to the queue appropriate to its priority High priorities are at the top of the queue, lower at the end If several processes have the same priority another policy has to be used (e.g. FCFS) Discriminated jobs may starve (starvation). This can be solved by dynamic priorities E.g. increase priority of waiting processes Seite 15

Preemtive Scheduling In multiuser systems several jobs will be started by different users No jobs should be blocked One of the main methods on such systems is to split calculation time into periods Seite 16

Preemtive Scheduling If a process is ready it is sorted into the queue The dispatcher will be called per timer interrupt A running process will be turned into waiting state and transferred to ready state Then the interrupted process will be put again to the queue The dispatcher will now start the first process from queue CPU Seite 17