Maximum CPU utilization is obtained by multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait

Similar documents
Chapter 9: Uniprocessor Scheduling

Chapter 5 5. INTERSECTIONS 5.1. INTRODUCTION

Dispatching Universität Karlsruhe, System Architecture Group

CSE 3401: Intro to AI & LP Uninformed Search II

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 6. Wenbing Zhao. Department of Electrical and Computer Engineering

Outline. Terminology. EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 6. Steps in Capacity Planning and Management

Signalized Intersections

Urban OR: Quiz 2 Solutions (2003) ( 1 ρ 1 )( 1 ρ 1 ρ 2 ) ( 1 12 )( ) σ S ] 24 [ 2 = 60, 2 2 ] ( 2 ) 3

Arterial Traffic Analysis Actuated Signal Control

Synchro Studio 8. Overview. By Ioannis Psarros

Uninformed search methods

Module 3 Developing Timing Plans for Efficient Intersection Operations During Moderate Traffic Volume Conditions

Emergency Vehicle Preemption

INTERCHANGE RAMP TERMINALS

Training Fees 3,400 US$ per participant for Public Training includes Materials/Handouts, tea/coffee breaks, refreshments & Buffet Lunch.

Multimodal Approach to Planning & Implementation of Transit Signal Priority within Montgomery County Maryland

Configuring Bidirectional Forwarding Detection for BGP

Uninformed Search (Ch )

Junction Design with Traffic Signals

HIGHWAY CAPACITY MANUAL

Uninformed Search (Ch )

Self-Organizing Signals: A Better Framework for Transit Signal Priority

Uninformed search methods II.

Bus Speed Control System

Net$ync II. Net$ync II. System Controllers

Iowa DOT FHWA Safety Targets

HIGHWAY CAPACITY MANUAL 2010: NEW SIGNALIZED INTERSECTION METHODOLOGY. James A. Bonneson, Ph.D., P.E.

University of Notre Dame Department of Finance Economics of the Firm Spring 2012

Ocean Fishing Fleet Scheduling Path Optimization Model Research. Based On Improved Ant Colony Algorithm

Robust Task Execution: Procedural and Model-based. Outline. Desiderata: Robust Task-level Execution

Better Search Improved Uninformed Search CIS 32

BURGAS INTEGRATED PUBLIC TRANSPORT PROJECT. Information day, 5 th July 2011, Burgas

Introduction to Algorithms

Actuated Signal Timing Design CIVL 4162/6162

Uninformed search methods II.

UNIT V 1. What are the traffic management measures? [N/D-13] 2. What is Transportation System Management (TSM)? [N/D-14]

Safety Manual VEGAVIB series 60

D-Case Modeling Guide for Target System

Transit Signal Preemption and Priority Treatments

Introduction This section includes suggestions on how to use this guide, an overview of course philosophy and goals.

Scales of Atmospheric Motion Scale Length Scale (m) Time Scale (sec) Systems/Importance Molecular (neglected)

82C288 BUS CONTROLLER FOR PROCESSORS (82C C C288-8)

Introduction This section includes suggestions on how to use this guide, an overview of course philosophy and goals.

Quick Guide. SGX-CA500 Cycle Computer SGY-PM Series Power Meters

Published: August 2009

Operational Comparison of Transit Signal Priority Strategies

Using Simulation to Evaluate Traffic Signal Preemption at Railway-Highway Grade Crossings

Approach-Level Real-Time Crash Risk Analysis for Signalized Intersections

Operating instructions Electrical switching facility pco

Indiana Traffic Signal Hi Resolution Data Logger Enumerations

Operating instructions. FOCUS compressor control for piston compressors

In this chapter the concepts of authoring BIOS tasks (TSK) will be considered.

Soft Systems. Log Flume - 1. Enter Specification. Activity One ACTIVITIES. Help. for Logicator

Fast Software-managed Code Decompression

SIP 1000 OPERATION AND PROGRAMMING MANUAL

Evaporative Emissions (EVAP) system, checking

Built-in Purge Control Functions

Ingersoll Rand. X-Series System Automation

Rolling Out Measures of Non-Motorized Accessibility: What Can We Now Say? Kevin J. Krizek University of Colorado

Introduction This section includes suggestions on how to use this guide, an overview of course philosophy and goals.

GUIDE TO ULTRA-FAST HPLC. Quick Tips for Converting Conventional Reversed-Phase HPLC Separations to Ultra-Fast Separations

