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

Similar documents
CPU Scheduling. 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: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

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

OPERATING SYSTEMS SCHEDULING

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

/ Operating Systems I. Process Scheduling. Warren R. Carithers Rob Duncan

ICS Principles of Operating Systems

Comp 204: Computer Systems and Their Implementation. Lecture 12: Scheduling Algorithms cont d

Introduction. Scheduling. Types of scheduling. The basics

Chapter 5 Process Scheduling

Operating Systems, 6 th ed. Test Bank Chapter 7

W4118 Operating Systems. Instructor: Junfeng Yang

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

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

CPU Scheduling Outline

PROCESS SCHEDULING ALGORITHMS: A REVIEW

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

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

Process Scheduling. Process Scheduler. Chapter 7. Context Switch. Scheduler. Selection Strategies

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

Operating Systems Lecture #6: Process Management

Operating System: Scheduling

Processor Scheduling. Queues Recall OS maintains various queues

Operating Systems. III. Scheduling.

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

Analysis and Comparison of CPU Scheduling Algorithms

A Comparative Study of CPU Scheduling Algorithms

Main Points. Scheduling policy: what to do next, when there are multiple threads ready to run. Definitions. Uniprocessor policies

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Operating Systems Concepts: Chapter 7: Scheduling Strategies

OS OBJECTIVE QUESTIONS

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

REDUCING TIME: SCHEDULING JOB. Nisha Yadav, Nikita Chhillar, Neha jaiswal

CPU Scheduling. Core Definitions

CPU Scheduling. CSC 256/456 - Operating Systems Fall TA: Mohammad Hedayati

A Group based Time Quantum Round Robin Algorithm using Min-Max Spread Measure

Job Scheduling Model

Overview of Presentation. (Greek to English dictionary) Different systems have different goals. What should CPU scheduling optimize?

CPU Scheduling. Multitasking operating systems come in two flavours: cooperative multitasking and preemptive multitasking.

CPU Scheduling 101. The CPU scheduler makes a sequence of moves that determines the interleaving of threads.

Syllabus MCA-404 Operating System - II

Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

A LECTURE NOTE ON CSC 322 OPERATING SYSTEM I DR. S. A. SODIYA

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Scheduling Algorithms

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

This tutorial will take you through step by step approach while learning Operating System concepts.

Operating System Tutorial

CS Fall 2008 Homework 2 Solution Due September 23, 11:59PM

A Priority based Round Robin CPU Scheduling Algorithm for Real Time Systems

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner.

Chapter 3. Operating Systems

Konzepte von Betriebssystem-Komponenten. Linux Scheduler. Valderine Kom Kenmegne Proseminar KVBK Linux Scheduler Valderine Kom

A Review on Load Balancing In Cloud Computing 1

Analysis of Job Scheduling Algorithms in Cloud Computing

Linux Process Scheduling Policy

Chapter 2: OS Overview

Efficiency of Batch Operating Systems

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

REAL TIME OPERATING SYSTEMS. Lesson-10:

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.

Scheduling. Monday, November 22, 2004

CS414 SP 2007 Assignment 1

CS0206 OPERATING SYSTEMS Prerequisite CS0201, CS0203

Types Of Operating Systems

Chapter 19: Real-Time Systems. Overview of Real-Time Systems. Objectives. System Characteristics. Features of Real-Time Systems

Module 8. Industrial Embedded and Communication Systems. Version 2 EE IIT, Kharagpur 1

W4118 Operating Systems. Instructor: Junfeng Yang

4. Fixed-Priority Scheduling

Load Balancing Scheduling with Shortest Load First

Weight-based Starvation-free Improvised Round-Robin (WSIRR) CPU Scheduling Algorithm

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Module 6. Embedded System Software. Version 2 EE IIT, Kharagpur 1

Module 6. Embedded System Software. Version 2 EE IIT, Kharagpur 1

Load Balancing in Distributed System Using FCFS Algorithm with RBAC Concept and Priority Scheduling

Design and performance evaluation of Advanced Priority Based Dynamic Round Robin Scheduling Algorithm (APBDRR)

Performance Comparison of RTOS

Chapter 1 FUNDAMENTALS OF OPERATING SYSTEM

CHAPTER 15: Operating Systems: An Overview

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Overview and History of Operating Systems

Scheduling policy. ULK3e 7.1. Operating Systems: Scheduling in Linux p. 1

Final Report. Cluster Scheduling. Submitted by: Priti Lohani

Today. Intro to real-time scheduling Cyclic executives. Scheduling tables Frames Frame size constraints. Non-independent tasks Pros and cons

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Operating Systems 4 th Class

Chapter 11 I/O Management and Disk Scheduling

OPERATING SYSTEM OVERVIEW

OPERATING SYSTEM - VIRTUAL MEMORY

Lecture 3 Theoretical Foundations of RTOS

Undergraduate Course Syllabus

Linux O(1) CPU Scheduler. Amit Gud amit (dot) gud (at) veritas (dot) com

The Design and Implementation of Real-Time Schedulers in RED-Linux

Threads Scheduling on Linux Operating Systems

Real-Time Scheduling 1 / 39

How To Understand The History Of An Operating System

Aperiodic Task Scheduling

Transcription:

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 is allocated by means of a schedule The aim of processor scheduling is to assign processes to be executed by the processor over time The scheduling function should Share time fairly among processes Prevent starvation of a process Use the processor efficiently Prioritise processes when necessary

CPU Scheduler Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them. CPU scheduling decisions may take place when a process: 1. Switches from running to waiting state. 2. Switches from running to ready state. 3. Switches from waiting to ready. 4. Terminates. Scheduling under 1 and 4 is nonpreemptive. All other scheduling is preemptive

Nonpreemptive and Preemptive Non-preemptive Once a process is in the running state, it will continue until it terminates or blocks itself for I/O Preemptive Currently running process may be interrupted and moved to ready state by the OS Preemption may occur when new process arrives, on an interrupt, or periodically.

Scheduling Criteria CPU utilization keep the CPU as busy as possible Throughput processes that complete their execution per time unit Turnaround time amount of time to execute a particular process Waiting time amount of time a process has been waiting in the ready queue Response time amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

1. Long-Term Scheduling: Types of Scheduling Determines which programs are admitted to the system for processing May be first-come-first-served Or according to criteria such as priority, I/O requirements or expected execution time Controls the degree of multiprogramming 2. Medium-Term Scheduling: Part of the swapping function Swapping-in decisions are based on the need to manage the degree of multiprogramming

Types of Scheduling 3. Short-Term Scheduling: Known as the dispatcher Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves: switching context switching to user mode detecting the proper location in the user program to restart that program Dispatch latency time it takes for the dispatcher to stop one process and start another running. Invoked when an event occurs Clock interrupts I/O interrupts Operating system calls Signals

Scheduling and Process State Transitions

Nesting of Scheduling Functions

Priorities Scheduler will always choose a process of higher priority over one of lower priority Have multiple ready queues to represent each level of priority Priority Queuing

Starvation Problem: Lower-priority may suffer starvation if there is a steady supply of high priority processes. Solution: Allow a process to change its priority based on its age or execution history

Scheduling Algorithms First Come, First Served (FCFS) Shortest Job First (SJF) Non-preemptive, Preemptive Priority Scheduling - Non-preemptive, Preemptive Round Robin Scheduling

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 20% to background in FCFS

Multilevel Queue Scheduling

Multilevel Feedback Queue A process can move between the various queues 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 downgrade a process method used to determine which queue a process will enter when that process needs service

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.