You are on page 1of 15

The M/G/1 Queueing System

Single queue
Single server and server in order of arrival (FCFS)
Will also consider systems that dont use FCFS (e.g., priority)

Customers arrive according to a Poisson process with rate


Probability distribution of the service time has general
distribution

Service time for arrival i is Xi and (X1, X2, ) are i.i.d.


Not necessarily exponential
1
Average service time X = E{ X } =

Second moment X 2 = E{ X 2 }

Successive interarrival and service times are assumed to be


statistically independent of each other
ECE 848 Spring 2015

Set 4 M/G/1

M/G/1 System is Not Pure Markovian


State description of M/G/1 system
At time t, to summarize the complete past history of this system, we
need
N(t): number of customers present at time t
X0(t): the service time already received by the customer in service at t
Service time distribution is not necessarily memoryless

N(t) is not a Markov process


Vector [N(t), X0(t)] is Markov
Completely summarizes all past history relevant to the future system
development

Problem: while N(t) is a discrete-state space random process,


X0(t) is a continuous-state space process
Will consider method of the imbedded Markov chain
Basic idea: when a customer departs the system, X0(t) is zero
At these instants the system looks Markovian
ECE 848 Spring 2015

Set 4 M/G/1

Pollaczek-Khinchin (P-K) Formula


We will show that for an M/G/1 system,
expected customer waiting time in queue is

X2
W=
2(1 )

Where = / = E{X}

Contrast with M/M/1


All that is required in order to summarize the entire
past history of the queueing system is a specification of
the number of customers present
All other historical information is irrelevant to the
future behavior of pure Markovian systems
W=
(1 )

ECE 848 Spring 2015

Set 4 M/G/1

Residual Service Time


Consider

Cn: the n-th customer to enter the system


n: arrival time for Cn
tn = n n1: interarrival time between Cn1 and Cn
Xn: service time for Cn
Wn: waiting time (in queue) for Cn
Sn= Wn+Xn : system time (queue plus service) for Cn

Ri: residual service time as seen by the i-th customer


If some customer j is already in service when i arrives, Ri is the
remaining time until customer js service time is complete
If no customer is in service when i arrives (i.e., system is empty) Ri is
zero

ECE 848 Spring 2015

Set 4 M/G/1

Mean Waiting Time


Expanding on the graphical argument, we have
Residual service time for customer in service plus service
time for all customers found waiting in queue by the i-th
customer upon arrival
Ni: number of customers found waiting in queue by the ith customer on arrival
Wi = Ri +

i 1

Ni

j =i N i

j =1

X j = Ri + X i j

Ni

E[Wi ] = E[ Ri ] + E E X i j | N i

j =1
= E[ Ri ] + E[ X ]E[ N i ]

Take limit as i
ECE 848 Spring 2015

Set 4 M/G/1

Mean Waiting Time


We assume that the (long term) average waiting time
for a customer exists
E[Wi ]
W = ilim

True for (almost) all systems of interest, and all that are
considered in this course, provided <

E[ Ri ]
Let R be mean residual service time R = ilim

PASTA applies to M/G/1 so average number in


queue, NQ, is equal to average number in queue as
seen by an arriving customer

N Q = lim E[ N i ]
i
We also assume that this limit exists
E=
[Wi ] E[ Ri ] + E[ X ]E[ N i ]
ECE 848 Spring 2015

W = R+
Set 4 M/G/1

NQ
6

Mean Waiting Time


Note Ni and Ri are defined as the number seen by arriving
customer i
NQ and R are both limits for average as seen by arriving
customer and for an outside observer at a random time
We assume that time average equals ensemble average
By Littles Theorem NQ = W
So,
W = R+

R
W=
where =

Use graphical argument to find R

ECE 848 Spring 2015

Set 4 M/G/1

Arrival and Departure Rates


Under what conditions does the departure rate equal the
arrival rate?
an = prob. number in system just prior to the arrival of a customer is n

an lim
Pr{N (t ) n | an arrival occured just after time t}
=
=
t

dn = prob. number in system just after the departure of a customer is n

=
d n lim
=
Pr{N (t ) n | a departure occured just before time t}
t

