Basc Queueng Theory M/M/* Queues These sldes are created by Dr. Yh Huang of George Mason Unversty. Students regstered n Dr. Huang's courses at GMU can ake a sngle achne-readable copy and prnt a sngle copy of each slde for ther own reference, so long as each slde contans the copyrght stateent, and GMU facltes are not used to produce paper copes. ersson for any other use, ether n achnereadable or prnted for, ust be obtaned fro the author n wrtng. CS 756 Introducton Queueng theory provdes a atheatcal bass for understandng and predctng the behavor of councaton networks. Basc Model Arrvals Queue Server Departures CS 756
Major paraeters: nterarrval-te dstrbuton servce-te dstrbuton nuber of servers queueng dscplne how custoers are taken fro the queue, for exaple, FCFS nuber of buffers, whch custoers use to wat for servce A coon notaton: A/B/, where s the nuber of servers and A and B are chosen fro M: Markov exponental dstrbuton D: Deternstc G: General arbtrary dstrbuton CS 756 3 M/M/ Queueng Systes Interarrval tes are exponentally dstrbuted, wth average arrval rate. Servce tes are exponentally dstrbuted, wth average servce rate. There s only one server. The buffer s assued to be nfnte. The queung dscplne s frst-coe-frstserve FCFS. CS 756 4
Syste State Due to the eoryless property of the exponental dstrbuton, the entre state of the syste, as far as the concern of probablstc analyss, can be suarzed by the nuber of custoers n the syste,. the past/hstory how we get here does not atter When a custoer arrves or departs, the syste oves to an adjacent state ether + or -. CS 756 5 State Transton Dagra 3 4 5 In equlbru, Let { syste n state } We have + + The rate of oveents n both drectons should be equal CS 756 6 3
4 CS 756 7 Equatons fro the state transton dagra: Solve What s? 3 k k CS 756 8 Snce we have That s,. Note that ust be less than, or else the syste s unstable. k k k k. k k
5 CS 756 9 Average Nuber of Custoers? k k k k k k N CS 756 Average delay per custoer te n queue plus servce te: Average watng te n queue: Average nuber of custoers n queue: N T W W N Q
Applcatons Consder 4 coputer users, each of whch produces n average 48 packets per second. For every custoer, the nterarrval tes of hs packets are exponentally dstrbuted. The lengths of packets are also exponentally dstrbuted, wth ean 5 bytes. CS 756 Scenaro Users share a T lne usng the standard T te-dvson ultplexng. Assue that each user s assocated wth an nfnte buffer that s, queue. In a T lne, t takes /8 seconds to delver or serve each byte. However, due to ther varable lengths, the delvery or servce tes of packets are stll exponentally dstrbuted. The average servce rate? CS 756 6
The syste can be consdered as 4 M/M/ queues: acket Arrvals Queue Server, /4th of the T lne Departs to the other end of the T lne We have 48 75% 64.75 N 3.75 T 64 48 4 4sec CS 756 3 Scenaro Users share a.544 Mbps lne through an I router. ackets fro 4 users The entre T as the server CS 756 4 7
The aggregated arrval rate s 4 48 5. The servce rate s 4 64 536. We have 48/ 64 75% T 536 5 384.4 sec Ths syste s 4 tes faster than TDM! CS 756 5 Dscusson Flaws n the analyss? Stll such a drastc dfference n results convncngly reveals the neffcency of TDM. Ths partly explans the oentu toward usng the Internet as the unversal nforaton nfrastructure. In general, allowng custoers to share a pool of resources s far ore effcent than allocatng a fxed porton to each custoers. CS 756 6 8
M/M/ Queueng Systes Arrvals Queue Departs Servers All servers are dentcal, wth servce rate CS 756 7 State Transton Dagra 3 + Balance equatons:,, for for > CS 756 8 9
CS 756 9 Soluton Where Notcng that we have > p for,! for,!., [ ]!! + CS 756 The probablty that an arrvng custoer has to wat n queue: Ths s known as the Erlang C forula.!!! Q
CS 756 Average nuber of watng custoers: + +!!! N Q Q CS 756 Average watng te n queue: Average te n the syste: Average nuber of custoers n the syste: N W Q Q + + + W T Q Q + + T N Q Q
M/M//K Queueng Systes Slar to M/M/, except that the queue has a fnte capacty of K slots. That s, there can be at ost K custoers n the syste. If a custoer arrves when the queue s full, he/she s dscarded leaves the syste and wll not return. CS 756 3 Analyss Notce ts slarty to M/M/, except that there are no states greater than K. We have Notcng that K- K, for K, for > K K + K we have CS 756 4
osson rocess Let rando varable N be a counter of the nuber of occurrences of a partcular type of events. Clearly, the value of N ncreases over te. Let N t be the value of N at te t. Moreover, f N, Nt s sad to be a countng process. The countng process Nt s sad to be a osson process havng rate f the nuber of events n any nterval of length t s osson dstrbuted wth ean t. That s, for all s, t t t { N t + s N s n} e, n,,... n! CS 756 5 n Dscusson The nterarrval tes of a osson process wth rate s exponentally dstrbuted wth average The reverse s also true: f the nterarrval tes of events are exponentally dstrbuted wth average then the event countng process s osson wth rate. Thus, the custoer arrval processes of M/M/* queueng systes are osson. / A osson custoer count and exponentally dstrbuted custoer nterarrval tes are the two sdes of the con. / CS 756 6 3
Saplng osson Arrvals Consder a osson custoer arrval process of wth average rate. Each custoer can be classfed as Type I or Type II, wth probablty p and -p respectvely. Then, the arrval process of Type I custoers s also osson wth average rate p. Lkewse, the arrvals of Type II custoers s osson wth average rate p. CS 756 7 Applcaton We know that the custoer arrvals at a barbershop for osson process wth average rate of custoers per hour. Aong the custoers, 4% are ales and 6% are feales. Then the nterarrval tes of ale custoers are exponentally dstrbuted wth an average rate of 4 per hour. The nterarrval tes of feale custoers are exponentally dstrbuted wth an average rate of 6 per hour. CS 756 8 4
Exercse Consder the router confguraton below. ackets er sec. ort 4% ort Mbps 6% ort Mbps The lengths of arrvng packets are exponentally dstrbuted wth an average of bts. CS 756 9 Questons Argue that queues A and B are ndependent M/M/ systes. Copute the average length of queue A n bts. For a packet destned for port, copute ts expected te at the router ncludng transsson te. CS 756 3 5
Copute the average te a packet spent at the router ncludng transsson te. Copute the average nuber of packets at the routerncludng the ones n transsson. CS 756 3 Mergng osson Arrvals Gven two exponental varables X and X wth rates and, the rando varable X n{ X, X } s also exponental, wth rate +. Consder two osson arrvals, wth average rates and. The erged arrval process wll also be a osson process, wth the average rate + CS 756 3 6
Applcaton Consder the router confguraton below. acket arrval ort ort acket arrval ort Router CS 756 33 The lengths of arrvng packets are exponentally dstrbuted wth an average of bts. Why do we care about packet lengths? acket arrvals at ports and are exponentally dstrbuted wth average rates of and 3 packets per second, respectvely. The transsson rate of port s Mbps. The whole syste can be odeled as a sngle M/M/ queueng syste, wth an arrval rate of 5 and servce rate of,. CS 756 34 7
Burke's Theore In ts steady state, an M/M/ queueng syste wth arrval rate and per-server servce rate produces exponentally dstrbuted nter-departure tes wth average rate. Applcaton: Two cascaded, ndependently operatng M/M/ systes can be analyzed separately. Departs Server Server M/M/ syste M/M/ syste CS 756 35 tfall Consder the syste below where the servers are transsson lnes. 5 ackets er sec. Mbps Mbps ackets lengths are exponentally dstrbuted wth an average of bts. Can the two queues be analyzed separately? Why? CS 756 36 8
Dscusson In general: any feedforward network of ndependently-operatng M/M/ systes can be analyzed n ths syste-by-syste decoposton. p 4 - p 3 CS 756 37 Queston: How about networks that do contan feedbacks? Answer: the nterarrval tes of soe systes ay not be exponentally dstrbuted and thus cannot be analyzed as ndependent M/M/ queues CS 756 38 9
Jackson's Theore For an arbtrary network of k M/M/ queueng systes, where n, n,..., nk n n... k nk j n j n j j j., That s, n ters of the nuber of custoers n each syste, ndvdual systes act as f they are ndependent M/M/ queues they ay not. CS 756 39 Applcaton Consder the network below. The arrval rate and probabltes p and p are known. p CU I / O p We frst copute the arrval rates and : + p, / p, p / p CS 756 4
Let / and /. By Jackson's theore, j, j And N, N Total nuber of custoers n syste s N N + N. Average te n syste s T N +. CS 756 4 Dscusson Consder the packet swtchng network below. Router ackets Router Router 4 Router 3 Can we cte the Jackson's theore, odel the transsson lnes as servers, and analyze the as separate M/M/ queues? Why? CS 756 4