Lecure M/G/ queues M/G/-queue Posson arrval process Arbrary servce me dsrbuon Sngle server To deermne he sae of he sysem a me, we mus now The number of cusomers n he sysems N() Tme ha he cusomer currenly beng served has already been served (Marov propery does no apply) () R() The M/G/ queue can be modeled wh Imbedded Marov chan by samplng a me nsances when he cusomers depar from he sysem S-7.335 Newor Access
M/G/-queue Defne W Wang (queung) me of cusomer R N Resdual servce me when cusomer arrves Servce me of cusomer Number of cusomers n he sysem upon arrval of cusomer. Resdual Servce me 3 + W = R + j= N usomer arrves R W S-7.335 Newor Access 3 M/G/-queue Le us consder mean over he cusomers =,,..., EW { } = ER { } + E j = N W = lm E{ W} = lm E{ R} + lm E j= N Assume ha he servce mes are muually ndependen wh he frs wo momens gven by = E{ } =, = E{ } μ S-7.335 Newor Access 4
Aggregae servce me Lle's heorem M/G/-queue = N { } = j= N j= N E E E N N lm N N Q = Expeced number of users n he queue NQ = λw S-7.335 Newor Access 5 M/G/-queue Resdual servce me a me r () = ( τ), τ τ + Mean resdual me M() r () = rd () M() ( M() ) = + + τ + = M() denoes he number of cusomers served durng he me nerval (,) R = lm r ( ) = lm rd ( ) M() M ( ) = = lm = lm = M( ) λ = λ M() In seady sae he number of arrvng cusomers mus be S-7.335 Newor Access equal o he number of deparng cusomers 6 τ τ + 3
λ W =, ρ = λ ρ M/G/-queue Expeced wang (queung) me EW { } = E{ R} + E j = N W = lm E{ W} = λ + λ W Pollacze-Khnchn Pace delay = wang me + servce me λ T = W + = +, ρ = λ ρ S-7.335 Newor Access 7 Imbedded Marov han Defne τ = τ τ q v ( ) = N usomer Arrval me of cusomer Inerarrval me beween cusomers - and. Servce me of cusomer Number of users lef behnd by deparure of cusomer Number of cusomers arrvng durng he servce of cusomer Imbedded Marov chan: The sysem s sampled on hose me nsans when cusomers depar from. The sae of he sysem on hose me nsances depend only on he number of cusomers n he sysem. S-7.335 Newor Access 8 4
Imbedded Marov han M/G/ Number of users lef behnd a deparure Number of depared cusomers q = q = v = v Number of arrved cusomers = τ τ 3 τ τ 3 3 S-7.335 Newor Access 9 Transon probables Transon probably { + } p = Pr q = n q = m mn Snce ransons are observed only a deparures, s clear ha q q + Transons are possble from sae o any sae -, +, +, +3, The ranson s deermned by he number of arrvals durng he servce of he cusomer : v. Le = Pr v = m α m + { } α α S-7.335 Newor Access α m p mn α m- m m+ m+ n 5
Transon probables Le b(x) denoe he probably densy funcon of he servce me (assumed o be equal for all ) The arrval process s Posson ( λ + ) λ + Pr { v+ = + } = e! Probably ha here s arrvals durng he servce me of cusomer + s hen ( λx) λx α = Pr { v+ = } = e b( x) dx! n< m Probably ransons are ndependen of α n= m pmn = α n= m α m n + n> m S-7.335 Newor Access Mean queue lengh ase : q = Deparure of cusomer leaves non-empy sysem q = + + q + lef behnd Server + Tme Queue q = v + + + v +l arrve S-7.335 Newor Access 6
Mean queue lengh ase : q > Deparure of cusomer leaves non-empy sysem q lef behnd + + q + lef behnd Server + Tme Queue + + v +l arrve q = q + v + + S-7.335 Newor Access 3 Mean queue lengh Hence, he number of cusomers lef behnd by cusomer + s q + v+ q > q+ = v+ q = Ths can be wren as q = q Δ + v + q + where =,,3,... Δ = oherwse Dscree sep funcon S-7.335 Newor Access 4 7
Mean queue lengh Generang funcon of he arrval process durng he servce of cusomer + v { } ( ) V + z = E z + haracersc funcon of he number of cusomers lef behnd by cusomer + + + { q+ } { q Δ q + v + } { q Δq } { v+ } { q Δq } Q ( z) = E z = E z = E z E z = V ( z) E z S-7.335 Newor Access 5 Le us frs solve Hence Mean queue lengh q { } = Pr{ } = = Pr{ = } + Pr{ = } q Δ Δ E z q z q z q z = = = Pr{ q = } z + z Pr{ q = } z Pr{ q = } z = { q } z ( Q z { q }) = Pr = + ( ) Pr = ( { } ( { })) Q ( z) = V ( z) Pr q = + z Q( z) Pr q = + + S-7.335 Newor Access 6 8
Seady sae values q = lm v = lm {} E v q v = λ = ρ Mean queue lengh Le us ae he expeced value of { } = { } { Δ } + { } E q E q E E v + q + {} {} { q } {} { q } E{} v E q = E q E Δ + E v E Δ = { Δ q } = Δ Pr{ = } = Pr{ = } = Pr{ = } E q q q = = { } { } Pr q= = E v = ρ q = q Δ + v + q + S-7.335 Newor Access 7 Mean queue lengh Seady sae characersc funcon Qz ( ) = lm Q( z) V( z) = lm V( z) Recall ha Hence, ( { } ( { })) Q ( z) = V ( z) Pr q = + z Q( z) Pr q = + + ( { } ( { })) ( ρ )( z ) Qz ( ) = Vz ( ) Pr q= + z Qz ( ) Pr q= = V( z) z V( z) S-7.335 Newor Access 8 9
Mean queue lengh haracersc funcon of he arrval process Laplace ransform of he servce me dsrbuon Hence ( λx) λ V( z) = Pr { v = } z = e b( x) dx z = =! ( λxz) λx ( λ λ ) z x = e b( x) dx= e b( x) dx! = sx B s e b( x) dx ( ) = ( λ λ ) V( z) = B z x s = λ λz S-7.335 Newor Access 9 Mean queue lengh Fnally, we can express he characersc funcon of queue sze n erms of he characersc funcon of he servce me: ( ρ ) ( z) Qz ( ) = Vz ( ) V( z) z ( ) = ( z) Qz ( ) = B z B z z V z B z ( λ λ ) ( ) ( ) ρ λ λ ( λ λ ) Pollacze-Khnchn ransform equaon Seady sae probables can be obaned usng nverse ransform p = Pr q = = Z Q( z) { } { } S-7.335 Newor Access
Example: M/M/ Servce me dsrbuon s exponenal bx ( ) = μe μx Laplace ransform of he servce me pdf sx μx ( μ+ sx ) B ( s) = e μe dx= μ e dx μ s μ and arrvals = + μ = ( λ λ ) = λ λz + μ V( z) B z S-7.335 Newor Access Example: M/M/ haracersc funcon of queue sze ( ρ) Qz ( ) = Vz ( ) = B z Inverse ransform yelds ( z) ( z) ( ) ( ρ λ λ ) ( λ λ ) V( z) z B z z ( ρ ) μ ( z) ρ Qz ( ) = = λ λz+ μ μ z ρz λ λz + μ { } { } ( ) p = Pr q= = Z Q( z) = ρ ρ S-7.335 Newor Access
Dsrbuon of wang me The oal me spen n he sysem s D = W + onsder FIFO queung polcy. In ha case, all he cusomers ha were n he sysem when cusomer arrved mus be served before s served. Hence, he oal number cusomer leaves behnd mus be he number of cusomers ha arrved durng hs say n he sysem. S-7.335 Newor Access 3 Dsrbuon of wang me Number of arrvals durng Number of arrvals durng S V( z) B λ λz Qz ( ) = D λ λz = ( ) ( ) analogy D Tme W Tme v arrve q arrve S-7.335 Newor Access 4
Dsrbuon of wang me Dsrbuon of wang me ( λ λ ) Qz ( ) = D z ( ) ( ) ( ρ ) λ λ = ( ) = λ λ ( λ λ ) ( z) D z Q z B z B z z Le s = λ λz s z = λ ( ) = ( ) ( ρ ) λ ( ) D s B s s λ+ B s s S-7.335 Newor Access 5 Dsrbuon of wang me Tang he lm S = W + S = W + Probably dsrbuon of sum of wo random varables s a convoluon of he wo probably dsrbuon funcons. Fourer ransform of convoluon negral s produc of wo ransforms. Hence, D ( s) = W ( s) B ( s) I follows ha D ( s) s( ρ ) W ( s) = = B ( s) s λ + λb ( s) ( ρ ) W ( s) = haracersc funcon of B ( s) resdual servce me dsrbuon ρ S-7.335 Newor Access s 6 3
Resdual lfe Resdual lfe ( s) B R () s = s F ( r) FR () r = Laplace ransform of he resdual lfe dsrbuon df of he resdual lfe dsrbuon { } E R { } E R = = 3 3 R S-7.335 Newor Access 7 Example:M/M/ haracersc funcon of number of cusomers sx μx ( μ+ sx ) B s = e μe dx= μ e dx W ( ) μ s μ ( s) ( ) ( ) Probably dsrbuon funcon ( ) ( ) s ρ λ ρ = = ( ρ ) + s λ + λb ω s+ μ ρ s fw ( x) W ( s) e ds = Inverse Laplace ransform ( ) ( ) ( ) ( ) ( μ ρ x ) f x = ρ δ x + λe, x W S-7.335 Newor Access 8 4
Example:M/M/ umulave probably dsrbuon funcon y μ( ρ) x W ( ) = Pr{ } = ( ρ) ( δ ( ) + λ ) F y W y x e dy μ( ρ) y = ρe, y λ=, μ=.9 F W (y).8.7.6.5.4.3 ρ ( ) y e μ ρ ρ.. 3 4 5 6 7 8 9 y S-7.335 Newor Access 9 5