CS418 Operating Systems

Similar documents
Computer Systems Modelling

Introduction to queuing theory

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

Performance Evaluation of Queuing Systems

Queuing Theory. Using the Math. Management Science

Computer Networks More general queuing systems

Advanced Computer Networks Lecture 3. Models of Queuing

Analysis of A Single Queue

Computer Systems Modelling

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

COMP9334: Capacity Planning of Computer Systems and Networks

Kendall notation. PASTA theorem Basics of M/M/1 queue

A Study on Performance Analysis of Queuing System with Multiple Heterogeneous Servers

16:330:543 Communication Networks I Midterm Exam November 7, 2005

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

Figure 10.1: Recording when the event E occurs

Multiaccess Problem. How to let distributed users (efficiently) share a single broadcast channel? How to form a queue for distributed users?

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

λ λ λ In-class problems

Introduction to Markov Chains, Queuing Theory, and Network Performance

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Review of Queuing Models

Introduction to Queuing Theory. Mathematical Modelling

Chapter 2 Queueing Theory and Simulation

Link Models for Circuit Switching

Module 5: CPU Scheduling

Non Markovian Queues (contd.)

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Solutions to COMP9334 Week 8 Sample Problems

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

GI/M/1 and GI/M/m queuing systems

Part II: continuous time Markov chain (CTMC)

Queueing Theory and Simulation. Introduction

Introduction to queuing theory

Link Models for Packet Switching

Chapter 2. Poisson Processes. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Queueing Theory. VK Room: M Last updated: October 17, 2013.

Homework 1 - SOLUTION

Little s result. T = average sojourn time (time spent) in the system N = average number of customers in the system. Little s result says that

Performance Modelling of Computer Systems

Stochastic Models in Computer Science A Tutorial

Continuous Time Processes

EE 368. Weeks 3 (Notes)

Queueing Systems: Lecture 3. Amedeo R. Odoni October 18, Announcements

How to deal with uncertainties and dynamicity?

Chapter 6: CPU Scheduling

S Queueing Theory, II/2007 Exercises. Virtamo / Penttinen. 10th December Discrete and Continuous Distributions 1

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

IOE 202: lectures 11 and 12 outline

NATCOR: Stochastic Modelling

Intro Refresher Reversibility Open networks Closed networks Multiclass networks Other networks. Queuing Networks. Florence Perronnin

