Introduction to Queuing Theory. Mathematical Modelling

Similar documents
Introduction to Queueing Theory

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

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

Performance Evaluation of Queuing Systems

QUEUING SYSTEM. Yetunde Folajimi, PhD

Introduction to Queueing Theory

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

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

Introduction to Queueing Theory

Figure 10.1: Recording when the event E occurs

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

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

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

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

Introduction to queuing theory

Part I Stochastic variables and Markov chains

Introduction to Markov Chains, Queuing Theory, and Network Performance

Probability and Statistics Concepts

The exponential distribution and the Poisson process

Computer Networks More general queuing systems

Part II: continuous time Markov chain (CTMC)

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

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

Chapter 2 Queueing Theory and Simulation

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

CS418 Operating Systems

Queueing Theory and Simulation. Introduction

Queuing Theory. Using the Math. Management Science

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 "

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

Queues and Queueing Networks

Advanced Computer Networks Lecture 3. Models of Queuing

Link Models for Circuit Switching

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

Chapter 5: Special Types of Queuing Models

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

Data analysis and stochastic modeling

Buzen s algorithm. Cyclic network Extension of Jackson networks

NATCOR: Stochastic Modelling

Elementary queueing system

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

Stochastic process. X, a series of random variables indexed by t

Introduction to Queueing Theory with Applications to Air Transportation Systems

The effect of probabilities of departure with time in a bank

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

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

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Slides 9: Queuing Models

ECE 313 Probability with Engineering Applications Fall 2000

Introduction to queuing theory

IOE 202: lectures 11 and 12 outline

Lecture 20: Reversible Processes and Queues

Systems Simulation Chapter 6: Queuing Models

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

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

CSE 4201, Ch. 6. Storage Systems. Hennessy and Patterson

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

Intro to Queueing Theory

Massachusetts Institute of Technology

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

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

PBW 654 Applied Statistics - I Urban Operations Research

Name of the Student:

THE HEAVY-TRAFFIC BOTTLENECK PHENOMENON IN OPEN QUEUEING NETWORKS. S. Suresh and W. Whitt AT&T Bell Laboratories Murray Hill, New Jersey 07974

Analysis of Software Artifacts

Derivation of Formulas by Queueing Theory

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6

Basic Queueing Theory

Queuing Theory. The present section focuses on the standard vocabulary of Waiting Line Models.

Performance Modelling of Computer Systems

7 Variance Reduction Techniques

Review of Queuing Models

LIMITS FOR QUEUES AS THE WAITING ROOM GROWS. Bell Communications Research AT&T Bell Laboratories Red Bank, NJ Murray Hill, NJ 07974

Waiting Line Models: Queuing Theory Basics. Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1

Assignment 3 with Reference Solutions

Solution: The process is a compound Poisson Process with E[N (t)] = λt/p by Wald's equation.

Computer Systems Modelling

Solutions For Stochastic Process Final Exam

6 Solving Queueing Models

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

Massachusetts Institute of Technology

Základy teorie front

2905 Queueing Theory and Simulation PART IV: SIMULATION

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

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

Queueing Theory (Part 4)

Performance analysis of queueing systems with resequencing

Page 0 of 5 Final Examination Name. Closed book. 120 minutes. Cover page plus five pages of exam.

f X (x) = λe λx, , x 0, k 0, λ > 0 Γ (k) f X (u)f X (z u)du

Stochastic Models of Manufacturing Systems

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

IEOR 6711, HMWK 5, Professor Sigman

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

On the Partitioning of Servers in Queueing Systems during Rush Hour

Queuing Theory. Richard Lockhart. Simon Fraser University. STAT 870 Summer 2011

SOLUTIONS IEOR 3106: Second Midterm Exam, Chapters 5-6, November 8, 2012

Verification and Validation. CS1538: Introduction to Simulations

TOWARDS BETTER MULTI-CLASS PARAMETRIC-DECOMPOSITION APPROXIMATIONS FOR OPEN QUEUEING NETWORKS

Birth-Death Processes

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

Transcription:

Queuing Theory, COMPSCI 742 S2C, 2014 p. 1/23 Introduction to Queuing Theory and Mathematical Modelling Computer Science 742 S2C, 2014 Nevil Brownlee, with acknowledgements to Peter Fenwick, Ulrich Speidel and Ilze Ziedins

Overview Queuing Theory, COMPSCI 742 S2C, 2014 p. 2/23 Introduction, queuing models Mathematics background Random variables Renewal processes Poisson processes Queuing theory Kendall notation of queuing problems Finding a distibution Little s formula, PASTA

Queuing system diagram Queuing Theory, COMPSCI 742 S2C, 2014 p. 3/23 Requestors issue service request service request service request service request service request service request Queue Server provides Service Server Service serviced requests

