Queueing Theory (Delay Models). Introduction Total delay of the i-th customer in the system T i = W i + τ i N(t) : the number of customers in the system.

Slides:



Advertisements
Similar presentations
Lecture 5 This lecture is about: Introduction to Queuing Theory Queuing Theory Notation Bertsekas/Gallager: Section 3.3 Kleinrock (Book I) Basics of Markov.
Advertisements

Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
E&CE 418: Tutorial-4 Instructor: Prof. Xuemin (Sherman) Shen
1 Chapter 8 Queueing models. 2 Delay and Queueing Main source of delay Transmission (e.g., n/R) Propagation (e.g., d/c) Retransmission (e.g., in ARQ)
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
Probability, Statistics, and Traffic Theories
TCOM 501: Networking Theory & Fundamentals
1 Part III Markov Chains & Queueing Systems 10.Discrete-Time Markov Chains 11.Stationary Distributions & Limiting Probabilities 12.State Classification.
Continuous Time Markov Chains and Basic Queueing Theory
Lecture 13 – Continuous-Time Markov Chains
1 ELEN 602 Lecture 8 Review of Last lecture –HDLC, PPP –TDM, FDM Today’s lecture –Wavelength Division Multiplexing –Statistical Multiplexing –Preliminary.
Queueing Model 박희경.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Performance analysis for high speed switches Lecture 6.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
1 Queuing Theory 2 Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or.
Queueing Theory: Part I
1 Overview of Queueing Systems Michalis Faloutsos Archana Yordanos The web.
The moment generating function of random variable X is given by Moment generating function.
1 TCOM 501: Networking Theory & Fundamentals Lectures 9 & 10 M/G/1 Queue Prof. Yannis A. Korilis.
CS533 Modeling and Performance Evaluation of Network and Computer Systems Queuing Theory (Chapter 30-31)
Queueing Theory lSpecification of a Queue mSource Finite Infinite mArrival Process mService Time Distribution mMaximum Queueing System Capacity mNumber.
Queueing Theory.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Queuing Theory. Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or queue)
Queuing Networks: Burke’s Theorem, Kleinrock’s Approximation, and Jackson’s Theorem Wade Trappe.
1 Markov Chains H Plan: –Introduce basics of Markov models –Define terminology for Markov chains –Discuss properties of Markov chains –Show examples of.
Internet Queuing Delay Introduction How many packets in the queue? How long a packet takes to go through?

