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

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

1.1 CPU I/O Burst Cycle

8: Scheduling. Scheduling. Mark Handley

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

Interactive Scheduling

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

Scheduling. The Basics

Scheduling of processes

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

Properties of Processes

Chapter 5: CPU Scheduling

Course Syllabus. Operating Systems

Operating Systems. Scheduling

Uniprocessor Scheduling

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

Uniprocessor Scheduling. Aim of Scheduling

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

CPU Scheduling Algorithms

Uniprocessor Scheduling. Chapter 9

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

Chapter 9. Uniprocessor Scheduling

Operating System Concepts Ch. 5: Scheduling

Chapter 9 Uniprocessor Scheduling

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

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

Chapter 6: CPU Scheduling

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling

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

COSC243 Part 2: Operating Systems

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

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.

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

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

Process behavior. Categories of scheduling algorithms.

Last Class: Processes

Operating Systems ECE344. Ding Yuan

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

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

SMD149 - Operating Systems

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

Process Scheduling. Copyright : University of Illinois CS 241 Staff

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

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

Operating Systems: Quiz2 December 15, Class: No. Name:

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

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

Practice Exercises 305

Operating Systems Comprehensive Exam. Fall Student ID # 10/31/2013

CS370 Operating Systems

Scheduling in the Supermarket

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

3. CPU Scheduling. Operating System Concepts with Java 8th Edition Silberschatz, Galvin and Gagn

CS418 Operating Systems

Lecture 17: Threads and Scheduling. Thursday, 05 Nov 2009

Chap 7, 8: Scheduling. Dongkun Shin, SKKU

2. The shared resource(s) in the dining philosophers problem is(are) a. forks. b. food. c. seats at a circular table.

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

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

Ch 4 : CPU scheduling

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

CSE 4/521 Introduction to Operating Systems

Operating System Review Part

CS3733: Operating Systems

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)

Chapter 2 Processes and Threads. Interprocess Communication Race Conditions

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

Computer Science 4500 Operating Systems

CS370 Operating Systems

by Maria Lima Term Paper for Professor Barrymore Warren Mercy College Division of Mathematics and Computer Information Science

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

Unit 3 : Process Management

Advanced Operating Systems (CS 202) Scheduling (1)

CPU Scheduling: Objectives

Multi-Level Feedback Queues

Chapter 6: CPU Scheduling

Sample Questions. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

CS370 Operating Systems

Frequently asked questions from the previous class survey

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

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

CSE 120 Principles of Operating Systems Spring 2017

Comp 310 Computer Systems and Organization

Processes. CS 475, Spring 2018 Concurrent & Distributed Systems

Chapter 5: CPU Scheduling

Operating Systems. CPU Scheduling ENCE 360

Opera&ng Systems ECE344

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

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

CSCE Operating Systems Scheduling. Qiang Zeng, Ph.D. Fall 2018

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

A COMPARATIVE STUDY OF CPU SCHEDULING POLICIES IN OPERATING SYSTEMS

Scheduling Bits & Pieces

CHAPTER 2: PROCESS MANAGEMENT

But this will not be complete (no book covers 100%) So consider it a rough approximation Last lecture OSPP Sections 3.1 and 4.1

Chapter 5 CPU scheduling

Process- Concept &Process Scheduling OPERATING SYSTEMS

Announcements/Reminders

Networks and Operating Systems ( ) Chapter 3: Scheduling

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

Transcription:

scheduling: share CPU among processes scheduling should: be fair all processes must be similarly affected no indefinite postponement aging as a possible solution adjust priorities based on waiting time for resource max. possible no of processes per unit time reduce response time for interactive users Criteria priorities should be used if critical resources exist: run processes using those first so that the resources become available quickly not fail even under very heavy load e.g. accept no new processes to system e.g. lower quantum I/O bound CPU bound interactive / batch importance of quick response priority real execution time time to completion preemptive x non-preemptive scheduling preemptive high cost of context switching to be effective, there must be a sufficient amount of processes ready to run in memory Priorities static x dynamic priorities static priorities fixed during execution easy to implement not efficient dynamic priorities change based on environment changes harder to implement + more CPU time enhances response times

Example Process Time of Arrival 6 8 Service Time 6 Deadline scheduling order processes based on their ending times useless if process is not completed on time process must declare all resource requests beforehend may not be posible plan resource allocation based on ending times new resources may become available Example: scheduling simplest technique order based on arrival times non-preemptive processes with short service times wait unnecessarily because of processes requring long service times ineffective for interactive processes response times may be too long ineffective for I/O bound proceses I/O ports may be available while the process waits for a CPU bound process to complete usually used together with other techniques Round-Robin schedulling -like assign CPU to processes for fixed time units in turn preemptive quantum = time slice if not completed within quantum: move to end of queue effective for interactive processes has context switching selection of quantum is critical has effect on performance of system short x long fixed x variable same x different for each user if too long quantum becomes FİFO if too short quantum too much time for context switches correct quantum sizes different for different types of systems

Example: Round-Robin shortest-job-first scheduling non-preemptive order based on shortest time to completion decreased average waiting times compared to better service for short jobs not suitable for interactive processes total running time must be known beforehand user provides estimate if requires more than estimate, stop process and run later if jobs repeat, may know running time Example: Shortest-Job-First Schedulling shortest time remaining preemptive version of previous technique good performance for time-sharing systems run process with least time remaining to completion consider new arrivals too a running process may be preempted by a new, short process total running time must be known beforehand more time wasted used / remaining time calculations context switching Example: shortest time remaining Multilevel queues level CPU level level level n (round-robin)

new process to end of level within levels if not completed within quantum, go to end of lower level limited no of levels in last level, round-robin instead of short, new jobs completed in a short time in some systems, longer quantum at lower levels processes at higher level queues finished before those in lower levels can be run a running process may be preempted by a process arriving to a higher level in some systems stay in same queue for a few rounds e.g. at lower level queues Example: Multilevel Queues in UNIX Systems Assumption: Max levels in system. in UNIX Systems Example: Priority = CPU_usage + nice + base CPU_usage = T/ Assume only processes base=6 no nice value clock interrupts system 6 times per quantum start with the order Process A, B and C

Process A Process B Process C Time Priority Cpu Count Priority Cpu Count Priority Cpu Count 6 6 6 6 7 6 6 6 67 7 6 6 6 7 67 7 8 9 67 76 6 7 67 Priority = (CPUusage/) + 6