Random variables Queuing Theory, COMPSCI 742 S2C, 2014 p. 4/23 A random variable X is a function that assigns a real-number value to each outcome of an experiment Usually described by a probability density function f(x) and a distribution function F(x) = x f(u)du f(x) tells how likely it is that X s value will be near x. Note that f(x) can be > 1. X has an exponential distribution with parameter λ if it has Density function f(x) = λe λ x ; x 0 Distribution function F(x) = 1 e λ x ; x 0

Probabilities: 6-sided die, exponential Queuing Theory, COMPSCI 742 S2C, 2014 p. 5/23 0.4 0.35 0.3 0.25 0.2 probability function: uniform 1.4 1.2 1 0.8 probability function: exponential 0.15 0.1 0.6 0.4 lambda = 1.0 lambda = 0.5 lambda = 0.25 0.05 0.2 0 0 1 2 3 4 5 6 7 8 0 0 1 2 3 4 5 6 7 1.6 1.4 distribution function: uniform 1.4 1.2 distribution function: exponential 1.2 1 0.8 0.6 1 0.8 0.6 0.4 0.4 0.2 0 0 1 2 3 4 5 6 7 8 0.2 0 lambda = 1.0 lambda = 0.5 lambda = 0.25 0 1 2 3 4 5

Renewal Processes Queuing Theory, COMPSCI 742 S2C, 2014 p. 6/23 Consider a sequence of events which happen first at time T 0 = 0, then keep happening at random intervals The events occur at times T n (n = 0, 1,...; T 0 = 0), and S n = T n T n 1 (n = 1, 2,...) are the times between them, often called renewal periods If the random variables S n are independent and identically distributed (iid), then the sequence {T n ;n = 0, 1,...} is a renewal process Renewal processes are useful for modelling streams of packets on a wire, jobs to be processed, etc. A renewal process is completely characterised by the common distribution function, F(x), or the density function, f(x) (if it exists), of its renewal periods

Poisson processes (1) Queuing Theory, COMPSCI 742 S2C, 2014 p. 7/23 A renewal process with exponentially distributed renewal periods S, i.e. F(x) = 1 e λ x, is called a Poisson process Poisson processes are often used in modelling. They derive several useful properties from the exponential distribution, as follows.. Lack of memory: P(S t + t S > t) = P(S t); s,t 0 Knowing that the process has been running for time t doesn t affect its distribution for the remaining time (i.e. the time until the next event) The process forgets its past

Poisson processes (2) Queuing Theory, COMPSCI 742 S2C, 2014 p. 8/23 Uniform arrival rate: P(S t + t S > t) λ t,for small t With a Poisson process, arrivals occur at an average rate λ This implies PASTA: Poisson Arrivals See Time Averages A Poisson arrival acts as a random observer and sees the queue in equilibrium Superposition: If A 1,A 2,...A n are independent Poisson processes with rates λ 1,λ 2,...λ n, their superposition is also a Poisson process, with rate λ 1 + λ 2... + λ n A Poisson process can also be decomposed into a set of Poisson processes

Poisson distribution Queuing Theory, COMPSCI 742 S2C, 2014 p. 9/23 For a Poisson process, i.e. exponential distribution of interarrival times (renewal periods): Probability that n arrivals occur in interval of length t is P n (t) = (λt)n n! e λt This formula is the Poisson distribution with parameter λ t, for which Mean = λt, and V ar = λt λ is the mean rate, i.e. λ events occur per unit time More generally... Mean of random variable X: Mean(X) = E[X] = xf(x)dx Variance of X: V ar(x) = σ 2 = E[(X E[X]) 2 ]

Kendall notation of a queuing problem Queuing Theory, COMPSCI 742 S2C, 2014 p. 10/23 ArrDist/ServDist/Servers/Buffers/Population/ServDisc A queuing problem can be described by its arrival distribution (arrival times of service requests) service distribution (time server takes to service a request) number of available servers buffers (total number of possible service requests in the system) population (total number of possible requests) service discipline (in which order do we deal with requests?) We often only give first three, e.g. M/M/1 other parameters take default values, i.e. / /F IF O

Arrival time distributions Queuing Theory, COMPSCI 742 S2C, 2014 p. 11/23 Need to model the arrival process (customers coming through bank door, packets arriving at router) Some processes have highly predictable arrival processes (e.g., a plane lands and 100 passengers get off), others have a less deterministic nature (e.g., customers arriving at a bank) Arrival processes are renewal processes Can often model arrivals using statistical distributions e.g. (Kendall notation in parentheses),exponential (M), deterministic (D), Erlang with parameter k (E k ) The thing we re usually interested in is the interarrival time; average arrival rate (arrivals per time unit) is denoted as λ where applicable