Multicore Real-Time Scheduling

Service & Support. Questions and Answers about the Proof Test Interval. Proof Test According to IEC FAQ August Answers for industry.

Introduction to Traffic Signal Timing

Redacted for Privacy Abstract Approved : Sabah Randhawa

Part B Design Guidance / Principles _

EFFICIENCY OF TRIPLE LEFT-TURN LANES AT SIGNALIZED INTERSECTIONS

TABLE OF CONTENTS 1. INTRODUCTION 2. TRAFFIC ENGINEERING FUNDAMENTALS 9. SYSTEM CONTROL 3. DATA COLLECTION 4. SIGNAL PHASING 10. SPECIAL OPERATIONS

ADAPTING OMS SYSTEM TO DEAL WITH STORMS DATA IN REAL TIME

English. English. Predictive Multi Gas for

Operating instructions. FOCUS compressor control for screw compressors

Team Advancement. 7.1 Overview Pre-Qualifying Teams Teams Competing at Regional Events...3

CSE 3402: Intro to Artificial Intelligence Uninformed Search II

Transit Signal Priority: Help or Hype? Peter G. Furth Northeastern University

DERIVATION OF A SIGNAL TIMING SCHEME FOR AN EXTERNALLY SIGNALIZED ROUNDABOUT

Operational Performance Comparison between Three Unconventional Intersection Designs: Left-turn Bypass, Diverging Flow and Displaced Left-turn

Model petri net of adaptive traffic lights and its collaboration with a special event

Triage. Learning Objectives 8/14/

Lifespan Improvements Available in the Industry

CS 4649/7649 Robot Intelligence: Planning

Product Overview. Product Description CHAPTER

Uninformed search methods

Full file at

An Introduction to Statistical Process Control Charts (SPC) Steve Harrison

TESTING AT VERY LOW FLOWRATE

Transit Signal Priority Demonstration Project Fargo-Moorhead Metro Area Transit

Process Dynamics, Operations, and Control Lecture Notes - 20

Rulebook 2018 citywave - stationary wave riding

Understanding safety life cycles

Tokyo: Simulating Hyperpath-Based Vehicle Navigations and its Impact on Travel Time Reliability

Safety Manual VEGAVIB series 60

The Advancement of Pressure Independent Technology

Surfing Interconnect

Milton Road Bus Stop and Crossings Workshop WSP. 19th September 2017

Omaha s Complete Streets Policy

Solutions to Traffic Jam on East Road of Beijing Jiaotong University in Rush Hours Based on Analogue Simulation

Energy Output. Outline. Characterizing Wind Variability. Characterizing Wind Variability 3/7/2015. for Wind Power Management

MP-70/50 Series Scoreboard Controller User Guide

How To Choose a Roughing/Backing Pump for the Turbo and Drag Family

Section Outline Signalised Intersection Layout

Transcription:

Chapter 5: CPU Scheduling

Basic Concepts Maximum CPU utilization is obtained by multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait Burst access CPU burst I/O burst When I/O burst stage, the CPU is idle 5.2 Silberschatz, Galvin and Gagne 2009

Alternating Sequence of CPU And I/O Bursts 5.3 Silberschatz, Galvin and Gagne 2009

Histogram of CPU-burst Times The large number of short CPU bursts. I/O bound program The small number of long CPU bursts. CPU bound program 5.4 Silberschatz, Galvin and Gagne 2009

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 could be preemptive 5.5 Silberschatz, Galvin and Gagne 2009

Dispatcher Dispatcher module gives control of the CPU to the process which is selected by the short-term scheduler; this involves: switching process context Mode change into user mode jumping to the proper location in the user program to restart that program Dispatch latency time to take for the dispatcher to stop one process and start another running 5.6 Silberschatz, Galvin and Gagne 2009

Scheduling Criteria CPU utilization keep the CPU as busy as possible Throughput # of processes that completes their execution per time unit Turnaround time amount of time to execute a particular process Interval from process submission to completion The policy which has the view of specific process 5.7 Silberschatz, Galvin and Gagne 2009

Scheduling Criteria Waiting time amount of time a process has been waiting in the ready queue Optimal criteria in case of shortest job first policy Response time Interactive system, turnaround time is not best solution Turnaround time is limited by the speed of the output device amount of time it takes from when a request was submitted until the first response is produced i.e., The time to start responding, not the time to completed output of response 5.8 Silberschatz, Galvin and Gagne 2009

