Chapter 5 Elementary Stochastic Analysis Prof. Ali Movaghar.

Slides:



Advertisements
Similar presentations
Lecture 10 Queueing Theory. There are a few basic elements common to almost all queueing theory application. Customers arrive, they wait for service in.
Advertisements

Introduction to Queuing Theory
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
Chapter Queueing Notation
Queueing Models and Ergodicity. 2 Purpose Simulation is often used in the analysis of queueing models. A simple but typical queueing model: Queueing models.
Continuous-Time Markov Chains Nur Aini Masruroh. LOGO Introduction  A continuous-time Markov chain is a stochastic process having the Markovian property.
TCOM 501: Networking Theory & Fundamentals
Lecture 13 – Continuous-Time Markov Chains
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Queuing Models Basic Concepts. QUEUING MODELS Queuing is the analysis of waiting lines It can be used to: –Determine the # checkout stands to have open.
1.(10%) Let two independent, exponentially distributed random variables and denote the service time and the inter-arrival time of a system with parameters.
Queueing Theory (2). Home Work 12-9 and Due Day: October 31 (Monday) 2005.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
EMGT 501 Fall 2005 Midterm Exam SOLUTIONS.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
Queueing Theory: Part I
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),
Modeling and Analysis of Manufacturing Systems Session 2 QUEUEING MODELS January 2001.
Queueing Theory.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Queuing Networks: Burke’s Theorem, Kleinrock’s Approximation, and Jackson’s Theorem Wade Trappe.
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.
1 TCOM 501: Networking Theory & Fundamentals Lecture 8 March 19, 2003 Prof. Yannis A. Korilis.
Lecture 14 – Queuing Systems
Queuing Models and Capacity Planning
Lecture 7  Poisson Processes (a reminder)  Some simple facts about Poisson processes  The Birth/Death Processes in General  Differential-Difference.
Introduction to Queuing Theory
Flows and Networks Plan for today (lecture 5): Last time / Questions? Waiting time simple queue Little Sojourn time tandem network Jackson network: mean.
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  …
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
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.
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.
Introduction to Operations Research
Lecture 14 – Queuing Networks Topics Description of Jackson networks Equations for computing internal arrival rates Examples: computation center, job shop.
Queueing Analysis of Production Systems (Factory Physics)
Introduction to Queueing Theory
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.
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.
Waiting Lines and Queuing Models. Queuing Theory  The study of the behavior of waiting lines Importance to business There is a tradeoff between faster.
Modeling and Analysis of Computer Networks
CS433 Modeling and Simulation Lecture 12 Queueing Theory Dr. Anis Koubâa 03 May 2008 Al-Imam Mohammad Ibn Saud University.
yahoo.com SUT-System Level Performance Models yahoo.com SUT-System Level Performance Models8-1 chapter11 Single Queue Systems.
Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche.
State N 2.6 The M/M/1/N Queueing System: The Finite Buffer Case.
CDA6530: Performance Models of Computers and Networks Chapter 3: Review of Practical Stochastic Processes.
QUEUING THEORY.
Chapter 6 Queueing Models
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Chapter 6 Product-Form Queuing Network Models Prof. Ali Movaghar.
1 1 Slide Chapter 12 Waiting Line Models n The Structure of a Waiting Line System n Queuing Systems n Queuing System Input Characteristics n Queuing System.
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.
© 2015 McGraw-Hill Education. All rights reserved. Chapter 17 Queueing Theory.
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.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
Queueing Theory II.
Queueing Theory What is a queue? Examples of queues:
Lecture on Markov Chain
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
IV-2 Manufacturing Systems modeling
TexPoint fonts used in EMF.
Lecture 13 – Queuing Systems
Queueing Theory Frank Y. S. Lin Information Management Dept.
Presentation transcript:

Chapter 5 Elementary Stochastic Analysis Prof. Ali Movaghar

2 Birth and Death Processes q k,k+1 = λ(k) : Arrival (birth) rate in state k q k,k-1 = μ(k) : Departure (death) rate in state k q i,j = 0 : for |i-j|>1 -q kk = [λ(k) + μ(k)] 1 λ(0) 0 μ(1) n λ(n-1) n-1 μ(n) n+1 λ(n) μ(n+1) … … λ(1) μ(2)

3 Birth and Death Processes (Con.) The rate arrival depends on the current system rate  Therefore interarrival times must be exponentially distributed.  Similarly, service-time distribution must also be exponential.  The probability of more than one arrival or service completion in Δt is negligiable.

4 Birth and Death Processes (Con.) The system is classical M/M :  Prob(one arrival in Δt | system is in state k )=λ(k)Δt  Prob(one service in Δt | system is in state k)=μ(k)Δt  Prob(no arrival/services in Δt | system is in state k)= 1- λ(k)Δt - μ(k)Δt