Since D has an exponential distribution, E[D] = 0.09 years. Since {A(t) : t 0} is a Poisson process with rate λ = 10, 000, A(0.

QUEUING SYSTEM. Yetunde Folajimi, PhD

Probability and Statistics Concepts

Guidelines for Solving Probability Problems

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals

Chapter 5: Special Types of Queuing Models

Lecture 4: Bernoulli Process

The Timing Capacity of Single-Server Queues with Multiple Flows

CS 798: Homework Assignment 3 (Queueing Theory)

M/G/1 and M/G/1/K systems

YORK UNIVERSITY FACULTY OF ARTS DEPARTMENT OF MATHEMATICS AND STATISTICS MATH , YEAR APPLIED OPTIMIZATION (TEST #4 ) (SOLUTIONS)

λ, µ, ρ, A n, W n, L(t), L, L Q, w, w Q etc. These

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/6/16. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

Systems Simulation Chapter 6: Queuing Models

Lecture 20: Reversible Processes and Queues

Data analysis and stochastic modeling

All models are wrong / inaccurate, but some are useful. George Box (Wikipedia). wkc/course/part2.pdf

Markov processes and queueing networks

State-dependent and Energy-aware Control of Server Farm

ECE 313 Probability with Engineering Applications Fall 2000

Classification of Queuing Models

Queuing Theory. Queuing Theory. Fatih Cavdur April 27, 2015

Elementary queueing system

Network Traffic Characteristic

CS 550 Operating Systems Spring CPU scheduling I

P (L d k = n). P (L(t) = n),

CS 1538: Introduction to Simulation Homework 1

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/25/17. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

Congestion Control. Need to understand: What is congestion? How do we prevent or manage it?

2905 Queueing Theory and Simulation PART IV: SIMULATION

Course Documents Authorized Duration: 120 minutes. Questions are generally independent. You can respond to any question before the other.

Chapter 3: Markov Processes First hitting times

Intro to Queueing Theory

Maximum pressure policies for stochastic processing networks

Classical Queueing Models.

Part I Stochastic variables and Markov chains

Bernoulli Counting Process with p=0.1

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

A Hysteresis-Based Energy-Saving Mechanism for Data Centers Christian Schwartz, Rastin Pries, Phuoc Tran-Gia www3.informatik.uni-wuerzburg.

Lecturer: Olga Galinina

Queueing. Chapter Continuous Time Markov Chains 2 CHAPTER 5. QUEUEING

Introduction to Queueing Theory

Základy teorie front

Transcription:

CS418 Operating Systems Lecture 14 Queuing Analysis Textbook: Operating Systems by William Stallings 1

1. Why Queuing Analysis? If the system environment changes (like the number of users is doubled), we need to evaluate the resulting system performance 1. Do an after-the-fact analysis based on actual values. 2. Make a simple projection (estimation) based on previous experience. 3. Do a queuing analysis. 4. Program and run a simulation model.

2. Basic concepts single server case λ: arrival rate; or mean number of arrivals per second. w: average number of waiting jobs. T w : mean time a job must wait. T s : mean service time for each job. r: average number of jobs in system. T r : mean residence time for each job. T r = T s + T w. ρ: fraction of time the server is busy, or, utilization of the server. ρ = λ T s 1 and λ λ max = 1/T s.

Input: λ, T s are given. Objectives: (w, T w, r, T r ) and their corresponding standard deviations, (σ w, σ Tw, σ r, σ Tr ), should be returned. Assumption 1: λ follows Poisson distribution, i.e., P r[x = k] = λk k! e λ, k = 0, 1, 2,... E[X] = λ (λt )k P r[k items arrive in interval T ] = k! e λt Expected number of items arrive in interval T = λt Mean arrival rate = λ Assumption 2: service time distribution is exponential with λ, i.e., distribution function P r[x x] = F [x] = 1 e λx. E[X] = σ X = 1/λ

We have: 1. r = ρ 1 ρ. 2. w = ρ2 1 ρ. 3. T r = T s 1 ρ. 4. T w = ρt s 1 ρ. 5. m Tr (y) = T r ln( 100 100 y ) the value T r occurs y percent of time. 6. P r[r = N] = (1 ρ)ρ N the probability that the number of jobs in system is N. 7. m Tw (y) = T w ρ ln( 100ρ 100 y ) the value T w occurs y percent of time. 8....

3. Applications for single-server system Given a LAN with 100 PC s and a server which maintains a common database for a query application. The average query time is 0.6s and the standard deviation is equal to the mean. At peak times, the query rate over LAN reaches 20 per minute. 1. What is the average response time (ignoring line overhead)? 2. If a 1.5-second response time is the acceptable maximum, what is the maximum of message load? 3. If 20% more utilization is experienced, what will be the corresponding response time? Answers. 1. ρ = λt s =(20 arrivals per minute)*(0.6s per query)/(60s/min) = 0.2 T r = T s 1 ρ = 0.6/(1 0.2) = 0.75s. 2. Much harder to answer. We can rephrase the question as: if we want 90% of all responses to be less than 1.5s, then, m Tr (90) = T r ln( 100 100 90 ) = T s 1 ρ so ρ = 0.08. 2.3 = 1.5s,

3. Old T r = T s 1 ρ = 0.75s. New T r = T s 1 new ρ = 1.0s, which is increased by (1.0 0.75)/0.75 33%. Given a LAN which is connected to the Internet with a router, packets arrive with a mean arrival rate of 5 per second. The average packet length is 144 bytes and it is assumed to be exponentially distributed. Line speed from the router to the Internet is 9600bps. 1. What is the mean residence time in the router? 2. What is the average number of packets in the router? 3. What is the upper bound of the number of packets in the router, for 90% of the time? Answers. 1. λ = 5 per second. T s = (144 8 bits)/9600bps = 0.12 second. ρ = λt s = 5 0.12=0.6. T r = T s 1 ρ 2. r = ρ 1 ρ = 0.12/(1 0.6) = 0.3s. = 0.6/(1 0.6) = 1.5(packets).

3. P r[r = N] = (1 ρ)ρ N. So, P r[r N] = [ N i=0 (1 ρ)ρ i ]. y 100 = [ N i=0 (1 ρ)ρ i ] = 1 ρ 1+N. N = ln(1 y 100 ) ln ρ 1. When y = 90, N = ln(1 y 100 ) ln ρ 1 = 3.5. When y = 95, N = ln(1 y 100 ) ln ρ 1 = 4.8.

4. Basic concepts multiple server case Most of the concepts in single server case can carry over. N: number of servers. ρ: utilization of each server. u = Nρ: utilization of the whole system (or, traffic intensity). λ N/T s. Assumptions: 1. λ = follows Poisson distribution. 2. T s follows exponential distribution, for all servers. 3. All servers are equally loaded. 4. FIFO dispatching. 5. No items are discarded from queue.

We have: 1. Poisson ratio function K = [ N 1 i=0 (Nρ)i /i! Ni=0 (Nρ) i /i! ] 2. Erlang-C function C, which is the probability that all servers are busy, satisfies C = 1 K 1 Kρ. 3. r = C ρ 1 ρ + Nρ. 4. w = C ρ 1 ρ. 5. T r = C T s N 1 ρ + T s. 6. T w = C N T s 1 ρ. 7. m Tw (y) = T s N(1 ρ) percent of time. 8.... ln( 100C 100 y ) the value T w occurs y

5. Application for multi-server system Given a system with 5 processors with average service time T s = 0.1s. Let the standard deviation of T s, σ Ts, be 0.094s. Assume that jobs arrive at a rate of 40 per second. 1. What is the average response time? 2. What is the average waiting time? 3. What is the average (maximum) waiting time for 90% of the time? Answers. 1. As σ Ts = 0.094s T s = 0.1s, we can assume that T s follows exponential distribution. 1.1. If no common queue is used, λ = 40/5 = 8 per second. ρ = λt s = 8 0.1 = 0.8. T r = T s 1 ρ = 0.1 1 0.8 = 0.5 second. 1.2. If a common queue is used, λ = 40/5 = 8 per second, same as before. C = 0.554, calculation is omitted. T r = C T s N 1 ρ + T s 0.554 0.1 5 1 0.8 + 0.1 0.1544. So, when a common queue is used, T r is reduced by a factor

of 0.5 0.1544 > 3. 2. As σ Ts = 0.094s T s = 0.1s, we can assume that T s follows exponential distribution. 2.1. If no common queue is used, λ = 40/5 = 8 per second. ρ = λt s = 8 0.1 = 0.8. T w = ρt s 1 ρ = 0.8 0.1 1 0.8 = 0.4 second. 2.2. If a common queue is used, λ = 40/5 = 8 per second, same as before. C = 0.554, calculation is omitted. T w = C T s N 1 ρ 0.554 0.1 5 1 0.8 0.0544. So, when a common queue is used, T w is reduced by a factor of 0.4 0.0544 > 7. 3. As σ Ts = 0.094s T s = 0.1s, we can assume that T s follows exponential distribution. 3.1. If no common queue is used, λ = 40/5 = 8 per second. ρ = λt s = 8 0.1 = 0.8. T w = ρt s 1 ρ = 0.8 0.1 1 0.8 = 0.4 second.

m T w (y) = T w ρ ln( 100ρ 100 y ) the value T w occurs y percent of time. m T w (90) = 0.4 0.8 ln( 80 100 90 ) = 0.5 ln 8. 3.2. If a common queue is used, T m Tw (y) = s 100C N(1 ρ) ln( 100 y ) = 0.1 5(1 0.8) 0.1 ln 5.54. ln( 55.4 100 90 ) = So, when a common queue is used, m T w (90)/m Tw (90) = 5(ln 8/ ln 5.54) > 5.