B. Maddah ENMG 622 ENMG 5 3/27/7 Queueig Theory () What is a queueig system? A queueig system cosists of servers (resources) that provide service to customers (etities). A Customer requestig service will start service if the required server is ot busy. Otherwise, the customer waits i queue util the server is available. Queueig (waitig i lie) happes because there are ot eough resources at certai times. µ 2 : c
Compoets of a queueig System A queuig system ca be composed of oe or may service ceters or odes. Customers are routed from oe ode to the other accordig to certai rules. Each ode is characterized by three compoets. (i) The arrival process ; (ii) The service process ; (iii) The queue disciplie. The arrival process is specified through the radom variables A, A 2,, where A i is the iter-arrival time betwee the (i ) st ad the i th customer. A typical modelig assumptio is to assume that A i s are idepedet ad idetically distributed (iid). The, the arrival process is characterized by F A (x) = P{A < x}, the cdf of A. Importat parameters of the arrival process (i additio to F A (.)) are the mea iter-arrival time E[A], ad the arrival rate = /E[A], the arrival rate. The most commoly assumed arrival process is the Poisso process. This assumptio is realistic (i most cases). I additio, it greatly simplifies the aalysis. 2
The service process is specified through the radom variables S, S 2,, where S i is the service time the i th customer. The S i are also typically assumed iid with cdf F S (x). Importat parameters of the arrival process are the mea service time E[S] ad the service rate E[S] = /µ. Service times are also commoly assumed to be expoetial. Aalytical methods that aalyze queues are quite complex without the expoetial assumptio. The queueig or service disciplie refers to the rule utilized to select the ext customer from the queue whe a customer fiishes service. Typical queueig disciplie iclude first-i, first-out (FIFO), last-i, first out (LIFO), processor sharig (PS), service i radom order (SIRO), ad priority (PR). Uder the iid assumptios, a sigle-ode queueig system is geerally deoted by GI/GI/c, where the GI refers to iid arrival ad service processes ad c is the umber of servers. If the iter-arrival ad service times are iid expoetial the the queue is deoted by M/M/c, where the M refers to the Markovia or memoryless property of the expoetial distributio. 3
Performace measures ad geeral relatios Cosider a GI/GI/c queue (to simplify thigs). I the followig we defie steady state measures, which are statistical measures after the system has bee operatioal for a time which is large eough. A importat measure is the traffic itesity, ρ = /(cµ). If ρ, the it ca be show that the queue legth will icrease idefiitely as time passes. I stable systems, ρ <. For a sigle-server system, ρ is the mea server utilizatio. The statioary system size distributio is P = lim P{ L( t) = }, t where L(t) is the umber of customers i the system at time t. The mea umber i the system is L = P =. It ca be show that L ca be estimated differetly as L = lim t Lsds ( ). t t 4
L(s) Time, s L Time, s The mea waitig time i the system is Wi i= W = lim, where W i is the waitig time of customer i i queue plus the time the customer sped i service. Amog the most importat queueig theory results is Little s law L= W. Other measures cocer waitig i queue. The mea umber i the queue is t Lq = lim t Lq( s) ds, t where L q (s) is the umber of customers i queue at time s. L q ca be also writte as L = ( c) P. q = c 5
The mea waitig time i the queue (or the mea delay) is W q = i= lim, W q i where i Wq is the waitig time of customer i i queue plus the time the customer speds i service. Little s law implies that L q = W q. Furthermore, W ad W q are related by W = W q + /µ. Multiplyig by ad applyig Little s law we get L = L q + /µ. Here, /µ ca be see as the mea umber of busy servers. (This ca i fact be also prove by Little s law.) Note that kowig oe of the four performace measures, L, W, L q, ad W q, allows determiig the other three. The M/M/ queue Cosider a sigle-server queue with iid expoetial iterarrival ad service times (hece called M/M/). Let ad µ deote the arrival ad service rates ad ρ = /µ. Assume ρ <. µ 6
The umber of customers i the M/M/ system L(t) is a birth death process with i =, ad µ i =µ, with the followig trasitio probability diagram: µ µ 2 3 µ Recall that ρ = / µ is the traffic itesity. ρ ca be also see as the average server utilizatio, or the fractio of time the server is busy. Applyig the geeral flow balace equatio for a birth-death process, the limitig probabilities are give by P 2 = + = + = + ρ = µµ µµ 2 = µ = ρ ρ ρ ρ. = ρ = + = + = = = ( ), =, 2, 2 P P ρ ρ µµ µµ 2 Note that ρ < oly if ρ < or equivaletly < µ. = This is the stability coditio that should be always satisfies i order for the M/M/ queue to have a fiite cogestio level (measured i L, W, W q, etc). 7
P could be foud i aother way by otig that P = P{server is idle} = P{server is busy} = ρ. The mea umber i the system, L, is ρ L= P = ρ ( ρ) = =. ρ µ = = Other performace measures are determied as follows: L q 2 2 ρ = L ρ = =, ρ µ ( µ ) L W = =,(Little's law) µ W q Lq = =,(Little's law) µ ( µ ) Aother measure of performace is the probability that the umber of customers i the system is or more P = lim P{ L() t } = P = ρ ( ρ)= ρ. + t k= k= Example Customers arrive at a bak accordig to a Poisso process with rate 9 customers per hour ad request service of a sigle teller. The teller has a expoetial service time with rate customers per hour. What is the fractio of time the teller is busy? This ca be modeled as a M/M/ with = 9 customers/hour ad µ = customers/hour. 8
The traffic itesity is ρ = 9/ =.9, which is also the fractio of time the server is busy. What is the mea umber of customers i the bak? L = ρ / ( ρ) =.9/. = 9 customers. What is the mea umber of customers waitig i lie? L q = L ρ = 9.9 = 8. customers. What is the mea time a customer speds i the bak? W = L / = 9 / 9 = hour. What is the mea delay i queue? W q = L q / = 8. / 9 =.9 hour = 54 mis. For what fractio of time the umber of customers i the system exceeds 3? P 4+ = ρ 4 =.9 4 =.656. What do you thik of this system performace? Not good. Mea delay time is too log. How would you improve the performace? Add oe or more servers, or trai the teller (if possible) so she hadles customers fasters (i.e. icrease µ). What other measures of performace would you estimate? P{waitig time > t } < α, where α is small. 9
Beware of the oliear behavior of queues! 5 4 L( ρ) 3 2..2.3.4.5.6.7.8.9 ρ For example, if ρ is icreased from.9 to.945 (by 5%) i the bak example, L icreases from 9 to 7.8 (by about %).