CTMCs & N/M/* Queues.

Slides:



Advertisements
Similar presentations
Introduction to Queuing Theory
Advertisements

Flows and Networks Plan for today (lecture 2): Questions? Continuous time Markov chain Birth-death process Example: pure birth process Example: pure death.
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.
Discrete Time Markov Chains
TCOM 501: Networking Theory & Fundamentals
IEG5300 Tutorial 5 Continuous-time Markov Chain Peter Chen Peng Adapted from Qiwen Wang’s Tutorial Materials.
Copyright © 2005 Department of Computer Science CPSC 641 Winter Markov Chains Plan: –Introduce basics of Markov models –Define terminology for Markov.
Continuous Time Markov Chains and Basic Queueing Theory
Lecture 13 – Continuous-Time Markov Chains
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Review.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
TCOM 501: Networking Theory & Fundamentals
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer Performance.
Queueing Theory.
1 Markov Chains H Plan: –Introduce basics of Markov models –Define terminology for Markov chains –Discuss properties of Markov chains –Show examples of.
Flows and Networks Plan for today (lecture 5): Last time / Questions? Waiting time simple queue Little Sojourn time tandem network Jackson network: mean.
Eurecom, Sophia-Antipolis Thrasyvoulos Spyropoulos / Introduction to Continuous-Time Markov Chains and Queueing Theory.
Introduction to Stochastic Models GSLM 54100
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.
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Introduction to Queueing Theory
Network Design and Analysis-----Wang Wenjie Queueing System IV: 1 © Graduate University, Chinese academy of Sciences. Network Design and Analysis Wang.
Networks of Queues Plan for today (lecture 6): Last time / Questions? Product form preserving blocking Interpretation traffic equations Kelly / Whittle.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
Flows and Networks Plan for today (lecture 4): Last time / Questions? Output simple queue Tandem network Jackson network: definition Jackson network: equilibrium.
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.
Modeling and Analysis of Computer Networks
M/M/1 queue λn = λ, (n >=0); μn = μ (n>=1) λ μ λ: arrival rate
1 Networks of queues Networks of queues reversibility, output theorem, tandem networks, partial balance, product-form distribution, blocking, insensitivity,
Markov Chains X(t) is a Markov Process if, for arbitrary times t1 < t2 < < tk < tk+1 If X(t) is discrete-valued If X(t) is continuous-valued i.e.
Chapter 61 Continuous Time Markov Chains Birth and Death Processes,Transition Probability Function, Kolmogorov Equations, Limiting Probabilities, Uniformization.
Model under consideration: Loss system Collection of resources to which calls with holding time  (c) and class c arrive at random instances. An arriving.
Flows and Networks Plan for today (lecture 2): Questions? Birth-death process Example: pure birth process Example: pure death process Simple queue General.
M/M/1 Queues Customers arrive according to a Poisson process with rate. There is only one server. Service time is exponential with rate  j-1 jj+1...
The M/M/ N / N Queue etc COMP5416 Advanced Network Technologies.
CS433 Modeling and Simulation Lecture 07 – Part 01 Continuous Markov Chains Dr. Anis Koubâa 14 Dec 2008 Al-Imam.
Computer Networking Queueing (A Summary from Appendix A) Dr Sandra I. Woolley.
Discrete Time Markov Chains
Chapter 6 Product-Form Queuing Network Models Prof. Ali Movaghar.
CS433 Modeling and Simulation Lecture 11 Continuous Markov Chains Dr. Anis Koubâa 01 May 2009 Al-Imam Mohammad Ibn Saud University.
Flows and Networks Plan for today (lecture 3): Last time / Questions? Output simple queue Tandem network Jackson network: definition Jackson network: equilibrium.
Queueing Fundamentals for Network Design Application ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
Flows and Networks (158052) Richard Boucherie Stochastische Operations Research -- TW wwwhome.math.utwente.nl/~boucherierj/onderwijs/158052/ html.
Queueing Theory II.
Markov Chains.
Discrete Time Markov Chains (A Brief Overview)
Ergodicity, Balance Equations, and Time Reversibility
Networks of queues Networks of queues reversibility, output theorem, tandem networks, partial balance, product-form distribution, blocking, insensitivity,
Flows and Networks Plan for today (lecture 3):
Al-Imam Mohammad Ibn Saud University
Flows and Networks Plan for today (lecture 4):
Queueing Theory What is a queue? Examples of queues:
Lecture on Markov Chain
Finite M/M/1 queue Consider an M/M/1 queue with finite waiting room.
Markov Chains Carey Williamson Department of Computer Science
TexPoint fonts used in EMF.
Queueing Theory II.
Queueing networks.
September 1, 2010 Dr. Itamar Arel College of Engineering
Continuous time Markov Chains
Carey Williamson Department of Computer Science University of Calgary
Queueing Theory Frank Y. S. Lin Information Management Dept.
CS723 - Probability and Stochastic Processes
Presentation transcript:

CTMCs & N/M/* Queues

Continuous Time Markov Chain (CTMC) A CTMC is a continuous-time stochastic process {X(t), t  0} s.t.,  s,t  0 and  i, j, x(u) P{X(t+s) = j | X(s) = i, X(u) = x(u), 0  u  s} = P{X(t+s) = j | X(s) = i} – by Markov property = P{X(t) = j | X(0) = i} = Pij(t)– by stationarity

What Is a CTMC? Some Definitions Def. 1: A CTMC is a stochastic process, such that each time the process enters state i, the following holds The amount of time spent in state i until the next transition is exponentially distributed (with mean νi) When leaving state i, the process enters state j with probability pij, independent of the time spent in state i Def. 2: Let Xj ~ Exp(νipij) represent the time to transition from state i to state j,  j≠i. Let τi = minj{Xj} be the time until the CTMC leaves state i for state m, where m = argminj{Xj} The two definitions are equivalent

Solving CTMCs (From Geometric to Exponential Distributions) E.g., M/M/1 queue: Birth-death CTMC Poisson arrivals (exponential inter-arrival times) P[one arrival in next dt] ≈ dt, P[more than one arrival in next dt] ≈ o(dt) P[zero arrival in next dt] ≈ 1-dt Exponential service times P[one departure in next dt] ≈ dt, P[more than one departure in next dt] ≈ o(dt) P[zero departure in next dt] ≈ 1-dt Transition probability pij from i to j in next dt pij = 0 for j > i+1 or j < i-1 pij = dt(1-dt) = dt, for j = i+1 pij = dt(1- dt) = dt, for j =i-1 As in discrete-time, we can write the balance equations (+)i dt = i+1 dt +  i-1 dt for i  1, or i+1= i where  = / Using ii = 1 gives i= (1-)i, i  0 1 2 λ μ n n+1 S

Solving CTMCs General Balance Equations Given an irreducible CTMC, assume that  i’s s.t.  j, jνj = Σiiqij and Σii = 1 then the i’s are the CTMC’s limiting probabilities and the chain is ergodic Rate of transition out of state j is equal to rate of transition into state j (νj = Σiqji  jΣiqji = Σiiqij) Note: In the M/M/1 example, qii+1=, qii-1=, and νj=+ 

Time Reversibility Similar property as for DTMCs: rate of transitions for state i to state j is the same as the rate of transition from state j to state i πi qij = πj qji Holds by default for birth-death chains Check if it holds for other chains

Exploring The M/M/1 Queue Average number of customers Average time T in the system (Little’s law) Average waiting time (time in system – service time) Alternatively Probability of more than k customers

Comparing Server Configurations λ 1 2 K μ Kλ μ Kμ Kλ Total arrival rate of K, total service capacity of K Three configurations K independent servers, with their own queue, and each allocated capacity , and handling one kth of the arrivals () One server of capacity K handling all arrivals (K) with a single queue K servers, each of capacity, but with a shared queue handling all arrivals (K) For Poisson arrivals and exponential service times, average number in the system is the same for 1) and 2), i.e., /(1 – ), and slightly larger for 3), i.e., /(1 – )PQ + k , where  = / Average response times can, however, vary significantly, i.e., 2) is the best, followed by 3) and then 1) T1 = 1/k( - ), T3 = 1/( - ) – k times bigger (!), and T2= T1  PQ + 1/ 

Finite Waiting Room System: M/M/1/K (All practical systems have limited storage space) Same state transitions as M/M/1 up to state K Only difference is in the normalization constant 1 2 λ μ K-1 K

M/M/1/K – Blocking Probability Arriving customers are blocked when they arrive to a full system (K customers) System is full with probability K Customers arrive according to a Poisson process, so they see a full system (are blocked) with probability K (remember PASTA)

Reconciling Apparent Differences Recall our earlier application of Little’s law to packet transmissions over link Arrival rate =, average transmission time =1/, load  =/ Applying Little’s law gave  = 1x(1- 0)+0x 0= (1- 0)  0 = 1- But from previous slide However, arrival to server is not , and instead ’=(1-K) So that

Multiple Servers The M/M/c/∞ Queue State transitions are again a Markov chain Transition rate of  from state i to state i+1 Transition rate of (i+1) from state i+1 to state i for 0  i  c-1, and c for i  c (all servers busy) Recall that the minimum of 2 exponential r.v.’s with parameter 1 and 2 is exponential with parameter 1+2 1 2 λ μ c c+1 2μ cμ

The M/M/c/∞ Queue State probabilities verify Normalization condition gives

The M/M/c/∞ Queue - (2) Probability of queueing (all servers are busy) Erlang C Formula

The M/M/c/∞ Queue - (3) Average number in the queue NQ Average waiting time W= NQ / Average delay T= W+1/ Average number in the system N

Revisiting System Comparisons Consider a 1 Gbps link under three configurations: Single queue feeding single high-speed link Single queue feeding ten 100Mbps links Multiple (ten) queues each feeding a 100Mbps link Assuming that packets arrive at a rate of 10 and that the service rate of the 1Gbps link is 10, what is the probability that the system is empty under each configuration? Configuration 1 is an M/M/1/ queue, so the answer is π0 = 1-, where  = 10/10 = / Configuration 2 is an M/M/10/ queue, so the answer is Configuration 3 has 10 independent M/M/1/ queues that are each empty with probability 1-, so that they are all empty with probability π0 = (1-)10

Illustrating Our Three Configurations  π0

The M/M/c/c System (No Queue) (“Easily” Generalizable to M/M/c/c+K) c servers but no waiting room (blocking) Same transition rates as M/M/c queue for i  c, and only difference is again in normalization 1 2 λ μ c 2μ cμ and Erlang B Formula

Properties of Erlang B Formula Carried load (fraction of traffic not lost) a’ = a(1-B(c,a)) Erlang B satisfies the following recurrence Note: Erlang B also holds for general (non-exponential) service time distributions so that Trunking efficiency (bigger systems are more efficient!)

The M/M/ Queue Poisson arrival, exponential service times, infinite number of servers No queue as servers are always available Simple extension of the M/M/c queue 1 2 λ μ c c+1 2μ cμ (c+1)μ (c+2)μ A Poisson Distribution!