Theorem: Under very general conditions an = dn


System reaches steady state with a positive probability of having n in
the system for all n
N(t) changes in unit increments

Theorem holds for most single-queue systems (and dont


need Poisson arrivals)
ECE 848 Spring 2015

Set 4 M/G/1

Arrival and Departure Rates


Implication: in steady state, system appears identical to
arriving or departing customer
If arrivals are Poisson, by PASTA, both an arriving and
departing customer sees a statistically identical system and it
is the same as seen by an outside observer
a n = n = d n
=
=
Pr{N (t ) n}
Unconditional steady-state
prob n lim
t

Counter example

Customers arrive and remain in system until m total customers


Then, all customers depart at once (batch departures)
d0 = 1 (departing customer always sees system empty)
dn = 0 for n = 1, 2,
Assume that batch arrivals are not allowed, then
an > 0 for n = 0, 1, 2, , m1

ECE 848 Spring 2015

Set 4 M/G/1

Notes on Pollaczek-Khinchin (P-K)


Formula
We studied graphical sketch for proof and assumed
Existence of steady-state averages W, R, and NQ
Equality (with probability one) of the long-term averages
with corresponding ensemble averages
These are natural assumptions for systems of interest in
this course

Assumed first-come-first-serve service order


It can be shown that PK is true for any order of service
provided the order is determined independently of the
required service time
See counter example (often used in QOS systems)
ECE 848 Spring 2015

Set 4 M/G/1

10

Notes on Pollaczek-Khinchin (P-K)


Formula

If E[X2] = , W is infinite even if < 1


M/M/1 is special case of M/G/1
Exponential service time: E[X2] = 2/2
X2

W =
=
=
2(1 ) 2 (1 )

While it is usually easy to find the stationary distribution


(s) for an M/M/1 it is generally not easy for a M/G/1

W for an M/D/1 queue is a lower bound for any


M/G/1 queue with the same and
1
X2

WM / D /1 =
WM / M /1
=
=
=
2
2(1 ) 2 (1 ) 2( ) 2
ECE 848 Spring 2015

Set 4 M/G/1

11

M/G/1 Queues With Vacations


Certain media-access protocols include some type of
reservation phase or other overhead to set up access
to channel
It is convenient to model these periods as a
vacation that is periods when the server is not
available for new arrivals
At end of busy period, server goes on vacation for
time described by random variable V
Given mean E[V] and second moment E[V2]
If system is empty at end of vacation, server takes new
vacation
Assume vacation times V1, V2, are i.i.d.
ECE 848 Spring 2015

Set 4 M/G/1

12

Residual Waiting Time With Vacations


A new customer must wait for the completion of
current service or vacation and for any customers
ahead of it in queue
N
i 1

As before Wi = Ri + X j = Ri + X i j
j =1
j =i N
Ri: residual service time as seen by the i-th customer
i

If some customer j is already in service when i arrives, Ri is the


remaining time until customer js service time is complete
If no customer is in service when i arrives (i.e., system is empty)
Ri is is the remaining time until the current vacation is complete

By same argument for M/G/1 queue

R
W = R + NQ = R + W =
where =

1
1

ECE 848 Spring 2015

Set 4 M/G/1

13

Reservations or Polling
Reservations can be seen as an application of M/G/1
with vacations
Example: multiple-access channel in which several users
share same channel but only one user can access the
channel at a time

We will consider round robin type of schemes


Examples include token ring
In next chapter we will look at contention based schemes
such as ALOHA

Cyclic schedule with m streams of traffic sharing


one channel
ECE 848 Spring 2015

Set 4 M/G/1

14

Rules for Including Packets in a Cycle


Exhaustive: once a user starts to transmit it continues until its
queue is empty
Can transmit packets that arrive during reservation or data interval
Example system: busy tone or polling

Gated: packets that arrive before start of reservation interval


are transmitted during data interval
Models situations in which the number of packets (or transmission
time) must be advertised during the reservation
Must know number of packets before start of reservation

Partially gated: transmit packets that arrive during reservation


interval but not during data interval

ECE 848 Spring 2015

Set 4 M/G/1

15

You might also like