Uniprocessor Scheduling

Similar documents
Chapter 9 Uniprocessor Scheduling

Uniprocessor Scheduling. Aim of Scheduling

Uniprocessor Scheduling. Aim of Scheduling. Types of Scheduling. Long-Term Scheduling. Chapter 9. Response time Throughput Processor efficiency

Uniprocessor Scheduling. Chapter 9

Scheduling of processes

Chapter 9. Uniprocessor Scheduling

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

Today s class. Scheduling. Informationsteknologi. Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1

Chapter 5: CPU Scheduling

8: Scheduling. Scheduling. Mark Handley

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Last Class: Processes

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

1.1 CPU I/O Burst Cycle

Operating System Concepts Ch. 5: Scheduling

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

CPU Scheduling. Rab Nawaz Jadoon. Assistant Professor DCS. Pakistan. COMSATS, Lahore. Department of Computer Science

CPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

CS3733: Operating Systems

CPU Scheduling. Operating Systems (Fall/Winter 2018) Yajin Zhou ( Zhejiang University

Scheduling Bits & Pieces

CPU Scheduling. Schedulers. CPSC 313: Intro to Computer Systems. Intro to Scheduling. Schedulers in the OS

Scheduling. Scheduling. Scheduling. Scheduling Criteria. Priorities. Scheduling

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

Scheduling. The Basics

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Scheduling

CISC 7310X. C05: CPU Scheduling. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 3/1/2018 CUNY Brooklyn College

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

Comp 310 Computer Systems and Organization

Properties of Processes

SIMULATION-BASED COMPARISON OF SCHEDULING TECHNIQUES IN MULTIPROGRAMMING OPERATING SYSTEMS ON SINGLE AND MULTI-CORE PROCESSORS *

Operating Systems. Scheduling

ALL the assignments (A1, A2, A3) and Projects (P0, P1, P2) we have done so far.

Frequently asked questions from the previous class survey

CPU Scheduling Algorithms

Operating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni

COSC243 Part 2: Operating Systems

Example: CPU-bound process that would run for 100 quanta continuously 1, 2, 4, 8, 16, 32, 64 (only 37 required for last run) Needs only 7 swaps

Unit 3 : Process Management

Course Syllabus. Operating Systems

Chapter 5: CPU Scheduling

Start of Lecture: February 10, Chapter 6: Scheduling

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CMPS 111 Spring 2003 Midterm Exam May 8, Name: ID:

CPU Scheduling (1) CPU Scheduling (Topic 3) CPU Scheduling (2) CPU Scheduling (3) Resources fall into two classes:

CS370 Operating Systems

LECTURE 3:CPU SCHEDULING

Chap 7, 8: Scheduling. Dongkun Shin, SKKU

Operating System Review Part

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

CS370 Operating Systems

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Interactive Scheduling

Two Level Scheduling. Interactive Scheduling. Our Earlier Example. Round Robin Scheduling. Round Robin Schedule. Round Robin Schedule

CHAPTER 2: PROCESS MANAGEMENT

CSCI-GA Operating Systems Lecture 3: Processes and Threads -Part 2 Scheduling Hubertus Franke

Scheduling in the Supermarket

High level scheduling: Medium level scheduling: Low level scheduling. Scheduling 0 : Levels

CPU Scheduling: Objectives

Chapter 5 CPU scheduling

Operating Systems ECE344. Ding Yuan

OPERATING SYSTEMS: Lesson 4: Process Scheduling

Process Scheduling. Copyright : University of Illinois CS 241 Staff

Chapter 5: CPU Scheduling

Chapter 6: CPU Scheduling

TDIU25: Operating Systems II. Processes, Threads and Scheduling

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

Lecture 2 Process Management

CSE 120 Principles of Operating Systems Spring 2017

CS418 Operating Systems

Scheduling. Today. Next Time Process interaction & communication

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

CS307: Operating Systems

Operating Systems CS 323 Ms. Ines Abbes

A COMPARATIVE STUDY OF CPU SCHEDULING POLICIES IN OPERATING SYSTEMS

Chapter 5: Process Scheduling

PROCESSES & THREADS. Charles Abzug, Ph.D. Department of Computer Science James Madison University Harrisonburg, VA Charles Abzug

CSE 4/521 Introduction to Operating Systems

CS370 Operating Systems

Last class: Today: CPU Scheduling. CPU Scheduling Algorithms and Systems

CS370 Operating Systems

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

Chapter 2 Processes and Threads. Interprocess Communication Race Conditions

CS 326: Operating Systems. CPU Scheduling. Lecture 6

Practice Exercises 305

CSL373: Lecture 6 CPU Scheduling

Operating Systems Unit 3

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

Chapter 6: CPU Scheduling

Job Scheduling. CS170 Fall 2018

Announcements/Reminders

OPERATING SYSTEMS. UNIT II Sections A, B & D. An operating system executes a variety of programs:

Process- Concept &Process Scheduling OPERATING SYSTEMS

Starting the Threads

Transcription:

Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall

CPU- and I/O-bound processes Bursts of CPU usage alternate with periods of I/O wait

Goals of Scheduling

Types of Scheduling Long-term: admission into the system Medium-term: between main memory and hard disk Short-term/Dispatcher: between ready and running I/O

Scheduling and Process State Transitions

Levels of Scheduling

Queuing Diagram

Long-Term Scheduling Determines which programs are admitted to the system for processing Controls the degree of multiprogramming More processes, smaller percentage of time each process is executed Medium-term Scheduling Part of the swapping function Based on the need to manage the degree of multiprogramming

Short-Term Scheduling Known as the dispatcher Executes most frequently Invoked when an event occurs that triggers process switch Clock interrupts I/O interrupts Operating system calls Signals

Decision Mode Non-preemptive Once a process is in the running state, it will continue until it terminates or blocks for I/O Preemptive Currently running process may be interrupted and moved to the Ready state by the OS Allows for better service, since no process can monopolize the processor for very long

Priorities Scheduler chooses a process of higher priority over one of lower priority Have multiple ready queues to represent each level of priority Lower-priority may suffer starvation Change process priority based on its age or execution history dynamic allocation of priorities

Priority Queuing

First-Come-First-Served (non-preemtive) Each process joins the Ready queue When the current process ceases to execute, the oldest process in the Ready queue is selected

First-Come-First-Served (2) A short process may have to wait a very long time before it can execute Favours CPU-bound processes I/O processes have to wait until CPU-bound process completes

Round Robin Uses preemption based on a clock Importance of the length of the quantum!!!

Round Robin (2) Clock interrupt is generated at periodic intervals (dozens of msec) When an interrupt occurs, the currently running process is placed in the ready queue next ready job is selected Known as time slicing Importance of quantum responsiveness Bad service for I/O-bound processes

Virtual Round-Robin

Shortest Process Next Non-preemptive policy Process with shortest expected processing time is selected next Short process jumps ahead of longer processes

Shortest Remaining Time Preemptive version of shortest process next policy Must estimate processing time

Predicting running times OS has to estimate remaining running time or length of next CPU burst simple or weighted average: for some 0<α<1 S(n+1)=αT(n)+(1-α)S(n) =αt(n)+(1-α)αt(n-1)+...+(1-α)ⁿt(1) Possibility of starvation for longer processes

Exponential Smoothing Coefficients

Use Of Exponential Averaging

Use Of Exponential Averaging (2)

Highest Response Ratio Next Choose next process with the greatest ratio

Feedback Scheduling

Feedback Penalize jobs that have been running longer Don t know remaining time process needs to execute

Fair-Share Scheduling User s application runs as a collection of processes (threads) User is concerned about the performance of the application Need to make scheduling decisions based on process sets

Policy versus Mechanism Separate what is allowed to be done from how it is done a process knows which of its children threads are important and need priority Scheduling algorithm parameterized mechanism in the kernel Parameters filled in by user processes policy set by user process for its threads Lottery scheduling

Traditional UNIX Scheduling Multilevel feedback using round robin within each of the priority queues If a running process does not block or complete within the quantum, it is preempted Priorities are recomputed once per second

The UNIX scheduler is based on a multilevel queue structure