Scheduling Criteria Confliction The confliction example In interactive system, response time is important criteria To enhance response time many context switching throughput is reduced. 5.9 Silberschatz, Galvin and Gagne 2009

Optimization Criteria Max CPU utilization Max throughput Min turnaround time Min waiting time Min response time 5.10 Silberschatz, Galvin and Gagne 2009

First-Come, First-Served (FCFS) Scheduling FIFO scheduling Simplest scheme Processes dispatched according to arrival time Non-preemption policy Rarely used as primary scheduling algorithm 5.11 Silberschatz, Galvin and Gagne 2009

First-Come, First-Served (FCFS) Scheduling Process Burst Time P 1 24 P 2 3 P 3 3 Suppose that the processes arrive in the order: P 1, P 2, P 3 The Gantt Chart for the schedule is: P 1 P 2 P 3 0 24 27 30 Waiting time for P 1 = 0; P 2 = 24; P 3 = 27 Average waiting time: (0 + 24 + 27)/3 = 17 5.12 Silberschatz, Galvin and Gagne 2009

FCFS Scheduling (Cont.) Suppose that the processes arrive in the order P 2, P 3, P 1 The Gantt chart for the schedule is: P 2 P 3 P 1 0 3 6 30 Waiting time for P 1 = 6;P 2 = 0 ; P 3 = 3 Average waiting time: (6 + 0 + 3)/3 = 3 Much better than previous case Convoy effect short process behind long process 5.13 Silberschatz, Galvin and Gagne 2009

Shortest-Job-First (SJF) Scheduling Associate with each process length of its next CPU burst. Use these lengths to schedule the process with the shortest time Two variations: nonpreemptive once CPU is given to the process, it cannot be preempted until completes its CPU burst preemptive if a new process arrives with CPU burst length less than remaining time of current executing process, then preempt it. This scheme is known as the Shortest-Remaining-Time-First (SRTF) 5.14 Silberschatz, Galvin and Gagne 2009

Example of Non-Preemptive SJF Process Arrival Time Burst Time SJF (non-preemptive) p P 1 0.0 7 P 2 2.0 4 P 3 40 4.0 1 P 4 5.0 4 P 1 P 3 P 2 P 4 0 3 7 8 12 16 Average waiting time = (0 + 6 + 3 + 7)/4 = 4 5.15 Silberschatz, Galvin and Gagne 2009

Example of Preemptive SJF(SRTF) SJF (preemptive) p Process Arrival Time Burst Time P 1 0.0 7 P 2 2.0 4 P 3 40 4.0 1 P 4 5.0 4 P 1 P 2 P 3 P 2 P 4 P 1 0 2 4 5 7 11 16 Average waiting time = (9 + 1 + 0 +2)/4 = 3 5.16 Silberschatz, Galvin and Gagne 2009

Shortest-Job-First (SJR) Scheduling SJF is optimal gives minimum average waiting time for a given set of processes Real difficulty How do we know next burst of CPU? Exponential Average Next CPU burst is predicted as an exponential average of the measured lengths of previous CPU bursts. 5.17 Silberschatz, Galvin and Gagne 2009

Determining Length of Next CPU Burst Can only estimate the length Can be done by using the length of previous CPU bursts, using exponential averaging 1. t n = actual length of n th CPU burst 2. τ n + 1 = predicted value for the next CPU burst 3. α, 0 α 1 4. Define : τ = α + ( 1 α ). n t τ + 1 n n 5.18 Silberschatz, Galvin and Gagne 2009

Prediction of the Length of Next CPU Burst 5.19 Silberschatz, Galvin and Gagne 2009

Examples of Exponential Averaging ( ). τ n+ 1 t + τ n = α t + τ If α is ½, then recent history and past n 1 α history are equally weighted. So α controls relative weight of recent and past history 5.20 Silberschatz, Galvin and Gagne 2009

Priority Scheduling A priority number (integer) is associated with each process The CPU is allocated to the process with the highest priority Preemptive nonpreemptive SJF can be treated as a priority scheduling where priority is the predicted next CPU burst time Problem Starvation low priority processes may never execute 5.21 Silberschatz, Galvin and Gagne 2009

Priority Scheduling Solution Aging As time progresses, system increases the priority of the process HRRN (Highest Response Ratio Next) scheduling Response ratio = (waiting time + required CPU time) / required CPU time The problem of non-preemptive priority scheduling The possibility of Priority Inversion 5.22 Silberschatz, Galvin and Gagne 2009