Intro to Queueing Theory

Similar documents
Computer Networks More general queuing systems

M/G/1 and Priority Queueing

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

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

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 "

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

Chapter 2 Queueing Theory and Simulation

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

Link Models for Circuit Switching

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

Introduction to Queueing Theory

Queueing Theory and Simulation. Introduction

M/G/1 queues and Busy Cycle Analysis

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

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

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

Solutions to COMP9334 Week 8 Sample Problems

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

Introduction to Queueing Theory

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

Link Models for Packet Switching

Data analysis and stochastic modeling

ECE 3511: Communications Networks Theory and Analysis. Fall Quarter Instructor: Prof. A. Bruce McDonald. Lecture Topic

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

Performance Evaluation of Queuing Systems

Introduction to Markov Chains, Queuing Theory, and Network Performance

NATCOR: Stochastic Modelling

Control of Fork-Join Networks in Heavy-Traffic

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

Birth-Death Processes

Introduction to queuing theory

Simple queueing models

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

Chapter 8 Queuing Theory Roanna Gee. W = average number of time a customer spends in the system.

Single-Server Service-Station (G/G/1)

Computer Systems Modelling

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

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

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

Queuing Theory. Using the Math. Management Science

Name of the Student:

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

Multiaccess Communication

Non Markovian Queues (contd.)

Stochastic Models of Manufacturing Systems

Chapter 1. Introduction. 1.1 Stochastic process

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

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

A preemptive repeat priority queue with resampling: Performance analysis

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Review of Queuing Models

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP

Module 5: CPU Scheduling

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

CPU scheduling. CPU Scheduling

Chapter 6: CPU Scheduling

QUEUING SYSTEM. Yetunde Folajimi, PhD

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours.

EE 368. Weeks 3 (Notes)

Queues and Queueing Networks

Introduction to Queuing Theory. Mathematical Modelling

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

Lecture 20: Reversible Processes and Queues

Probability and Statistics Concepts

Part I Stochastic variables and Markov chains

Part II: continuous time Markov chain (CTMC)

Transform Techniques - CF

Lecture Notes 2 Random Variables. Discrete Random Variables: Probability mass function (pmf)

Homework 1 - SOLUTION

Systems Simulation Chapter 6: Queuing Models

Photo: US National Archives

Figure 10.1: Recording when the event E occurs

Queuing Theory and Stochas St t ochas ic Service Syste y ms Li Xia

Delay bounds (Simon S. Lam) 1

Elementary queueing system

Exact Simulation of the Stationary Distribution of M/G/c Queues

Lecture Notes 2 Random Variables. Random Variable

Chapter 6 Queueing Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

COMP9334: Capacity Planning of Computer Systems and Networks

Math 180A. Lecture 16 Friday May 7 th. Expectation. Recall the three main probability density functions so far (1) Uniform (2) Exponential.

Analysis of A Single Queue

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

2905 Queueing Theory and Simulation PART IV: SIMULATION

11 The M/G/1 system with priorities

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

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

Chapter 2. Poisson Processes

CS418 Operating Systems

Derivation of Formulas by Queueing Theory

Probability Models in Electrical and Computer Engineering Mathematical models as tools in analysis and design Deterministic models Probability models

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

n px p x (1 p) n x. p x n(n 1)... (n x + 1) x!

CS 550 Operating Systems Spring CPU scheduling I

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002

Section 1.2: A Single Server Queue

Introduction to queuing theory

Slides 9: Queuing Models

Lesson 7: M/G/1 Queuing Systems Analysis

An Analysis of the Preemptive Repeat Queueing Discipline

The Timing Capacity of Single-Server Queues with Multiple Flows

Transcription:

1 Intro to Queueing Theory Little s Law M/G/1 queue Conservation Law 1/31/017 M/G/1 queue (Simon S. Lam) 1

Little s Law No assumptions applicable to any system whose arrivals and departures are observable Average population = (average delay) (throughput rate) average delay = 1 N delay N i1 = i where N is number of departures throughput rate = N/ τ τ where is duration of eperiment average population (to be defined) 1/6/017 M/G/1 queue (Simon S. Lam)

3 n(t) mber in system n Num Time t 1 τ average population = ntdt () )d τ where τ is duration of the eperiment 0 M/G/1 queue (Simon S. Lam) 3

