Schedulers. Operating System. CPU-IO Burst Cycle. Preemptive Scheduling. Scheduling Criteria. Question. Short-Term. Medium-Term (Unix)

Similar documents
Introduction. Scheduling. Types of scheduling. The basics

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

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

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

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

CPU Scheduling Outline

ICS Principles of Operating Systems

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

OPERATING SYSTEMS SCHEDULING

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

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

Chapter 5 Process Scheduling

CPU Scheduling. CPU Scheduling

Scheduling Algorithms

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

W4118 Operating Systems. Instructor: Junfeng Yang

Operating Systems Concepts: Chapter 7: Scheduling Strategies

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

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

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

CPU Scheduling. Core Definitions

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

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

Operating Systems. III. Scheduling.

Operating System: Scheduling

Job Scheduling Model

Operating Systems Lecture #6: Process Management

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

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

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

Linux Process Scheduling Policy

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

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

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

A Comparative Study of CPU Scheduling Algorithms

W4118 Operating Systems. Instructor: Junfeng Yang

Processor Scheduling. Queues Recall OS maintains various queues

Operating Systems, 6 th ed. Test Bank Chapter 7

OS OBJECTIVE QUESTIONS

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

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

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

Analysis and Comparison of CPU Scheduling Algorithms

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

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

PROCESS SCHEDULING ALGORITHMS: A REVIEW

Real-Time Scheduling 1 / 39

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?

Linux scheduler history. We will be talking about the O(1) scheduler

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

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

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

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

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

Syllabus MCA-404 Operating System - II

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

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

UNIVERSITY OF WISCONSIN-MADISON Computer Sciences Department A. Arpaci-Dusseau

Completely Fair Scheduler and its tuning 1

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

Process Scheduling II

Scheduling. Monday, November 22, 2004

Linux Scheduler. Linux Scheduler

Operating System Tutorial

Analysis of Job Scheduling Algorithms in Cloud Computing

Tasks Schedule Analysis in RTAI/Linux-GPL

Chapter 2: OS Overview

REAL TIME OPERATING SYSTEMS. Lesson-10:

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

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

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

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

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

Comparison between scheduling algorithms in RTLinux and VxWorks

These sub-systems are all highly dependent on each other. Any one of them with high utilization can easily cause problems in the other.

A Review on Load Balancing In Cloud Computing 1

Performance Comparison of RTOS

Understanding Linux on z/vm Steal Time

Lecture 3 Theoretical Foundations of RTOS

SYSTEM ecos Embedded Configurable Operating System

CS414 SP 2007 Assignment 1

Timing of a Disk I/O Transfer

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.

ò Scheduling overview, key trade-offs, etc. ò O(1) scheduler older Linux scheduler ò Today: Completely Fair Scheduler (CFS) new hotness

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

CHAPTER 15: Operating Systems: An Overview

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

Efficiency of Batch Operating Systems

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Project No. 2: Process Scheduling in Linux Submission due: April 28, 2014, 11:59pm

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

Capacity Estimation for Linux Workloads

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

Chapter 11 I/O Management and Disk Scheduling

Linux Block I/O Scheduling. Aaron Carroll December 22, 2007

The International Journal Of Science & Technoledge (ISSN X)

Chapter 3. Operating Systems

Why Relative Share Does Not Work

Today s topic: So far, we have talked about. Question. Task models

Final Report. Cluster Scheduling. Submitted by: Priti Lohani

Transcription:

Schedulers Operating System Scheduling (h 4., 5. - 5.) Short-Term Which process gets the PU? Fast, since once per 00 ms Long-Term (batch) Which process gets the Ready Queue? Medium-Term (Unix) Which Ready Queue process to memory? Swapping PU-IO urst ycle Preemptive Scheduling add read (I/O Wait) store increment write (I/O Wait) Frequency urst Duration Four times to re-schedule Running to Waiting (I/O wait) Running to Ready (time slice) Waiting to Ready (I/O completion) 4 Termination # optional ==> Preemptive Timing may cause unexpected results updating shared variable kernel saving state Question What Performance riteria Should the Scheduler Seek to Optimize? Ex: PU minimize time spent in queue Others? Scheduling riteria PU utilization (40 to 90) Throughput (processes / hour) Turn-around time 4 Waiting time (in queue) Maximize #, # Minimize #, #4 Response time Self-regulated by users (go home) ounded ==> Variance!

