1 / 19

IEG5300 Tutorial 6 Queueing Theory

IEG5300 Tutorial 6 Queueing Theory. Peter Chen Peng Adapted from Qiwen Wang’s Tutorial Materials. Outline. Preliminaries M/M/1 queue Network of Queues General open system M/G/1 P-K formula Summary. Valid for all queueing models; λ is the average external arrival rate. Preliminaries.

Télécharger la présentation

IEG5300 Tutorial 6 Queueing Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IEG5300Tutorial 6Queueing Theory Peter Chen Peng Adapted from Qiwen Wang’s Tutorial Materials

  2. Outline • Preliminaries • M/M/1 queue • Network of Queues • General open system • M/G/1 P-K formula • Summary

  3. Valid for all queueing models; λ is the average external arrival rate Preliminaries • A general queueing system always assumes • i.i.d inter-arrival times with mean 1/λ • i.i.d service times with mean 1/μ • Notations: • Offered loadρ=λ/μ(erlangs): Average number of arrivals in a service time. • LQ = average queue length in the system; • L = average number of customers in the system; • WQ=average waiting time for a customer in the queue. • W = average delay for a customer in the system. • Little’s Formula: • L = λW • LQ = λWQ • W = WQ + 1 / μin single server case.

  4. Preliminaries • Other notations: • N(t): number of customer arrivals by time t. • X(t): number of customers in the system by time t. • Pn = long run proportion of time during which the system has n customers. // what an outsider sees. • an = long run proportion of customers who find n in the system when they arrive. // what an arrival sees. • dn = long run proportion of customers who find n in the system when they depart. // what an departure sees. • In any birth-death queueing model (G/G/1): an = dn • Poisson arrival sees time average: an = Pn

  5. M/M/1 Queueing System λn = λ; μn = μ; ρ= λ / μ • States: number of customers in the system. This is a time-reversible Markov process. • By forming the balance equations, we get The condition for the system to converge (i.e. the existence of the stationary states) isρ=λ / μ< 1.

  6. M/M/1 Queueing System λn = λ; μn = μ; ρ = λ / μ • L= ∑∞i=0i Pi = λ / (μ – λ), LQ = ∑∞i=1 (i – 1)Pi = L – (1 – P0) = L – ρ W = L / λ = 1 / (μ – λ) WQ = W – 1/ μ = λ / μ(μ – λ) • In the long run, the number of customers in the system is geometrically (1 – ρ) distributed. The customers’ service times are exponential (μ) i.i.d. So the waiting time of each customer in the system is the sum of memorylessly many (starting at 1)memoryless i.i.d, which turns out to be an exponential ((1 – ρ)μ)r.v.

  7. Example • A group of m customers frequents a single-server station in the following manner. When a customer arrives, he either enters service if the server is empty or joins the queue otherwise. Upon completing service the customer departs the system, but then returns after an exponential(θ) time. The service time is exponential(μ). • Define states and set up the balance equations • In terms of Pi , find the average customer arrival rate and the average time that a customer spends in the stationper visit. • Ans) State: the number of customers in the station.

  8. Example • A group of m customers frequents a single-server station in the following manner. When a customer arrives, he either enters service if the server is empty or joins the queue otherwise. Upon completing service the customer departs the system, but then returns after an exponential(θ) time. The service time is exponential(μ). • Define states and set up the balance equations • In terms of Pi , find the average customer arrival rate and the average time that a customer spends in the stationper visit. • Ans) At state i, there are (m – i ) customers not in the station. So the next arrival is exponential with (m – i )θ. Then, By Little’s law, W = L /λ, where L = ∑<i> i Pi Remark: When a customer arrives he finds i customers in the system. Then his expected spending time in the system is (i+1)/μ. But W = ∑<i> ai (i+1)/μ≠∑<i> Pi (i+1)/μ , because here an≠Pn!

  9. Network of Queues L*1 : number of customers in server 1. L*2: number of customers in server 2. • Suppose we have two M/M/1 queues. • Recall: Burke’s Theorem for M/M/s queues If  < s (guarantees the existence of steady states), the stationary output process of M/M/s is a Poisson process with intensity .

  10. Network of Queues L*1 : number of customers in server 1. L*2: number of customers in server 2. • In steady states, L*1is independent of the future arrival times of 1st server. Since M/M/1 is time-reversible, we can not distinguish the (time) direction of the Process in steady states. Therefore, L*1is independent of the future arrival times of 1st server in the reversed process. However, the future arrival times of the reversed process is exactly the same as the pastdeparture times in the forward process. Consequently,L*1is independent of the past departure times of 1st server. On the other hand,L*2is completely dependent on the departure times of 1stserver.  L*1and L*2are independent.

  11. Network of Queues L*1 : number of customers in server 1. L*2: number of customers in server 2. • In this way, it can be regarded as two independent tandem M/M/1 systems : L = L1 + L2 = W = L /  =

  12. General Open System • K nodes network, each consists of skidentical exponential(μk) server • Each node i has external Poisson arrival rate ri. • After served by node i, a customer joins node j with Pij and departs the system with 1 – ∑<j>Pij • In steady state, because for each node, the average rate in is equal to the average rate out,

  13. General Open System • Jackson’s Theorem: The long run proportion of nkcustomers at each node k is : P{n1, n2, …, nk} = P{n1 }P{n2}…P{nk} where P{nk} is the long run proportion of time having nkcustomers at node k (which is an M/M/sk system). • A tandem of 2 single servers is a special case with r1 = λ, r2 = 0, P01 = 1, P10 = 0, P00 = 0, P11 = 0

  14. Cost Equations • Basic cost identity Average rate at which the system earns = a x average amount an entering customer pays • Each customer pays $1 per unit time in the system E[L*] =a x E[W*] • Each customer pays $1 per unit time in the queue E[L*Q] =a x E[W*Q]

  15. Cost Equations • Each customer pays his remaining service time per unit time in the system. V = aE[what a customer pays] = a {E[what a customer pays in the queue] + E[what a customer pays when he is being served]} // like the Little’s law, this basic queueing // identity is valid in almost all models.

  16. M/G/1 P-K formula • Specific to an M/G/1 system, • Because it’s the single server case, customer’s wait in queue W*Q = rate at which the system earns when the customer arrives • By taking expectation, E[W*Q]= average rate at which the system earns seen by an arrival • Poisson arrival sees time average, (average of system earning rate) E[W*Q]= V = • S is independent of W*Q • The P-K formula for M/G/1 queue:

  17. Quick test

  18. 1 = 8 Poisson(2) external input ½ ½ ½ Poisson(5) external input ½ 2 = 10 Quick test • Find P(m,n) • Find W

  19. Summary • Basic notation: ρ = λ /μ, LQ , L , WQ , W • Little’s Formula L = λW • For M/M/1, • Jackson’s theorem • The long run proportion of nkcustomers at each node k is : P{n1, n2, …, nk} = P{n1 }P{n2}…P{nk} • M/G/1 P-K formula

More Related