CDA6530: Performance Models of Computers and Networks Examples of Stochastic Process, Markov Chain, M/M/* Queue TexPoint fonts used in EMF. Read the TexPoint.
Introduction to Queuing Theory
Queueing Theory Specification of a Queue Source Arrival Process
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  …
CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University.
MIT Fun queues for MIT The importance of queues When do queues appear? –Systems in which some serving entities provide some service in a shared.
Lecture 14 – Queuing Networks Topics Description of Jackson networks Equations for computing internal arrival rates Examples: computation center, job shop.
Lecture 10: Queueing Theory. Queueing Analysis Jobs serviced by the system resources Jobs wait in a queue to use a busy server queueserver.
Network Design and Analysis-----Wang Wenjie Queueing System IV: 1 © Graduate University, Chinese academy of Sciences. Network Design and Analysis Wang.
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
1 Queuing Models Dr. Mahmoud Alrefaei 2 Introduction Each one of us has spent a great deal of time waiting in lines. One example in the Cafeteria. Other.
TexPoint fonts used in EMF.
Modeling and Analysis of Computer Networks
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
EE6610: Week 6 Lectures.
Model under consideration: Loss system Collection of resources to which calls with holding time  (c) and class c arrive at random instances. An arriving.
State N 2.6 The M/M/1/N Queueing System: The Finite Buffer Case.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
The M/M/ N / N Queue etc COMP5416 Advanced Network Technologies.
Network Design and Analysis-----Wang Wenjie Queueing Theory II: 1 © Graduate University, Chinese academy of Sciences. Network Design and Performance Analysis.
Computer Networking Queueing (A Summary from Appendix A) Dr Sandra I. Woolley.
CDA6530: Performance Models of Computers and Networks Chapter 3: Review of Practical Stochastic Processes.
Chapter 2 Probability, Statistics and Traffic Theories
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
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.
COMT 4291 Queuing Analysis COMT Call/Packet Arrival Arrival Rate, Inter-arrival Time, 1/ Arrival Rate measures the number of customer arrivals.
Chap 2 Network Analysis and Queueing Theory 1. Two approaches to network design 1- “Build first, worry later” approach - More ad hoc, less systematic.
Queueing Fundamentals for Network Design Application ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
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.
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
CPE 619 Introduction to Queuing Theory
Lecture 14 – Queuing Networks
Internet Queuing Delay Introduction
Lecture on Markov Chain
Internet Queuing Delay Introduction
Queueing Theory II.
Lecture 14 – Queuing Networks
Model Antrian M/M/s.
Presentation transcript:

Queueing Theory (Delay Models)

Introduction

Total delay of the i-th customer in the system T i = W i + τ i N(t) : the number of customers in the system N q (t) : the number of customers in the queue N s (t) : the number of customers in the service N : the avg number of customers in the queue τ : the service time

T : the total delay in the system λ: the customer arrival rate [#/sec]

Little ’ s Theorem E[N] = λE[T] Number of customer in the system at t N(t)=A(t)-D(t) where D(t) : the number of customer departures up to time t A(t) : the number of customer arrivals up to time t

Poisson Process The interarrival probability density function mean: 1/λ, variance: 1/λ 2 for every t, δ≥0 where

Poisson Process Characteristics of the Poisson process Interarrival times are independent and exponentially distributed If t n denotes the n-th arrival time and the interval τ n = t n+1 - t n, the probability distribution is

Sum of Poisson Random Variables X i, i =1,2, …,n, are independent RVs X i follows Poisson distribution with parameter i Partial sum defined as: S n follows Poisson distribution with parameter

Sum of Poisson Random Variables

Sampling a Poisson Variable X follows Poisson distribution with parameter Each of the X arrivals is of type i with probability p i, i =1,2, …,n, independently of other arrivals; p 1 + p 2 + … + p n = 1 X i denotes the number of type i arrivals X 1, X 2, … X n are independent X i follows Poisson distribution with parameter i  p i

Sampling a Poisson Variable (cont.)

Merging & Splitting Poisson Processes A 1, …, A k independent Poisson processes with rates 1, …, k Merged in a single process A= A 1 + … + A k A is Poisson process with rate = 1 + … + k A: Poisson processes with rate Split into processes A 1 and A 2 independently, with probabilities p and 1-p respectively A 1 is Poisson with rate 1 = p A 2 is Poisson with rate 2 = (1-p)      p (1-p) p 1-p

Poisson Variable mean variance Memoryless property (if exponentially distributed)

Review of Markov chain theory Discrete time Markov chains discrete time stochastic process {X n |n=0,1,2,..} taking values from the set of nonnegative integers Markov chain if where

Markov chain Markov chain formulation Consider a discrete time MC where N k is the number of customers at time k and N(t) is the number of customers at time t probabilities where the arrival and departure processes are independent

The transition probability matrix n-step transition probabilities Review of Markov chain theory

Chapman-Kolmogorov equations detailed balance equations for birth-death systems (in steady state) Review of Markov chain theory

Example -1  1  2 /2  1  2 /2 1-  2 /2  2 /2 01 P 0 =(2-  2 )/(2-  2 (1-  1 )) the throuput= P 0 *P(s=0| P 0 )*0+ P 0 *P(s=1| P 0 )*1+ P 0 *P(s=2| P 0 )*2+ P 1 *P(s=0| P 1 )*0+ P 1 *P(s=1| P 1 )*1+ P 1 *P(s=2| P 1 )*2

Continuous time Markov chains {X(t)| t≥0} taking nonnegative integer values υ i : the transition rate from state i q ij : the transition rate from state i to j q ij = υ i P ij the steady state occupancy probability of state j Analog of detailed balance equations for DTMC

Queueing Theory21 Birth-And-Death Process

Queueing Theory22 Birth-And-Death Process(cont.) l Equation Expressing This: State Rate In = Rate Out 0  1 P 1 = 0 P P 0 +  2 P 2 = ( 1 +  1 ) P P 1 +  3 P 3 = ( 2 +  2 ) P N-1 N-2 P N-2 +  N P N = ( N-1 +  N-1 ) P N-1 N N-1 P N-1 +  N+1 P N+1 = ( N +  N ) P N

Queueing Theory23 Birth-And-Death Process(cont.) l Finding Steady State Process: State 0:P 1 = ( 0 /  1 ) P 0 1:P 2 = ( 1 /  2 ) P 1 + (  1 P P 0 ) /  2 = ( 1 /  2 ) P 1 + (  1 P 1 -  1 P 1 ) /  2 = ( 1 /  2 ) P 1 =

Queueing Theory24 Birth-And-Death Process(cont.) l Finding Steady State Process(cont.): State n-1:P n = ( n-1 /  n ) P n-1 + (  n-1 P n-1 - n-2 P n-2 ) /  n = ( n-1 /  n ) P n-1 + (  n-1 P n-1 -  n-1 P n-1 ) /  n = ( n-1 /  n ) P n-1

Queueing Theory25 Birth-And-Death Process(cont.) l Finding Steady State Process(cont.): N:P n+1 = ( n /  n+1 ) P n + (  n P n - n-1 P n-1 ) /  n+1 = ( n /  n+1 ) P n To Simplify: Let C = ( n-1 n ) / (  n  n  1 ) Then P n = C n P 0, N = 1, 2,....

M/M/1 queueing system Arrival statistics: stochastic process taking nonnegative integer values is called a Poisson process with rate λ if A(t) is a counting process representing the total number of arrivals from 0 to t arrivals are independent probability distribution function

P[1 arrival and no departure in δ]= where the arrival and departure processes are independent M/M/1 queueing system

Global balance equation M/M/1 queueing system

from Then Average number of customers in the system M/M/1 queueing system

Average delay per customer (waiting time + service time) by Little ’ s theorem Average waiting time Average number of customer in queue Server utilization M/M/1 queueing system

example 1/λ=4 ms, 1/μ=3 ms M/M/1 queueing system

תרגיל קצב הגע למערכת הוא *n קצב השרות הוא  *n א. שרטט את דיאגרמת המצבים ב. מצא את הסתברויות הסטציונרות ג. מצא את מספר הצרכנים הממוצע במערכת במצב היציב ד. מצא את זמן ההשהייה הממוצע במערכת באמצעות משפט LITTLE

פתרון א ב

פתרון ג ד

תרגיל צומת ברשת משתמש בשיטת הניתוב הבאה : כאשר חבילה מגיע אליו ללא תלות ביעדה הוא מפנה אותה לקו יצאה אםם התור לקו זה הוא ריק ולא נשלחת ברגע זה שום חבילה דרך קו זה. אחרת חבילה זו מופנת חבילה זו דרך כו אחר כלשהו. נניח כי שמופע ההודעות לצומת הוא פואסוני עם אורך החבילות מתפלג אקספוננצילי אם  וכיבולת הקו היא C. א. איזה חלק מהחבילות מגעות דרך קו ההעדיף ? ב. אם הוחלט להצמיד תור לקו המהיר, מה אורכו המינימלי של התור כך שההסתברות שחבילה תשודרנה בקו זה תהיה לפחות 0.9 בהנחה ש ? ( האם המערכת במצב יציב ?)

פתרון א Message Length: Transmission Rate: Transmission Time: Service Rate:

פתרון ב

Queueing Theory39 M/M/1 Example I Traffic to a message switching center for one of the outgoing communication lines arrive in a random pattern at an average rate of 240 messages per minute. The line has a transmission rate of 800 characters per second. The message length distribution (including control characters) is approximately exponential with an average length of 176 characters. Calculate the following principal statistical measures of system performance, assuming that a very large number of message buffers are provided:

Queueing Theory40 M/M/1 Example I (cont.) l (a) Average number of messages in the system l (b) Average number of messages in the queue waiting to be transmitted. l (c) Average time a message spends in the system. l (d) Average time a message waits for transmission l (e) Probability that 10 or more messages are waiting to be transmitted.

Queueing Theory41 M/M/1 Example I (cont.) 1. E[s] = Average Message Length / Line Speed = {176 char/message} / {800 char/sec} = 0.22 sec/message or   = 1 / 0.22 {message / sec} = 4.55 message / sec  = 240 message / min = 4 message / sec   = E[s] = /  = 0.88

Queueing Theory42 M/M/1 Example I (cont.) l (a) N=  / (1 -  ) = 7.33 (messages) l (b) N q =   / (1 -  ) = 6.45 (messages) l (c) W = E[s] / (1 -  ) = 1.83 (sec) l (d) W q =    E[s] / (1 -  ) = 1.61 (sec) l (e) P [11 or more messages in the system] =   = 0.245

Queueing Theory43 M/M/1 Example II A branch office of a large engineering firm has one on-line terminal that is connected to a central computer system during the normal eight-hour working day. Engineers, who work throughout the city, drive to the branch office to use the terminal to make routine calculations. Statistics collected over a period of time indicate that the arrival pattern of people at the branch office to use the terminal has a Poisson (random) distribution, with a mean of 10 people coming to use the terminal each day. The distribution of time spent by an engineer at a terminal is exponential, with a

Queueing Theory44 M/M/1 Example II (cont.) mean of 30 minutes. The branch office receives complains from the staff about the terminal service. It is reported that individuals often wait over an hour to use the terminal and it rarely takes less than an hour and a half in the office to complete a few calculations. The manager is puzzled because the statistics show that the terminal is in use only 5 hours out of 8, on the average. This level of utilization would not seem to justify the acquisition of another terminal. What insight can queueing theory provide?

Queueing Theory45 M/M/1 Example II (cont.) l {10 person / day}  {1 day / 8hr}  {1hr / 60 min} = 10 person / 480 min = 1 person / 48 min ==>  = 1 / 48 (person / min) l 30 minutes : 1 person = 1 (min) : 1/30 (person) ==>  = 1 / 30 (person / min) l  = /  = {1/48} / {1/30} = 30 / 48 = 5 / 8

Queueing Theory46 M/M/1 Example II (cont.) l Arrival Rate = 1 / 48 (customer / min) l Server Utilization  = /  = 5 / 8 = l Probability of 2 or more customers in system P[N  2] =   = l Mean steady-state number in the system L = E[N] =  / (1 -  ) = l S.D. of number of customers in the system  N = sqrt(  ) / (1 -  ) = 2.108

Queueing Theory47 M/M/1 Example II (cont.) l Mean time a customer spends in the system W = E[w] = E[s] / (1 -  ) = 80 (min) l S.D. of time a customer spends in the system  w = E[w] = 80 (min) l Mean steady-state number of customers in queueN q =   / (1 -  ) = 1.04 l Mean steady-state queue length of nonempty QsE[N q | N q > 0] = 1 / (1 -  ) = 2.67 l Mean time in queue W q = E[q] =  E[s] / (1 -  ) = 50 (min)

Queueing Theory48 M/M/1 Example II (cont.) l Mean time in queue for those who must wait E[q | q > 0] = E[w] = 80 (min) l 90th percentile of the time in queue  q (90) = E[w] ln (10  ) = 80 * = (min)

M/M/m, M/M/m/m, M/M/∞ M/M/m (infinite buffer) detailed balance equations in steady state

M/M/m where From

M/M/m The probability that all servers are busy - Erlang C formula expected number of customers waiting in queue

M/M/m average waiting time of a customer in queue average delay per customer average number of customer in the system by Little ’ s theorem

Queueing Theory53 M/M/s Case Example I Find p 0

Queueing Theory54 M/M/s Case Example I (cont.) = (  43% of time, system is empty) as compared to m = 1: P 0 = 0.20

Queueing Theory55 M/M/s Case Example I (cont.) Find W W q = L q / = / (1/10) = 1.52 (min) W = W q + 1 /  = / (1/8) = 9.52 min) What proportion of time is both repairman busy? (long run) P(N  2) = 1 - P 0 - P 1 = = 0.228(Good or Bad?)

M/M/∞ M/M/∞: The infinite server case The detailed balance equations Then

M/M/m/m M/M/m/m : The m server loss system when m servers are busy, next arrival will be lost circuit switched network model

M/M/m/m The blocking probability (Erlang-B formula)

Moment Generating Function

Discrete Random Variables

Continuous Random Variables