Gantt hart First-ome, First-Served urst Time 0 9 0 vg Wait Time (0 + + 9) / = 5.7 Shortest Job First urst Time 0 0 vg Wait Time (0 + + ) / = Optimal vg Wait Prediction tough Ideas? Priority Scheduling SJF is a special case urst Time Priority 0 9 0 vg Wait Time (0 + + 9) / =. Priority Scheduling riteria? Internal open files memory requirements PU time used - time slice expired (RR) process age - I/O wait completed External $ department sponsoring work process importance super-user (root) - nice Round Robin Fixed time-slice and Preemption urst Time 5 vg = ( + 9 + ) / = 9. FFS? SJF? 9 Round Robin Fun Turn-around time? q = 0 q = q --> 0 urst Time 0 0 0

Rule: 0% within one quantum More Round Robin Fun D vg. Turn-around Time urst Time 6 7 4 5 6 7 Time Quantum Gantt harts: FFS SJF Priority RR (q=) Fun with Scheduling urst Time 0 Priority Performance: Throughput Waiting time Turnaround time More Fun with Scheduling Turn around time: FFS SJF q= PU idle q=0.5 PU idle rrival Time 0.0 0.4.0 urst Time 4 Multi-Level Queues ategories of processes Priority Priority Priority System Interactive atch...... Run all in first, then Starvation! Divide between queues: 70%, 5% Multi-Level Feedback Queues Time slice expensive but want interactive Priority Priority Priority Queue Queue Queue Quantum Quanta 4 Quanta......... onsider process needing 00 quanta, 4,, 6,, 64 = 7 swaps! Favor interactive users Evaluating Scheduling lgorithms With all these possible scheduling algorithms, how to choose one? Ease of implementation Efficiency of implementation / low overhead Performance evaluation (next slide)

Performance Evaluation Methods Deterministic methods / Gantt charts Use more realistic workloads Queueing theory Mathematical techniques Uses probablistic models of jobs / PU utilization Simulation Probabilistic or trace-driven Linux Scheduling Two classes of processes: Real-Time Normal Real-Time: lways run Real-Time above Normal Round-Robin or FIFO Soft not Hard Linux Scheduling Normal: redit-ased process with most credits is selected time-slice then lose a credit (0, then suspend) no runnable process (all suspended), add to every process: credits = credits/ + priority utomatically favors I/O bound processes What is a P? Questions List steps that occur during interrupt Explain how SJF works True or False: FFS is optimal in terms of avg waiting time Most processes are PU bound The shorter the time quantum, the better micro-shell.c? Interrupt Handling Stores program counter (hardware) Loads new program counter (hardware) jump to interrupt service procedure Save P information (assembly) Set up new stack (assembly) Set waiting process to ready () Re-schedule (probably awakened process) () dispatcher in SOS, schedule in Linux If new process, called a context-switch Outline es P Interrupt Handlers Scheduling lgorithms Linux WinNT 4

Windows NT Scheduling asic scheduling unit is a thread Priority based scheduling per thread Preemptive operating system No shortest job first, no quotas Priority ssignment NT kernel uses priority levels is the highest; 0 is system idle thread Realtime priorities: 6 - Dynamic priorities: - 5 Users specify a priority class: realtime (4), high (), normal () and idle (4) and a relative priority: highest (+), above normal (+), normal (0), below normal (-), and lowest (-) to establish the starting priority Threads also have a current priority Quantum Dispatcher Ready List Determines how long a Thread runs once selected Varies based on: NT Workstation or NT Server Intel or lpha hardware Foreground/ackground application threads Dispatcher Ready List 0 9 7 Ready Threads Keeps track of all Ready-to-execute threads Queue of threads assigned to each level How do you think it varies with each? FindReadyThread Locates the highest priority thread that is ready to execute Scans dispatcher ready list Picks front thread in highest priority nonempty queue When is this like round robin? oosting and Decay oost priority Event that wakes blocked thread oosts never exceed priority 5 for dynamic Realtime priorities are not boosted Decay priority by one for each quantum decays only to starting priority (no lower) 5

Starvation Prevention Low priority threads may never execute nti-pu starvation policy thread that has not executed for seconds boost priority to 5 double quantum Decay is swift not gradual after this boost 6