We consider a queue with Poisson arrivals of rate . Since exponentially distributed service times are often unrealistic, we assume that service times are independent and identically distributed with general distribution
. There is a single server, which serves jobs at unit speed.
The amount of work in the queue does not depend on the order in which jobs are served. By work, we mean the amount of time required for the server to empty the queue. By the PASTA property, the expected waiting time of an arriving job is determined by the expected work it sees in the queue.
However, when service times are not exponential, the service order matters when analysing the number of jobs in the system. We therefore assume that jobs are served in the order in which they arrive. This is called first-in first-out (FIFO) service, or equivalently first-come first-served (FCFS).
Pollaczek-Khintchine Formula
For an M/G/1 queue with under FIFO service, the expected number of jobs in the system is
The expected time spent in the system by an arriving job is
Both results follow from the probability-generating-function formula
where
is the Laplace transform of .
Note that , where
denotes the number of jobs waiting in the queue. This is because a job is in service with probability
.
The generating-function identity above is called the Pollaczek-Khintchine formula. The corresponding formulas for the expected number of jobs and the expected waiting time are also often referred to as Pollaczek-Khintchine formulas.
A Quick Comparison of the M/M/1 and M/G/1 Queues
For the M/M/1 and M/G/1 queues, respectively,
The variance of the service time therefore affects the expected number of jobs in the system. This is intuitive: more predictable service times tend to synchronize the system better and reduce congestion.
Proof of the Pollaczek-Khintchine Formula
We first prove the formulas for the expected number of jobs and the expected waiting time directly. We then prove the probability-generating-function formula.
Proof
Part 1. For , the proportion of time for which the server is busy is
. Let
denote the waiting time of an arriving job before its own service begins. By the PASTA property,
where is the number of jobs waiting in the queue and
is the residual service time of the job currently in service. Thus,
.
The term is the expected amount of work waiting in the queue. In particular,
By Little’s Law,
From the residual-service formula,
Combining these identities gives
Therefore,
and hence
Using , we obtain
Including the service time of the arriving job gives
Applying Little’s Law to the total number of jobs in the system gives
Part 2. We now prove the probability-generating-function formula. Let be the number of jobs in the system immediately after a departure in stationarity, let
be the number immediately after the next departure, and let
be the number of arrivals during the service time of the next job served.
These random variables satisfy
Since and
are independent,
If is Poisson with mean
, then
Conditioning on the service time gives
Also, writing ,
Since the server is busy for a fraction of the time, the stationary probability that the system is empty is
. Substitution gives
Rearranging,
This is the Pollaczek-Khintchine probability-generating-function formula.
The mean formulas can also be recovered by differentiating this expression and evaluating the resulting limit as . This calculation requires L’Hôpital’s rule.
□