Deterministic arrival distributions (D) Queuing Theory, COMPSCI 742 S2C, 2014 p. 12/23 Very simple: All inter-arrival times τ are constant! τ = 1/λ

Exponential arrival distributions (M) Queuing Theory, COMPSCI 742 S2C, 2014 p. 13/23 Exponential arrival distributions are perhaps the most common apart from deterministic ones Approximately exponentially distributed, e.g. the time until you next meet a friend you haven t heard from in 2 years, the time the next customer walks through the door at your local supermarket, etc. Exponential distribution: P(S t) = t 0 λe λu du S = time between two arrivals (random variable) Probability next arrival occurs in t seconds is P(S t). Mean of S is 1/λ, standard deviation is also 1/λ. (Remember: λ is the mean arrival rate) Memoryless

Erlang arrival distributions (E k ) Queuing Theory, COMPSCI 742 S2C, 2014 p. 14/23 Interarrival time probability given by P(S t) = t 0 λ (λu)k 1 (k 1)! e λu du Values 0, two parameters: Mean = 1/λ, shape k, often more realistic than plain exponential Applies to a cascade of servers with exponential distribution times, such that a customer can t be started until the previous one has been completely processed When k is integer, Erlang distribution is sum of k independent exponential distributions (gamma function) Note that the exponential distribution results for k = 1

Exponential and Erlang plots Queuing Theory, COMPSCI 742 S2C, 2014 p. 15/23 P(S<t) P(S<t) t u t u

Service time distributions Queuing Theory, COMPSCI 742 S2C, 2014 p. 16/23 Service time: time that a server needs to deal with a service request. For example, the time it takes to re-fuel a car or the time it takes to route a packet at a router Average service time is often denoted as 1/µ, where µ is the average service rate (number of requests serviced per time unit) per server Can model these service times via distributions basically the same as for arrival time distributions. Just use µ instead of λ

Number of servers Queuing Theory, COMPSCI 742 S2C, 2014 p. 17/23 The number of available servers, n is obviously a very important parameter of a queuing system, e.g., number of pumps at the service station A queuing system can have either a separate queue for each server, or a common queue for all servers Kendall notation says nothing about common or separate queues Total service rate is nµ

Buffer size Queuing Theory, COMPSCI 742 S2C, 2014 p. 18/23 The maximum number of service requests that can be in the system (queued or being serviced) at any one time This number may be unlimited (the queue just gets longer), in which case the Kendall notation omits it...... or limited (e.g., limited number of buffers in a packet switch) Note that if λ < nµ, i.e. arrival rate < service rate, we can often assume even for relatively small actual population sizes that the buffer size is unlimited

Population size Queuing Theory, COMPSCI 742 S2C, 2014 p. 19/23 Total number of possible service requests at any instant in time, may be limited or unlimited Example: Computer Science has N students. The maximum number of students needing a lab computer at any one time is therefore limited to N. They are not going to be able to do their assignments any faster if we give them more than N lab computers to work on Can often assume that the number is unlimited. For example, assume that we have an unlimited number of CS students as it is unlikely that all of them will ever turn up in the lab at once Default in Kendall notation is unlimited (value is omitted)

Queuing/service discipline Queuing Theory, COMPSCI 742 S2C, 2014 p. 20/23 How do we process requests in the queue? First-come-first-served (FCFS)? Last-come-first-served (LCFS)? Request-dependent, e.g., quick/easy jobs first/last? According to request priority? Default in Kendall notation is FCFS (value is omitted in this case)

Kendall notation again Queuing Theory, COMPSCI 742 S2C, 2014 p. 21/23 So what s an M/D/2/12/200/FCFS queue then? Answer: exponentially distributed interarrival times (Markov) fixed service time (Deterministic) two servers up to 10 places in the queue (plus two being served) at most 200 possible requests at any one time, i.e., not all requests may make the queue requests that arrive first get serviced first (FCFS)

Queue Occupation Rate, some simple insights Queuing Theory, COMPSCI 742 S2C, 2014 p. 22/23 Consider a G/G/n queue (with G being any possible distribution) If λ is the arrival rate and µ is the service rate of a single server, then The queue will grow to infinity if λ > nµ The queue will also grow to infinity if λ = nµ (random walk), except if it s a D/D/n queue The quantity ρ = λ/nµ is called the occupation rate. It states the average portion of time that each server is busy Reference: Introduction to Operations Research, Hillier & Lieberman, McGraw Hill

Little s formula Queuing Theory, COMPSCI 742 S2C, 2014 p. 23/23 Sometimes referred to as Little s law or result States that the expected number of requests in the queuing system N (in queue and being processed) is given by N = λt where T is the expected time that a request will spend in the system Alternatively T = N/λ or time in system = number in system/av interarrival time