5 Birth and Death Processes (Con.) P(n,t) : Probability of finding n customers in the system at time t. There are three ways for the system to be in state n at time t :  System is in state n-1 at time t and one arrival occurs at Δt  system is in state n+1 at time t and a service completion occurs during Δt  System is in state n at time t and no arrival/service completion occurs during Δt

6 Birth and Death Processes (Con.) P(n, t+Δt) = P(n-1,t)λ(n-1)Δt+ P(n+1,t)μ(n+1)Δt+ P(n,t)[1-λ(n)Δt - μ(n)Δt ] Taking limit Δt  0, we get The above differential difference equations describe the transient behavior of M/M system

7 Birth and Death Processes (Con.) To examine the steady-state solution, the system should be ergodic :  The work should be handled faster than it arrives

8 Birth and Death Processes (Con.) For steady state, we and P(n,t) is shown by P(n)  P(n-1)λ(n-1)+ P(n+1)μ(n+1)=P(n) [λ(n)+ μ(n)]  Under steady state, the effective rate with which the system enters state n should be equal to the effective rate with which it exits state n

9 Birth and Death Processes (Con.) We can derive equation in a more genera form:  For any closed boundary, the effective flow inward must equal the effective flow outward. (Global balance equation)  If the boundary contains states 0 through n-1, we get : P(n-1)λ(n-1)= P(n)μ(n) so

10 Steady-State Analysis of M/M Systems We will derive detailed results for several important M/M systems Knedall’s notation : M/G/c/FCFS/K/N  M : Poisson arrival  G : general service-time distribution  c : identical servers  FCFS : scheduling discipline  Storage capacity : K  N : population

11 Simple M/M/1/SI/  /  Queue Here both λ(n) and μ(n) are independent of state n  Let  =λ/μ, for ergodicity  <1  P(n)=  n P(0),  results P(0)=(1-  )  From two above : P(n)= (1-  )  n  In a simple M/M/1 system, the queue length distribution is geometric with parameter .

12 Simple M/M/1/SI/  /  Queue (Con.) Various performance parameters can now be obtained :  Utilization (U) = 1- P(0) =   Avg. queue length (Q) = E(X) =  nP(n) =  /(  -1)  Avg. response time (R)= little low E(X)/λ=1/μ(1-  )  Avg. number waiting (L) =  (n-1) P(n)=  2 /(1-  )  Avg. waiting time (W) = little low L/λ =  2 /λ(1-  )

13 M/M/c/SI/  /  Queue This is the multiple-server extension of M/M/1 system.  λ(n) = λ  μ(n) = where μ 0 is the basic service rate   =λ/cμ 0 so we get

14 Using, we can compute P(0) M/M/c/SI/  /  Queue (Con.)

15 Simple M/G/  /SI/  /  Queue The arrival rate is state independent  λ(n) = λ  μ(n)=n μ 0   =λ/μ 0. P(0) can be computed by the requirement that all probabilities sum to 1.

16 Simple M/G/  /SI/  /  Queue (Con.) Thus the distribution is Poisson with mean .  The Avg. queue length Q=   Utilization U=   By little ‘s law Avg. Response time R=1/μ 0

17 Simple M/M/c/SI/K/  Queue This is the finite storage case where system hold at most K customers:   μ(n)=min(n,c,K)μ 0  P(n) can be easily abstained as before.  Note that this system has only min(c,K)+1 states.

18 Finite Population Systems Let N denote the total number of customers in the “universe”. the arrival rate λ depends on n and the underlying physical situation. a) Each customer has its own independent arrival rate λ 0. Thus the overall arrival is proportional to the number of customers left in universe: λ(n)=N-n) λ 0 b) The customers are released sequentially. Thus arrival rate is constant

19 Finite Population Systems (Con.) As an example, consider M/M/1/SI/K/N station with arrival model (a).  μ(n)=μ 0  The state probabilities and performance parameters could be obtained as before.  Note that system suffers from blocking if K<N

20 Finite Population Systems (Con.) An isolated station with finite population can be view as a closed network of two stations : 1 2 μ 1 (n) μ 2 (n) 1 μ 1 (n) λ 1 (n)= μ 2 (N-n)

21 Example A telephone exchange is to be set up for a small community of 50 customers, each of whom independently attempts to call at the average rate of one per hour and talks for 12 minutes on the average. The call attempts (including reattempts by customers who get a busy tone) can be adequately described by Poisson process. System has a capacity of K voice channel. Find the minimum value of K such that the probability of service denial is 2% or less.

22 Example (Con.) Solution : The system can be modeled as a M/G/K/SI/K/N, with N=50 ,λ 0 =1/60  μ(n)=μ 0, μ 0 = 1/12   =λ 0 /μ 0 =0.2  So we get

