Communication Networks I Lecture No. 11, October 8, 1998 Lecture summary by Jia Wei Main points: This lecture is dealing with M/G/1 queue, a single-server queueing system where customers arrive according to a Poisson process with rate but the customer service times have a general distribution. The objective is to derive and understand the Pollaczek-Khinchin (P-K) formula. 1. Queue discipline: In a queueing system with a single-server, suppose that customers arrive according to a Poisson process with rate , and the customers are served in the order they arrive. We denote Xi as the service time of the ith arrival and assume that the random variables (X1, X2, etc) are identically distributed, mutually independent, and independent of the interarrival times. 2. Pollaczek-Kinchin (P-K) formula Let _ X = E[X] = Average service time _ X2 = E[X2] = Second moment of service time W : Average customer waiting time _ X, the utilization factor. We have P-K formula: X W ) 1(2 2 In the M/M/1 case, service times are exponentially distributed , when x >0 f ( X ) e X E X 1 2 VarX 2 W 2(1 ) 1 2 1 2 E X 2 VarX ( E X ) 2 2 2 In the M/D/1 case, service times are deterministic, f (X ) (X E X W' 1 Xi ) 1 E X2 2 2(1 ) 1 1 2 1 W 2 3. Proof of P-K formula Denote Wi = Waiting time for customer i Ri = Residual service time seen by i Ni = Number of customers waiting in queue when customer i arrives. When i arrives, waiting customers are i-1, i-2, … i-Ni. Customer i-(Ni+1) is in service Then i 1 X Wi Ri j i N i j X i 1 X i 2 X i Ni Ri Ni is independent of X i 1 , X i 2 , E Wi E Ri E X i 1 X i 2 X i Ni E E X i 1 X i 2 X i N i | N i n E Ni X E N i X NQ X W R NQ X According to Little’s theorem, N Q W W R XW W R R 1 X 1 We can calculate R by a graphical argument. Residual service time r(t) Denote r (t ) residual service time at time t M (t ) number of service completions by time t X3 X1 X4 X2 X1 R(t ) X2 X3 t 0 t i 1 2 t r d X i 1 t 1 M ( t ) 1 2 M (t ) X4 t M (t ) 2X i2 1 M (t ) i 1 When t -> 1 X2 2 R X (1 X ) 0 X 2 2X P[system is empty] = 1 X , service time is 0 P[systeim is busy] = X , service time is X2 2X In P-K equation, all long term average quantities should be viewed as limits when time or customer index increases to infinity. We assume the limits of W, R, NQ exist, and this is true of almost all systems of interest to us provided that . P-K formula is valid for any order of servicing customers as long as the order is determined independently of the required service time. 4. P-K formula for M/G/1 queue with vacations The analysis of this system is the same as that of the P-K formula except that vacations must be included in the graph of residual service times r(t). Denote V1,V2, …: the durations of the successive vacations taken by the server. They are independent and identically distributed random variables. They are also independent of the customer interarrival times and service times. R’ : residual service time or possibly residual vacation time We have W R ' N Q X R ' W X R' W 1 X Residual service time r(t) R’ can be calculated by graph argument X3 V1 X1 X2 X1 Denote V2 X2 V1 X4 X5 V2 X3 X4 t M(t) = number of completed services L(t) = number of completed vacations For any t where a service or vacation is just completed, we have When t-> , M (t ) t V1 V2 VL ( t ) t fraction of time on vacation = 1-fraction of time busy = 1 L(t ) V1 V2 VL( t ) L(t ) V t L(t ) t L( t ) 1 t V R' W X 2 2 1 1 2 V V 2 X2 V2 2(1 ) 2V