Lectures 8 & 9 M/G/1 Queues: Eytan Modiano MIT
Lectures 8 & 9 M/G/1 Queues: Eytan Modiano MIT
M/G/1 Queues
M/G/1 QUEUE
M/G/1
Poisson arrivals at rate Service time has arbitrary distribution with given E[X] and E[X2]
Service times are independent and identically distributed (IID) Independent of arrival times E[service time] = 1/ Single Server queue
E[X 2 ] W= 2(1 )
where = / = E[X] = line utilization
M/G/1 EXAMPLES
W=
2(1- )
(1- )
W= = 22(1-) 2(1-)
Eytan Modiano Slide 4
Proof of Pollaczek-Khinchin
Let
Wi = waiting time in queue of ith arrival Ri = Residual service time seen by I (I.e., amount of time for current customer receiving service to be done) Ni = Number of customers found in queue by i
i arrives Ri Xi-3
W = Ri + i
Eytan Modiano Slide 5
j=i- N i
i-1
X j
Here we have used PASTA property plus independent service time property
W = R + W/ => W = R/(1-)
Using littles formula
What is R?
(Time Average Residual Service Time)
X1 X1
X4 X2 X2 X3 X3 X4 time ->
Let M(t) = Number of customers served by time t E[R(t)] = 1/t (sum of area in triangles)
t M(t) 1 t i=1
1 t
R( )d = 0
As t -> Infinity
M(t) t
M(t) M(t)
Eytan Modiano Slide 6
i=1
2 i M(t) X
= E[X2]
=> R = E[X2]/2
Useful for polling and reservation systems (e.g., token rings) When the queue is empty, the server takes a vacation Vacation times are IID and independent of service times and arrival times
If system is empty after a vacation, the server takes another vacation The only impact on the analysis is that a packet arriving to an empty system must wait for the end of the vacation
i arrives
Vj Ri Xi-3
W = Ri + i
j=i- N i
i-1
X j
X1 X1
V1 X2 X2 V1
X4 X3 X3 X4 time ->
t R = [R(t)]= 1 t 0
E[M(t)] t
M(t) R( )d = 1 t
(
i=1
+
X2 i + 2
L(t)
j=1
V2 j 2
R =
lim t
2 E[X ] 2
2 L(t) E[V ] t 2
Eytan Modiano Slide 8
Where L(t) is the number of vacations taken up to time t M(t) is the number of customers served by time t
As t->,
Now, let I = 1 if system is on vacation and I = 0 if system is busy By Littles Theorem we have,
E[I] =E[#vacations] = P(system idle) = 1- = v E[V] => v = (1-)/E[V]
Hence,
remember W = R/(1-)
+ (1- )E[V 2] 2 E[V]
R =
E[X 2] 2
W =
E[X 2 ] 2(1- )
E[V 2 ] 2 E[V]
Transmission can begin only at start of a slot If system is empty at the start of a slot, server not available for the
duration of the slot (vacation)
1/ 2 1/ / 2 / W= + = + 2(1 / ) 2 / 2( ) 2 = WM / D /1 + E[ X]/ 2
Notice that an average of 1/2 slot is spent waiting for the start of a slot
FDM EXAMPLE
FDM Frames
User 1 User 2
IDLE
User m
W
Eytan Modiano Slide 11
FDM
2 ( /m) m 2 (1- )
m 2 (1- )
Slotted FDM
User m
TDM
TDM Frame
slot m slot 1 slot 2
EXAMPLE
...
slot m
TDM with one packet slots is the same (a session has to wait for its own slot boundary), so W = R/(1-)
W = =
Eytan Modiano Slide 13
TDM
EXAMPLE
Therefore,
Adding the packet transmission time, TDM comes out best because transmission time = 1 instead of m. TFDM TSFDM TTDM = [WFDM ] + m = [WFDM + m/2]+m = [WFDM + m/2]+1 = TFDM - [m/2-1]