4 Eercise - check Little s Law for the following eample Consider 6 jobs that have gone through a system during the time interval [0, 15], where time is in seconds, as shown in the table: Job Arrival Time Departure Time 1 0.5 4.5 1.5 3.0 3 6.0 11.0 4 7.0 14.0 5 8.5 10.0 For the time duration [0, 15]: 6 1.0 13.0 (a) calculate throughput rate; (b) plot number of jobs in the system as a function of time from 0 to 15 and calculate the average number over the duration [0, 15]; (c) calculate the average delay of the 6 jobs. Verify that Little's Law is satisfied by the results in (a), (b), and (c). M/G/1 queue (Simon S. Lam) 4

5 Random variable with discrete values Random variable X with discrete values 1,,, m Let P i = probability [X = i ] for i = 1,,, m Its epected value (mean) is X m = i = 1 i P i m Its second moment is X = P ( X ) i i i = 1 M/G/1 queue (Simon S. Lam) 5

6 Random Variable with continuous values Random variable X with probability distribution function (PDF), F ( ) = P[ X ], 0 X Its probability density function (pdf) is f X df X ( ) ( ) = d Its epected value is X = fx ( ) d 0 Its second moment is = X ( ) ( ) 0 X f d X What if F X () is discontinuous? M/G/1 queue (Simon S. Lam) 6

7 Poisson arrival process at rate λ It is a counting process with independent increments. Let X(s, s+t) be the number of arrivals in the time interval (s, s+t). For any time s, ( λtλ t ) k λt P[ X ( ss, + t) = k] = e k 0, t 0 k! The above can be derived from the binomial distribution by dividing t into n small intervals and let n go to infinity: n λt k λt n k P[ X ( s, s + t ) = k ] = lim 1 k 0, t 0 n k n n M/G/1 queue (Simon S. Lam) 7

8 Time between consecutive arrivals in a Poisson process has the eponential distribution Consider the random variable T which is the time between een consecutive arrivals Probability distribution function of T is At () = PT [ t ] = 1 PT [ > t ] t = 1 P [ X ( s, s+ t ) = 0] = 1 e λ, t 0 Probability density function of T is da() t t at () = = λe λ t 0 dt memoryless property M/G/1 queue (Simon S. Lam) 8

Topics Average delay of M/G/1 queue with FCFS (FIFO) scheduling Pollaczek-Khinchin formula motivation for packet switching Residual life of a random variable Conservation Law (M/G/1) 1/31/017 M/G/1 queue (Simon S. Lam) 9 9

10 Single-Server Queue λ μ μ λ ρ average service time, in seconds queue server (work conserving) service rate, in packets/second ( μ = 1/ ) arrival rate, in packets/second utilization of server (Note: For packets, service time is transmission time) Conservation of fflow ( λ < μ, unbounded buffer) λ = ρμ ρ = μ λ = λ 1/31/017 M/G/1 queue (Simon S. Lam) 10

11 M/G/1 queue Single server work-conserving it does not idle when there is work, also no overhead, i.e., it performs 1 second of work per second FCFS service Arrivals according to a Poisson process at rate λ jobs/second Service times of arrivals are 1,,, i which are independent, identically distributed (with a general distribution) Average service time is, average wait is W, average delay is T = W + M/G/1 queue (Simon S. Lam) 11

1 Ut () Let Ut () be the unfinished work at time t 0 w 3w3 1 1 1 1 3 1 3 1 3 4 5 arrivals and departures time 1/31/017 M/G/1 queue (Simon S. Lam) 1

13 Derivation of W Time average of unfinished work is U 1 τ = 0 τ Utdt () 1 = + n 1 = + w 1 n n τ i i wi i= 1 i= 1 where i and w i are independent i i i w = w τ i i i i For Poisson arrivals, the average wait is equal to U from the Poisson arrivals see time average (PASTA) Theorem M/G/1 queue (Simon S. Lam) 13

14 Derivation of W (cont.) The average wait is 1 λ λ = λ + = + λ = + ρ W W W W W W (1 ρ ) = λ λ = (1 ρ) Pollaczek-Khinchin (P-K) mean value formula 1/31/017 M/G/1 queue (Simon S. Lam) 14

M/G/1 queue Markovian T Poisson General Average delay is T = + W = + λ (1 ρ) 0 1.0 ρ Also called Pollaczek-Khinchin (P-K) mean value formula 1/31/017 M/G/1 queue (Simon S. Lam) 15 15