23 Example (Con.) The probability reject call P(K) is given by Setting P(K)  0.02 and solving the equation we get K=14.

24 Response-Time Distribution We briefly discuss how to determine response-time distribution for M/M systems The general approach is to pick a tagged customer and account for all the delays it encounters.

25 Response-Time Distribution (Con.) Suppose M/M/1 system  Let R denote the response time for a tagged customer  Let X denote the number of customers that it finds on its arrival  So the distribution function R is:

26 Response-Time Distribution (Con.) Let R(n) denote response time of the tagged customer given that if finds n customers ahead of iteself.  R(n)= R 1 + S 2 +…+ S n + S n+1 R 1 is the remaining service time of the customer currently receiving service Each S i has exponential distribution with mean 1/μ Distribution of R 1 is the same as S i (memoryless property of exponential distribution) R(n) is sum of n+1 independent, identically distributed random variables

27 Response-Time Distribution (Con.) Let f denote the density function of R:  The response-time distribution is also exponetial  The mean average response time is 1/μ(1-  )

28 Batch Systems and Method of Stages We examine M/M systems with batch arrivals and services  Customers may arrive or get served as a group with a number of K, where K can be a random variable : M k /M or M (x) /M.  Server may have K stages, each has an exponential service time distribution with rate kμ. So the overall service time distribution is Erlang with the rate equal to μ : M/M k  The behavior of M k /M/1 is similar to M/M k /1

29 Analysis of Batch Systems The batch size is a random variable denoted C.  Let Prob(C=k)=c k  Services occur singly, backward transitions occur only to adjacent states and have rate μ  Forward transitions from state n can occur to any n+k, k>0 state with rate c k λ n-1 λc1λc1 n-2 μ n+1n μ n+2 λc1λc1 μ λc1λc1 λc1λc1 μ λc2λc2 λc2λc2

30 Analysis of Batch Systems (Con.) The global balance equation are given by: where for n=0, λP(0)= μP(1) n-1 λc1λc1 n-2 μ n+1n μ n+2 λc1λc1 μ λc1λc1 λc1λc1 μ λc2λc2 λc2λc2

31 Analysis of Batch Systems (Con.) To solve the equation we use Z-transform:  Let  C (z)=  z n c denote the z-transform of the sequence c 1, c 2, …  Let  (z) denote the z-transform of state probabilities.  Multiply both sides of equation by z n and then sum over n, we get :

32 Analysis of Batch Systems (Con.) We use Utilization law to compute P(0)  1-P(0)=U=λ total /μ, where λ total = λ  P(0)=(1-  )  To ensure ergodicity, P(0)>0,  <1/ We assume C has a geometric distribution  c k = (1-a)a k-1 for k= 1.. . 0<a<1   C (z)=z(1-a)/(1-az) and =  C (1)=1/(1-a)

33 Analysis of Batch Systems (Con.) The expression for  (z) simplifies to The average queue length is It can be noted that Q batch =Q expo

34 Staged Service with FCFS Scheduling The k-stage Erlang system is shown below.  At most one customer is allowed to enter the “service box”  State system is pair (n,j) where n gives the total number of customers at station and j=1..k gives the total number of customers at the station 1st stage2nd stagekth stage … kμkμkμkμkμkμ

35 Staged Service with FCFS Scheduling (Con.) The balance equations are as follows:  (λ+μ)P(n,1) = λP(n-1,1)+kμP(n+1,k) for j=1  (λ+μ)P(n,j) = λP(n-1,j)+kμP(n,j-1) for j>1  (λ)P(0) = kμP(1,k) 0 1,1 1,2 1,k λ kμkμ kμkμ kμkμ λ λ 2,1 2,k λ kμkμ λ λ … … … … … n-1,1 n-1,2 n-1,k λ kμkμ λ λ … n,1 n,2 n,k λ kμkμ kμkμ λ λ … n+1,1 n+1,2 n+1,k kμkμ kμkμ kμkμ …

36 Staged Service with FCFS Scheduling (Con.) Let  =λ/(kμ), P(0) can be found by utilization law  U=1-P(0)= λ/μ=k   P(0)=1-k  Let P(n) denote the probability of finding n customers in the system :

37 Staged Service with FCFS Scheduling (Con.) Use two dimensional z-transform of P(n,j): Let  (z) denote the z-transform of P(n): By determining  *(1,z), we can determine  (z):

38 Staged Service with FCFS Scheduling (Con.) Differentiating  (z) and evaluating z=1, we get the average queue length:  Note that the queue length is smaller for a comparable M/M queue and decrease monotonically with k.  Let k  with the utilization U=λ/μ=k , the Avg. queue length is :