Analyss of Dscrete Tme Queues (Secton 4.6) Copyrght 2002, Sanjay K. Bose Tme axs dvded nto slots slot slot boundares Arrvals can only occur at slot boundares Servce to a job can only start at a slot boundary Servce duraton s always an ntegral multple of the slot duraton Copyrght 2002, Sanjay K. Bose 2
Assume that the number of jobs that arrve n successve slots are ndependent, dentcally dstrbuted (..d.) random varables Geo Arrval Process: Geometrc (or Bernoull) Arrval Process Only one job can arrve n a slot wth probablty λ and that no jobs arrve n a slot wth probablty -λ, (0<λ<) The nter-arrval tme I s geometrcally dstrbuted wth wth mean /λ and wth probablty- P{I k slots} λ(-λ) -k for k,2,... λ( Generatng Functon of the number of arrvals n a slot Copyrght 2002, Sanjay K. Bose 3 Geo [X] Arrval Process Batch Geometrc Arrval Process Λnumber of arrvals n a slot (d random varables) λ(k) P{Λ k arrvals n a slot} k0,,2,.. k 0 λ( k) z k Generatng Functon of the number of arrvals n a slot The followng defntons of means and factoral moments would be useful later λ E{ Λ} Λ λ λ ( ) E{ Λ )} Λ E{ Λ )...( Λ + )} Λ ( ) 3, 4,... Copyrght 2002, Sanjay K. Bose 4 2
Choce of Arrval Models Arrval Models Late Arrval Early Arrval Queue sze measured mmedately after the slot boundares Watng tme n queue wll dffer for the late and early models Copyrght 2002, Sanjay K. Bose 5 Late Arrval Model Servce Completon n n+ n+2 Arrval Tme Arrvals come late n the slot,.e. just before the slot boundary and before the servce completons due to occur at the end of that slot Number left behnd n the queue as seen by a departure wll nclude the arrvals as shown above Tme spent watng n queue Number of slots spent watng for servce not ncludng the slot n whch the job arrves For example, watng tme s zero f a job arrves at the end of the n th slot and starts servce from the begnnng of the (n+) th slot,.e. the next slot after ts arrval. Copyrght 2002, Sanjay K. Bose 6 3
Early Arrval Model Servce Completon n n+ n+2 Arrval Tme Arrvals come early n the slot,.e. just after the slot boundary. Note that servce completons occur just before the slot boundary as n the late arrval model Number left behnd n the queue as seen by a departure wll not nclude the arrvals as shown above Tme spent watng n queue Number of slots spent watng for servce ncludng the slot n whch the job arrves For example, watng tme s zero f a job arrves at the begnnng of the (n+) th slot and starts servce from that slot tself. Copyrght 2002, Sanjay K. Bose 7 Important ponts to note - Queue sze at servce completon n the early arrval model wll always be lower than n the correspondng late arrval model. Lower by the number of jobs whch actually arrve at that slot boundary The watng tme n queue wll be the same regardless of the actual model (early/late) beng used Copyrght 2002, Sanjay K. Bose 8 4
Servce Tmes Multples of slot duratons - starts and ends at the slot boundares General IID Dstrbuton for the number of slots (say random varable X) requred to complete servce to a job. Probablty Dstrbuton of Servce Tmes (n terms of the number of slots requred for servce Probablty Dstrbuton Generatng Functon Moments b ( k) P{ X k} for k,2,. k E{ X E{ X b( k) z b E{ X } B b b ( ) 2 } k } B + B 3, 4,... Copyrght 2002, Sanjay K. Bose 9 The Geo/G/ Queue (dscrete tme verson of the M/G/ queue) Late Arrval Model Separate analyss requred for the late arrval and the early arrval model Early Arrval Model Stablty requres that the traffc offered ρ λb< Copyrght 2002, Sanjay K. Bose 0 5
The Geo/G/ Queue (Late Arrval Model) n number of jobs n the queue mmedately after the servce completon of the th job a number of jobs arrvng durng the servce tme of the th job The random varables a,2,... are ndependent and dentcally dstrbuted random varables wth the generatng functon A( and mean ρ. Homogenous, Dscrete- Tme Markov Chan n + a + n + a + n 0 n (4.9) Copyrght 2002, Sanjay K. Bose At equlbrum, the steady-state dstrbuton p k of ths Markov Chan may be found as - p k lm P{ n k} k 0,,2,... and k 0 k p k z Show that, usng (4.9) under equlbrum condtons gves - ( ρ)( A( A( z wth p 0 ρ ρ λb Copyrght 2002, Sanjay K. Bose 2 6
Show that A( λ + λ leadng to ( ρ)( λ + λ λ + λ z (4.97) Derved for the nstants of servce completons of jobs Also holds for Arrval nstants Just after arbtrary slot boundary Arbtrary tme nstant on the contnuous tme axs BASTA/GASTA: Bernoull/Geometrc Arrvals See Tme Averages holds as the dscrete tme verson of PASTA Copyrght 2002, Sanjay K. Bose 3 Usng from (4.97), show that Mean number n system 2 b λ λρ N + ρ (4.98) 2( ρ) The mean tme W (n number of slots) spent by a job n the system may be found from (4.98) usng Lttle s Result NλW We can then use W q W - b and N q λw q to get the performance measures W q and N q Copyrght 2002, Sanjay K. Bose 4 7
The dstrbuton G W ( (.e. the generatng functon) of the number of slots for whch a job stays n the system may also be obtaned for a FCFS Geo/G/ queue. Usng an approach smlar to that followed for the M/G/ queue, show that for the FCFS Geo/G/ queue, we wll have - GW ( λ + λ whch leads to and G W G Wq ( ρ)( ( ( λ( ) ( ρ)( ( ( λ( ) (4.02) (4.04) followng usual ndependence argument between servce tme and tme spent watng n queue Copyrght 2002, Sanjay K. Bose 5 The Geo/G/ Queue (Early Arrval Model) n number of jobs n the queue after the servce completon of the th job and before the next possble arrval pont a number of jobs arrvng durng the servce tme of the th job a ~ number of jobs arrvng n the servce tme of the the th job mnus one slot Homogenous, Dscrete- Tme Markov Chan n + a~ + n + a + n 0 n (4.06) Copyrght 2002, Sanjay K. Bose 6 8
Generatng Functon A( of a obtaned as before Show that A( λ + λ B z A ~ ( λ + λ ) ( λ + λz From (4.06), show that ~ ( ρ)[ A( za( ] ( λ)[ A( z] and hence ( ρ)( λ + λ ( λ + λ[ λ + λ z] Copyrght 2002, Sanjay K. Bose 7 Show that, n ths case GW ( λ + λ ( λ + λ whch leads to G W ( ρ)( ( ( λ( ) Note that even though s dfferent for the late/early arrval models, G W ( s the same as clamed earler Copyrght 2002, Sanjay K. Bose 8 9
The Geo [X] /G/ Queue Summary of results gven here. Please see Sec. 4.6.2 for detals Generatng Functon of the number of jobs arrvng n a slot Generatng Functon of the number of slot requred for servce by a job Copyrght 2002, Sanjay K. Bose 9 The Geo [X} /G/ Queue (Late Arrval Model) Generatng Fn. of the number n the system just after a servce completon ( ρ)[ ] ) λ[ ) z] Generatng Fn. of the number n the system just after an arbtrary slot boundary z B z P * ( )( ) ( )) ( ρ ) z Generatng Fn. of the number of slots spent by a job watng n the queue, pror to servce G Wq ( ρ)( [ )] ( λ [ ) z][ ] Copyrght 2002, Sanjay K. Bose 20 0
Mean number n system just after an arbtrary slot boundary (or at any arbtrary tme nstant) 2 λ b N λρ + λ 2( ρ) b + ρ Mean queueng delay (number λ b λρ + λ W of slots) encountered by a job q 2( ρ) 2 b Copyrght 2002, Sanjay K. Bose 2 The Geo [X} /G/ Queue (Early Arrval Model) Generatng Fn. of the number n the system just after a servce completon Generatng Fn. of the number n the system just after an arbtrary slot boundary ( ρ)[ ] ) λ [ ) z] ( )( ) P * ( ρ ) z Generatng Fn. of the number of slots spent by a job watng n the queue, pror to servce G Wq ( ρ)( [ )] ( λ [ ) z][ ] Note that P * ( and G W q ( are the same as for the Late Arrval Model The queue performance parameters N, N q, W, W q wll be the same as for the late arrval model Copyrght 2002, Sanjay K. Bose 22