16 Special Cases 1. Service times have an eponential distribution (M/M/1). We then have = ( ) ()( ) ( ) W = λ = λ = ρ (1 ρ) 1 ρ 1 ρ T = W + ρ ρ + ρ = + = 1 ρ 1 ρ T decreases as λ increases λ 10λ μ 10μ ρ = μ λ = 10 10 μ λ T 10μ ρ 1 0.1 = = 1 ρ 1 ρ λ 0 10 1.0 ρ μ 1/31/017 M/G/1 queue (Simon S. Lam) 16

17. Service times are constant (deterministic) = ( ) W = λ ( ) = ρ (1 ρ ) (1 ρ ) M/D/1 T= ρ + = ( ρ+ ρ) (1 ρ ) (1 ρ ) T = ρ ( ρ ) 1 (1 ρ) λ T decreases as increases λ 1/31/017 M/G/1 queue (Simon S. Lam) 17

18 Two Servers and Two Queues: 60 jobs/sec 100 jobs/sec 60 jobs/sec 100 jobs/sec Single Higher Speed Server: 10 jobs/sec 00 jobs/sec 1/31/017 M/G/1 queue (Simon S. Lam) 18

19 Delay performance of packet switching over circuit it switching Consider how to share a 10 Gbps channel 1. Circuit switching : Divide 10 Gbps of bandwidth into 10,000 channels of 1 Mbps each and allocate them to 10,000000 sources. Packet switching: Packets from 10,000 sources queue to share the 10 Gbps channel Packet switching delay is 10-4 of circuit switching delay Contribution of queueing theory! 1/31/017 M/G/1 queue (Simon S. Lam) 19

0 Residual life of a random variable residual life n i= 1 area = i / duration = n i= 1 Average residual life found by a random arrival = area/duration i 1 1 1 1 3 1 4 0 random arrival 1 5 1 6 time M/G/1 queue (Simon S. Lam) 0

1 Mean residual life for eamples Recall that the eponential distribution is memoryless X X mean residual life = X Eample 1: X is a constant X = ( X ) mean residual life = X / Eample : X is eponentially distributed with density function f ( ) = μe μ f X X = 1/ μ and X = / μ mean residual life = X = 1/ μ M/G/1 queue (Simon S. Lam) 1

Conservation Law 1/31/017 M/G/1 queue (Simon S. Lam)

3 For a work conserving server, work gets done at one second per second. U(t) depends on the arrivals only. U(t) () is independent of order of service Ut () 0 w w 3 3 1 1 1 1 3 1 3 1 3 4 5 arrivals and departures (FCFS) time M/G/1 queue (Simon S. Lam) 3

4 R classes of packets with arrival rates, mean service times, and second moments, Define 1 λ1, λ,..., λr 1,,...,, R 1,,..., R ρr = λr r for r = 1,,..., R ρ = ρ + ρ +... + ρ R U S λ λ λ λ = = = = = R R R r r r r r ρr ρ r= 1 r r= 1 r= 1 λ where U is mean residual service, ρ is the fraction of time a class r packet is S r r in service, and is ave. residual service of the class r pac ket found by arrival r M/G/1 queue (Simon S. Lam) 4

5 M/G/1 Conservation Law Non-preemptive, work-conserving server Let W r be the average wait of class r packets, r = 1,,, R Let N qr, be the average number of class r packets in queue The time average of unfinished work, Ut ( ), is R R R U = U + N = U + λw = U + ρ W S q, r r S r r r S r r r= 1 r= 1 r= 1 We already have from P-K formula (for ρ<1) λ ρ 1 U S U = W FCFS = = = (1 ρ) (1 ρ) 1 ρ M/G/1 queue (Simon S. Lam) 5

6 M/G/1 Conservation Law (cont.) R U S Therefore, U + ρw = for ρ < 1 ρ S r r r = 1 1 R U S ρ U S ρrw = r US ρwfcfs = = r= 1 1 ρ 1 ρ which is the Conservation Law. It holds for any non-preemptive work-conserving queueing discipline Any preferential treatment for one class/customer is afforded at the epense of other classes/customers M/G/1 queue (Simon S. Lam) 6

7 The end M/G/1 queue (Simon S. Lam) 7