0% found this document useful (0 votes)
46 views14 pages

M/G/1 Queues: Eytan Modiano Massachusetts Institute of Technology

M/G/1 queues have Poisson arrivals and generally distributed, independent service times with a single server. The Pollaczek-Khinchin formula gives the expected waiting time W in terms of the arrival rate λ, service rate μ, and second moment of the service time distribution. Vacations, where the server is idle when the queue is empty, can be modeled by adding the second moment of the vacation time distribution to the formula. Time division multiplexing performs better than frequency division multiplexing or slotted frequency division multiplexing due to starting transmissions only on slot boundaries for each user.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views14 pages

M/G/1 Queues: Eytan Modiano Massachusetts Institute of Technology

M/G/1 queues have Poisson arrivals and generally distributed, independent service times with a single server. The Pollaczek-Khinchin formula gives the expected waiting time W in terms of the arrival rate λ, service rate μ, and second moment of the service time distribution. Vacations, where the server is idle when the queue is empty, can be modeled by adding the second moment of the vacation time distribution to the formula. Time division multiplexing performs better than frequency division multiplexing or slotted frequency division multiplexing due to starting transmissions only on slot boundaries for each user.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

M/G/1 Queues

Eytan Modiano Massachusetts Institute of Technology

Eytan Modiano Slide 1

M/G/1 QUEUE

Poisson arrivals

M/G/1 General independent Service times

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

Eytan Modiano Slide 2

Pollaczek-Khinchin (P-K) Formula

!E[X 2 ] W= 2(1" #)
where = / = E[X] = line utilization

From Littles Theorem, NQ = W T = E[X] + W N = T= NQ +

Eytan Modiano Slide 3

M/G/1 EXAMPLES

Example 1: M/M/1 E[X] = 1/ ; E[X2] = 2/2

W=

! # = 2 (1 " # ) (1 " # )

Example 2: M/D/1 (Constant service time 1/) E[X] = 1/ ; E[X2] = 1/2

! # W= = 2 2 (1 " # ) 2 (1 " # )
Eytan Modiano Slide 4

Proof of Pollaczek-Khinchin (P-K) formula

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

Wi Xi-3 Xi-2 Xi-1 Xi

Ni =3

time
Wi = Ri +

j = i ! Ni

"X

i !1


Eytan Modiano Slide 5

E[Wi] = E[Ri] + E[X]E[Ni] = R + NQ/

Here we have used the PASTA property plus the independent service time property

W = R + W/ W = R/(1-)
Using littles formula

What is R? (Time Average Residual Service Time)


Residual Service Time R(t) X4 X2 X1 X2 X3 X3 X4 time

X1

Let M(t) = Number of customers served by time t E[R(t)] = 1/t (sum of area in triangles)

1 Rt = t
As t ! " ,

"

1 R(! )d! = t

M( t )

#
i =1

X i2

M(t ) = 2 2t

M( t )

#
i =1

X i2 M(t )

M(t) = Average departure rate = Average arrival rate = # t

Eytan Modiano Slide 6

M(t ) t

M( t ) i =1

! M(t ) = E [ X ] "
X i2
2

R=

#E X 2
2

[ ]

M/G/1 Queue with Vacations



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
Vi

Wi Xi-3 Xi-2 Xi-1 Xi

Ni =3

time
Wi = Ri +

j = i ! Ni

"X

i !1

E[Wi] = E[Ri] + E[X]E[Ni] = R + NQ/m = R/(1-r)


Eytan Modiano Slide 7

Average Residual Service Time (with vacations)


Residual Service Time R(t)

X1 X1

V 1 X2 X2 V 1

X4 X3 X3 X4 time

M( t ) 2 1 1$ Xi Rt = R(! )d! = & + t t & i =1 2 0 %

"

#
j =1

L( t )

Vj2

L( t ) ' M(t ) M( t ) X 2 Vj2 L(t ) i +) = + 2 ) 2t i =1 M(t ) 2t j =1 L(t ) (

M(t ) E[X 2 ] L(t ) E[V 2 ] R = lim + t!" t 2 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

Average Residual Service Time (with vacations)


As t ! " , M(t) L(t) ! # and ! # v = vacation rate t t

Let I = 1 if system is on vacation and I = 0 if system is busy Littles Theorem


E[I] = P(system idle) = 1- = v E[V]

v = (1-)/E[V]

Hence,

!E[X 2 ] (1 " # )E[V 2 ] R= + 2 2E[V]

!E[X 2 ] E[V 2 ] W= + 2(1 " # ) 2E[V]


Eytan Modiano Slide 9

(recall W = R/(1-))

Example: Slotted M/D/1 system 1/


Each slot = one packet transmission time = 1/

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)

E[X] = E[v] = 1/ E[X2] = E[v2] = 1/2

! / 2 1/ 2 ! / 1/ W= + = + 2(1" ! / ) 2 / 2( " !) 2
= WM / D /1 + E[X]/ 2

Eytan Modiano Slide 10

Notice that an average of 1/2 slot is spent waiting for the start of a slot

FDM EXAMPLE

Assume m Poisson streams of fixed length packets of arrival rate /m each multiplexed by FDM on m subchannels. Total traffic = Suppose it takes m time units to transmit a packet, so =1/m. The total system load: =

FDM Frames
User 1 User 2 IDLE SLOT for User 1 SLOT for User 2 IDLE

User m

SLOT for User m

SLOT for User m

We have an M/D/1 system W=E[x2]/2(1-)

WFDM
Eytan Modiano Slide 11

#m = = 2(1 " # ) 2(1 " # )

(! / m ) m 2

Slotted FDM

Suppose now that system is slotted and transmissions start only on m time unit boundaries.

SLOTTED FDM Frames


User 1 User 2 SLOT for User 2 SLOT for User 1 SLOT for User 2

User m

Vacation for User m

SLOT for User m

This is M/D/1 with vacations


Server goes on vacation for m time units when there is nothing to transmit E[V] = m; E[V2] = m2.

WSFDM = WFDM + E[V2]/2E[V] = WFDM + m/2


Eytan Modiano Slide 12

TDM

EXAMPLE

slot m

slot 1

TDM Frame ... slot 2

slot m

TDM with one packet slots is the same


A session has to wait for its own slot boundary W = R/(1-)

!E[X 2 ] (1 " # )E[V 2 ] R= + 2 2E[V]


!E[X 2 ] E[V 2 ] W= + 2(1 " # ) 2E[V]
Eytan Modiano Slide 13

TDM

EXAMPLE

Therefore,

WTDM = WFDM + m/2

Adding the packet transmission time, TDM comes out best because transmission time is 1 instead of m TFDM = [WFDM ] + m TSFDM = [WFDM + m/2]+m TTDM = [WFDM + m/2]+1 = TFDM - [m/2-1]

Eytan Modiano Slide 14

You might also like