Eulbrum nalyss of the M/G/ Queue Copyrght, Sanay K. ose. Mean nalyss usng Resdual Lfe rguments Secton 3.. nalyss usng an Imbedded Marov Chan pproach Secton 3. 3. Method of Supplementary Varables done later! http://home.t.ac.n/~sb/boo/mg_supvar.pdf Method of Stages or other eact/appromate analytcal methods may also be used Copyrght, Sanay K. ose
Why s the M/M/ ueue so easy to analye whle the analyss of the M/G/ ueue s substantally more dffcult? State descrpton for M/M/ s smple as one needs ust one number.e. the number n the system to denote the system state. Ths s possble because the eponental servce tme dstrbuton s memoryless and servce already provded to the customer currently n servce need not be consdered n the state descrpton. Ths s not true for the M/G/ ueue. Its general state descrpton would reure specfcaton of both the number currently n the system and the amount of servce already provded to the customer currently beng served. Copyrght, Sanay K. ose 3 M/G// Queue: Sngle server, Infnte number of watng postons Servce dscplne assumed to be FCFS unless otherwse specfed. Mean results same regardless of the servce dscplne rrval Process: Posson wth average arrval rate Inter-arrval tmes eponentally dstrbuted wth mean / Servce Tmes: Generally dstrbuted wth pdf bt, cdf t and L.T.[bt]L s Copyrght, Sanay K. ose 4
Resdual Lfe pproach for nalyng the M/G/ Queue Secton 3. rrvals M/G/ E{}/µ Departures Note that ths approach can only gve the mean results for the performance parameters - state dstrbutons cannot be found We wll tactly assume a FCFS ueue. However, snce only the mean results are beng obtaned, these wll be the same for ueues wth other servce dscplnes, such as LCFS, SIRO etc.. Copyrght, Sanay K. ose 5 Consder a partcular arrval of nterest enterng the M/G/ ueue Let r random resdual servce tme of the customer f any currently n servce RE{r} Then where Mean Resdual Servce Tme W N E{ } R W E{ } R W R ρ ρ E { } µ We stll need to fnd R to fnd W. However, once W s nown, the results N, N and W may be found drectly from that. Copyrght, Sanay K. ose 6 3
rτ R may be found as the tme average of rτ usng a graphcal approach, as shown 4 3 4 Resdual Servce Tme rτ as a Functon of τ For t, M t t M t M t τ R W ρ R lm Rt t R where t t t M t r τ dτ t M t t M t M t Pollace-Khnchne or P-K Formula 3. 3. Copyrght, Sanay K. ose 7 W ρ W W E{ } ρ For the M/M/ ueue E{}/µ, E{ }/µ N W ρ N W ρ ρ Substtutng these lead to the same results as obtaned drectly for the M/M/ ueue earler Copyrght, Sanay K. ose 8 4
P{server s busy}ρe{} P{server not busy}-ρ See page 59 for ustfcaton R -ρe{r system found empty on arrval} ρe{r system found not empty on arrval} R σ E{r system found not empty on arrval} ρ Note that the counter-ntutve nature of the above result,.e. that t s σ rather than llustrates the Parado of Resdual Lfe rrval to a non-empty ueue samples an ongong servce tme but would tend to select longer servce tmes more than shorter ones. Copyrght, Sanay K. ose 9 Some Resdual Lfe Results E τ { τ } τ } E{ τ σ Y where s a lfetme and Y s then referred to as the resdual lfetme System eamned at arbtrary tme nstant t t - t Y t t rrvals comng at tme nstants t,,... Tme f f ˆ where ˆ s the pdf of the selected lfetme For the dstrbuton of Y, we have the followng results fy y dy P{ y Y y dy} [ F y] dy y LY s L. T. f L s y dy s 3.7 3.8 Copyrght, Sanay K. ose 5
The Imbedded Marov Chan pproach M/G/ Queue Secton 3. Choose mbedded tme nstants t,, 3... as the nstants ust after the departure of obs from the system after completng servce t these tme nstants, we can descrbe the system state by the number n the system,.e. n Number left behnd n the ueue by the th departure We can easly see shown subseuently that the seuence n forms a Marov Chan, whch can be solved to obtan the eulbrum state dstrbuton at these specally chosen tme nstants the departure nstants Copyrght, Sanay K. ose Useful Results pplcable to the M/G/ Queue Klenroc's Result: For systems where the system state can change at most by or -, the system dstrbuton as seen by an arrvng customer wll be the same as that seen by a departng customer State Dstrbuton at the rrval Instants wll be the same as the State Dstrbuton at the Departure Instants PST: Posson rrval See Tme verages State Dstrbutons and Moments seen by an arrvng customer wll be the same as those observed at an arbtrarly chosen tme nstant under eulbrum condtons Copyrght, Sanay K. ose 6
th departure leaves non-empty system n > th departure n n -a th servce tme a arrvals n th servce tme Departure Leaves System Non-empty n n - a n,,. Copyrght, Sanay K. ose 3 th departure leaves empty system n th departure n a th servce tme Frst rrval to the system after t becomes empty a arrvals n th servce tme Departure Leaves System Empty n a n,,. Copyrght, Sanay K. ose 4 7
n a for n 3. n a for n,,3... or n n U n a for n,,,3,... 3. Copyrght, Sanay K. ose 5 Tang epectatons of LHS and RHS of 3. or 3. E{Un }E{a } Snce E{ U n } p E{ a ρ } t b t dt Therefore p -ρ P{System Empty} Copyrght, Sanay K. ose 6 8
9 Copyrght, Sanay K. ose 7 } { } { } { } { n n n P E P n P E P } { } { a n U n E E P Solve for Transent Soluton For Eulbrum State Dstrbuton. Drop subscrpt snce eulbrum condtons are consdered. Use L - 3.3 3. Use the followng results - L L L L ρ P Generatng Functon for the Number n the System Copyrght, Sanay K. ose 8 { } } { p P p p p p p n P E P U n U n L L P ρ ρ P-K Transform Euaton 3.4
Under eulbrum condtons, P was derved at the customer departure nstants. However - It wll hold at the customer arrval nstants Klenroc s Result It wll also hold for the tme averages or at an arbtrary tme nstant under eulbrum condtons Epressng P α Taylor Seres Epanson We can obtan α P{ customers n the system} under eulbrum condtons Copyrght, Sanay K. ose 9 Moments of the system parameters e.g. number n the system, may be computed drectly from P For ths, use ρ P lm P lm ρ[ ] ρ ρ Ths result,.e. P must be unty could have been used to obtan p drectly, nstead of obtanng t as done earler Smlarly N P ρ ρ Mean number n system Knowng N, the other parameters N,W, and W may be calculated as before Copyrght, Sanay K. ose
W ρ N ρ ρ W W ρ N ρ Copyrght, Sanay K. ose Delay Dstrbuton n a FCFS M/G/ Queue T Q Total tme spent n system r.v. by an arrval Total watng tme r.v. before servce begns for an arrval T Q Q st T L s E{ e } L s L s Q L s s nown f the dstrbuton of the servce tme s gven Copyrght, Sanay K. ose
Consder a partcular ob arrval and ts departure say the n th one n a FCFS M/G/ ueue The number of customers that the n th user wll see left behnd n the ueue when t departs wll be the number of arrvals that occurred whle t was n the system. n th arrval Q n T n Servce starts for the n th arrval Servce ends for the n th arrval n Tme Therefore L T P Copyrght, Sanay K. ose 3 Substtutng s - s ρ L s LT s 3.5 s L s Substtutng T Q, Q and s L s E{ e } LT LQ s L s s ρ s s L s 3.6 L T s and L Q s are the L.T.s of the pdfs of the total delay and the ueueng delay as seen by an arrval n a FCFS M/G/ ueue. n alternate approach for dervng L T s and L Q s may be found n Secton 3.7 Copyrght, Sanay K. ose 4
usy Perod nalyss of a M/G/ Queue Secton 3.4 Ut durng Idle Perod Ut Idle Perod Cycle usy Perod Tme Ut> durng usy Perod Cycle conssts of the combnaton of successve Idle and usy perods Unfnshed Wor Ut n a M/G/ Queue Copyrght, Sanay K. ose 5 Idle Perod Eponentally dstrbuted wth mean / f IP µ t t µ e t L IP s s Ths wll have the same dstrbuton as an nter-arrval tme Copyrght, Sanay K. ose 6 3
usy Perod Consder a busy perod that starts wth the arrval of customer. Let be the servce tme for. Let there be n* arrvals,..., n* that arrve durng the servce tme, n the seuence,..., n*. Note that the busy perod P wll consst of the sum of and n* sub-busy perods. Each of the sub-busy perods are..d. random varables wth the same dstrbuton as that of the busy perod P to be found P P... Pn* P P P, Copyrght, Sanay K. ose 7 s P s { e, n* } e E [ L s] E{ e L L P P s P s E{ e s } e e e e s P s LP s P! s LP s } e e e s L [ s LP s [ L P s] b d s L s 3.9 P Solve 3.9 to obtan L P s The moments of P may be obtaned drectly from 3.9 usng the moment generatng propertes of the L.T. L P s. See Secton 3.4 for the mean and some hgher moments of P. Copyrght, Sanay K. ose 8 4
Delay Dstrbuton n a LCFS M/G/ Queue End of Resdual Servce Tme Customer 's servce starts Customer departs D D Customer arrves to a non-empty ueue Q Queung Delay for Customer Servce tme for Customer arrval/departure nstants and delays n a LCFS M/G/ Queue Copyrght, Sanay K. ose 9 Queueng Delay Q D D watng tme n ueue before servce D Resdual servce tme of ob durng whose servce arrves D f arrves to an empty ueue probablty -ρ t f D t L D L s s s 3. 3. D wll consst of sub busy perods, one assocated wth each of the customer arrvals n D Note that D and D are not ndependent of each other Copyrght, Sanay K. ose 3 5
L s E Q sq sq { e } ρ ρe{ e arrval to non empty ueue} ρ ρe { ep s D D arrval to non empty ueue} For the case where the arrval comes to a non-empty ueue sd n { e D y, N n} [ LP s sq sy n { e D y, N n} e [ L s E ] E ] E whch leads to P sd { e D y} n y y e [ L n s] ep[ y{ L s}] n n! P P E sq { e D y} ep[ y{ s L s}] P Copyrght, Sanay K. ose 3 For the case where the arrval comes to a non-empty ueue E sd sd { e } E{ e D y} f y y L [ ep[ y{ L s} ] D L s P Usng 3., we then get D P y dy f D y dy E sd { e } L LP s L s P 3. Copyrght, Sanay K. ose 3 6
Smlarly For the case where the arrval comes to a non-empty ueue E sq sq { e } E{ e D y} f E y sq { e } y L [ ep[ y{ s L s} ] D D s L s Usng 3., we then get P LP s s L y dy s P L s LP s s L s P P f D y dy 3.3 Copyrght, Sanay K. ose 33 Therefore, consderng both the cases where Customer fnds the ueue empty and non-empty - LP s LQ s ρ ρ 3.4 s L s and P LT s LQ s L s 3.5 L T s and L Q s are the L.T.s of the pdfs of the total delay and the ueueng delay as seen by an arrval n a LCFS M/G/ ueue. The results obtaned for the M/G/ ueue may be used to obtan the delay dstrbutons for the M/D/ ueue as well. Ths s gven n Secton 3.6. Copyrght, Sanay K. ose 34 7
n Elapsed Tme pproach for the M/G/ Queue llows us to show that the state dstrbuton at the customer departure nstants wll be the same as the eulbrum state dstrbuton wthout usng ether Klenroc s Prncple or PST Copyrght, Sanay K. ose 35 rτ 3 4 Imbedded Ponts at the Job Departure Instants of the M/G/ Queue 4 τ For,,.. P{ obs left n system as seen by a departng ob} p P{ obs n system as seen at an arbtrarly tme nstant between successve mbedded ponts} Note that - p,,,.. s the eulbrum state dstrbuton of the system We want to prove that p,,.. wthout usng ether Klenroc s Prncple or PST Copyrght, Sanay K. ose 36 8
9 Copyrght, Sanay K. ose 37 rrval Process: Posson wth rate Servce Tme: pdf bt, cdf t, L.T. L slt[bt] Mean µ } { E α P{ arrvals n a servce tme},...,! d b e wth generatng functon L α We now focus on the Marov Chan at only the mbedded ponts correspondng to departures from the system Copyrght, Sanay K. ose 38 For ths mbedded chan, we had obtaned the generatng functon earler as P n E. 3.4. We wrte ths agan as Q Q ρ ρ y epandng ths, we can get ρ [ ],..., α α α α α
lternatvely, we may note that ths mbedded Marov Chan has the followng state transton probabltes - α α,,..., Its eulbrum state probabltes { } may be obtaned by solvng,,..., along wth the normalaton condton Ths soluton method, whch s used to drectly obtan Q, has been gven n more detal n the notes. Copyrght, Sanay K. ose 39 D Mean tme nterval between successve embedded ponts D Usng ths, p of the eulbrum state dstrbuton may also be obtaned as the fracton of tme the system stays dle, n the tme nterval between successve mbedded ponts p ρ ρ Same as obtaned from earler analyss Copyrght, Sanay K. ose 4
The other eulbrum state probabltes p, are obtaned as the probablty of the event of eamnng the system at an arbtrary tme nstant and fndng obs n the system, where. Snce s not beng consdered, ths arbtrarly chosen tme nstant wll not be one where the system s empty. So f the system became empty at the last mbedded pont, the tme nstant chosen wll have to fall after the arrval of the frst customer comng subseuent to the mbedded pont where the system became empty. Case a Tme nstant falls n a servce tme followng an mbedded pont where the system became empty. Case b Tme nstant falls n a servce tme followng an mbedded pont where the system was not empty Copyrght, Sanay K. ose 4 The probablty of occurrence of Case a wll be The probablty of occurrence of Case b wll be when the system state at the earler mbedded pont seen left behnd by the departng customer s for,,.., Copyrght, Sanay K. ose 4
Copyrght, Sanay K. ose 43 For both Cases a & b, the pdf of the elapsed servce tme for the ob currently n servce when the system s eamned wll be gve by usng resdual lfe arguments. ] [ Therefore,...,!! d e d e p Case a Case b Copyrght, Sanay K. ose 44 Let P{ or more ob arrvals n a servce tme},,,..,,..., α,..., α & From defnton of
3 Copyrght, Sanay K. ose 45 We can also show that ρ ] [!! d e d b e α for,,..., Copyrght, Sanay K. ose 46 pplyng these to the epresson for p gven earler, we get p p ρ for,,...,
Usng for,,..., we then get the desred result p for,,..., Copyrght, Sanay K. ose 47 4