Introduction to Queuing Theory

Slides:



Advertisements
Similar presentations
Introduction to Queuing Theory
Advertisements

Queueing Model 박희경.
Queuing Models Basic Concepts
System Performance & Scalability i206 Fall 2010 John Chuang.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
RAIDs Performance Prediction based on Fuzzy Queue Theory Carlos Campos Bracho ECE 510 Project Prof. Dr. Duncan Elliot.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
Lecture 11 Queueing Models. 2 Queueing System  Queueing System:  A system in which items (or customers) arrive at a station, wait in a line (or queue),
1 Queueing Theory H Plan: –Introduce basics of Queueing Theory –Define notation and terminology used –Discuss properties of queuing models –Show examples.
Queueing Network Model. Single Class Model Open - Infinite stream of arriving customers Closed - Finite population eg Intranet users Indistinguishable.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 14-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 14.
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.
QUEUING MODELS Queuing theory is the analysis of waiting lines It can be used to: –Determine the # checkout stands to have open at a store –Determine the.
Internet Queuing Delay Introduction How many packets in the queue? How long a packet takes to go through?

Queuing Theory (Waiting Line Models)
Queuing Networks. Input source Queue Service mechanism arriving customers exiting customers Structure of Single Queuing Systems Note: 1.Customers need.
Introduction to Queuing Theory
Queueing Theory Queueing theory definitions (Bose) “the basic phenomenon of queueing arises whenever a shared facility needs to be accessed for.
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  …
Queueing Theory [Bose] “The basic phenomenon of queueing arises whenever a shared facility needs to be accessed for service by a large number of jobs or.
Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose.
1 Chapter 16 Applications of Queuing Theory Prepared by: Ashraf Soliman Abuhamad Supervisor by : Dr. Sana’a Wafa Al-Sayegh University of Palestine Faculty.
Queuing models Basic definitions, assumptions, and identities Operational laws Little’s law Queuing networks and Jackson’s theorem The importance of think.
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Management of Waiting Lines McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University.
 Birth Death Processes  M/M/1 Queue  M/M/m Queue  M/M/m/B Queue with Finite Buffers  Results for other Queueing systems 2.
Introduction to Operations Research
Introduction to Queueing Theory
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
1 Queueing Theory Frank Y. S. Lin Information Management Dept. National Taiwan University
Queueing Theory What is a queue? Examples of queues: Grocery store checkout Fast food (McDonalds – vs- Wendy’s) Hospital Emergency rooms Machines waiting.
TexPoint fonts used in EMF.
1 Elements of Queuing Theory The queuing model –Core components; –Notation; –Parameters and performance measures –Characteristics; Markov Process –Discrete-time.
CS433 Modeling and Simulation Lecture 12 Queueing Theory Dr. Anis Koubâa 03 May 2008 Al-Imam Mohammad Ibn Saud University.
1 Queuing Systems (2). Queueing Models (Henry C. Co)2 Queuing Analysis Cost of service capacity Cost of customers waiting Cost Service capacity Total.
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
SIMULATION EXAMPLES QUEUEING SYSTEMS.
Queuing Theory and Traffic Analysis Based on Slides by Richard Martin.
CS352 - Introduction to Queuing Theory Rutgers University.
CSCI1600: Embedded and Real Time Software Lecture 19: Queuing Theory Steven Reiss, Fall 2015.
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
Chapter 6 Queueing Models
Introduction Definition M/M queues M/M/1 M/M/S M/M/infinity M/M/S/K.
Queuing Theory.  Queuing Theory deals with systems of the following type:  Typically we are interested in how much queuing occurs or in the delays at.
Management of Waiting Lines Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
Queuing Models.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
1 BIS 3106: Business Process Management (BPM) Lecture Nine: Quantitative Process Analysis (2) Makerere University School of Computing and Informatics Technology.
Queuing Theory Simulation & Modeling.
“QUEUING THEORY”.
Lecture 2.7. Queuing Theory
Al-Imam Mohammad Ibn Saud University
Queueing Theory What is a queue? Examples of queues:
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
Queueing Theory Carey Williamson Department of Computer Science
Introduction Notation Little’s Law aka Little’s Result
Queuing models Basic definitions, assumptions, and identities
System Performance: Queuing
Queuing models Basic definitions, assumptions, and identities
TexPoint fonts used in EMF.
Mitchell Jareo MAT4340 – Operations Research Dr. Bauldry
Queueing Theory 2008.
Carey Williamson Department of Computer Science University of Calgary
Waiting Line Models Waiting takes place in virtually every productive process or service. Since the time spent by people and things waiting in line is.
Course Description Queuing Analysis This queuing course
SIMULATION EXAMPLES QUEUEING SYSTEMS.
Presentation transcript:

Introduction to Queuing Theory

Queueing theory definitions (Bose) “the basic phenomenon of queueing arises whenever a shared facility needs to be accessed for service by a large number of jobs or customers.” (Wolff) “The primary tool for studying these problems [of congestions] is known as queuing theory.” (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this study Queuing Theory." "Any system in which arrivals place demands upon a finite capacity resource may be termed a queueing system.” (Mathworld) “The study of the waiting times, lengths, and other properties of queues.”

Applications of Queuing Theory Telecommunications Traffic control Determining sequence of computer operations Predicting computer performance Health services (e.g., control of hospital bed assignments) Airport traffic, airline ticket sales Layout of manufacturing systems.

Example application of queuing theory In many retail stores and banks multiple line/multiple checkout system  a queuing system where customers wait for the next available cashier We can prove using queuing theory that : throughput improves increases when queues are used instead of separate lines

Example application of queuing theory

Queuing theory for studying networks View network as collections of queues FIFO data-structures Queuing theory provides probabilistic analysis of these queues Examples: Average length Average waiting time Probability queue is at a certain length Probability a packet will be lost

Model Queuing System Use Queuing models to Server System Queuing System Queue Server Use Queuing models to Describe the behavior of queuing systems Evaluate system performance

Characteristics of queuing systems Arrival Process The distribution that determines how the tasks arrives in the system. Service Process The distribution that determines the task processing time Number of Servers Total number of servers available to process the tasks

Kendall Notation 1/2/3(/4/5/6) Six parameters in shorthand First three typically used, unless specified Arrival Distribution Service Distribution Number of servers Total Capacity (infinite if not specified) Population Size (infinite) Service Discipline (FCFS/FIFO)

Distributions M: stands for "Markovian", implying exponential distribution for service times or inter-arrival times. D: Deterministic (e.g. fixed constant) Ek: Erlang with parameter k Hk: Hyperexponential with param. k G: General (anything)

Kendall Notation Examples M/M/1: Poisson arrivals and exponential service, 1 server, infinite capacity and population, FCFS (FIFO) the simplest ‘realistic’ queue M/M/m Same, but M servers G/G/3/20/1500/SPF General arrival and service distributions, 3 servers, 17 queue slots (=20-3), 1500 total jobs, Shortest Packet First

Analysis of M/M/1 queue Given: Solve: l: Arrival rate of jobs (packets on input link) m: Service rate of the server (output link) Solve: L: average number in queuing system Lq average number in the queue W: average waiting time in whole system Wq average waiting time in the queue

M/M/1 queue model L Lq l m Wq W

Little’s Law System Arrivals Departures Little’s Law: Mean number tasks in system = mean arrival rate x mean response time Observed before, Little was first to prove Applies to any system in equilibrium, as long as nothing in black box is creating or destroying tasks

Proving Little’s Law J = Shaded area = 9 Same in all cases! 1 2 3 4 5 6 7 8 # in System 1 2 3 Arrivals 1 2 3 Packet # Departures 1 2 3 4 5 6 7 8 Time 1 2 3 Time in System Packet # 1 2 3 Time J = Shaded area = 9 Same in all cases!

Definitions J: “Area” from previous slide N: Number of jobs (packets) T: Total time l: Average arrival rate N/T W: Average time job is in the system = J/N L: Average number of jobs in the system = J/T

Proof: Method 1: Definition 1 2 3 Time in System (W) Packet # (N) 1 2 3 1 2 3 # in System (L) = 1 2 3 4 5 6 7 8 Time (T)

Proof: Method 2: Substitution Tautology

M/M/1 queue model L Lq l m Wq W L=λW Lq=λWq

Poisson Process For a poisson process with average arrival rate , the probability of seeing n arrivals in time interval delta t

Poisson process & exponential distribution Inter-arrival time t (time between arrivals) in a Poisson process follows exponential distribution with parameter

M/M/1 queue model l m Wq W L Lq L=λW Lq=λWq W = Wq + (1/μ)

Solving queuing systems 4 unknowns: L, Lq W, Wq Relationships: L=lW Lq=lWq W = Wq + (1/m) If we know any 1, can find the others

Analysis of M/M/1 queue Goal: A closed form expression of the probability of the number of jobs in the queue (Pi) given only l and m

Equilibrium conditions Define to be the probability of having n tasks in the system at time t

Equilibrium conditions

Solving for P0 and Pn Step 1 Step 2

Solving for P0 and Pn Step 3 Step 4

Solving for L

Solving W, Wq and Lq

Online M/M/1 animation http://www.dcs.ed.ac.uk/home/jeh/Simjava/queueing/mm1_q/mm1_q.html

Response Time vs. Arrivals

Stable Region linear region

Example On a network gateway, measurements show that the packets arrive at a mean rate of 125 packets per second (pps) and the gateway takes about 2 millisecs to forward them. Assuming an M/M/1 model, what is the probability of buffer overflow if the gateway had only 13 buffers. How many buffers are needed to keep packet loss below one packet per million?

Example Measurement of a network gateway: mean arrival rate (l): 125 Packets/s mean response time (m): 2 ms Assuming exponential arrivals: What is the gateway’s utilization? What is the probability of n packets in the gateway? mean number of packets in the gateway? The number of buffers so P(overflow) is <10-6?

Example Arrival rate λ = Service rate μ = Gateway utilization ρ = λ/μ = Prob. of n packets in gateway = Mean number of packets in gateway =

Example Arrival rate λ = 125 pps Service rate μ = 1/0.002 = 500 pps Gateway utilization ρ = λ/μ = 0.25 Prob. of n packets in gateway = Mean number of packets in gateway =

Example Probability of buffer overflow: To limit the probability of loss to less than 10-6:

Example Probability of buffer overflow: = P(more than 13 packets in gateway) To limit the probability of loss to less than 10-6:

Example Probability of buffer overflow: = P(more than 13 packets in gateway) = ρ13 = 0.2513 = 1.49x10-8 = 15 packets per billion packets To limit the probability of loss to less than 10-6:

Example Probability of buffer overflow: = P(more than 13 packets in gateway) = ρ13 = 0.2513 = 1.49x10-8 = 15 packets per billion packets To limit the probability of loss to less than 10-6:

Example To limit the probability of loss to less than 10-6: or

Example To limit the probability of loss to less than 10-6: or = 9.96 ≈10 buffers

Example One fast server vs. m slow servers? In terms of delay, what will happen?

Example Customers arrive at a fast-food restaurant at a rate of 5/minute and wait to receive their order for an average of 5 minutes. Customers eat in the restaurant with probability 0.5 and carry out their order without eating with probability 0.5. A meal requires an average of 20 minutes. What is the average number of customers in the restaurant?

Example Empty taxis pass by a street comer at a Poisson rate of 2 per minute and pick up a passenger if one is waiting there. Passengers arrive at the street corner at a Poisson rate of 1 per minute and wait for a taxi only if there are fewer than 4 persons waiting; otherwise, they leave and never return. Find the average waiting time of a passenger who joins the queue.

Example The average time,T, a car spends in a certain traffic system is related to the average number of cars N in the system by a relation of the form T = a + bN2, where a > 0, b > 0 are give in scalars. What is the maximal car arrival rate that the system can sustain?

Example A person enters a bank and finds all of the four clerks busy serving customers. There are no other customers in the bank, so the person will start service as soon as one of the customers in service leaves. Customers have independent, identical, exponential distribution of service time. What is the probability that the person will be the last to leave the bank assuming that no other customers arrive? If the average service time is 1 minute, what is the average time the person will spend?