A queue is a single-server queue with infinite buffer where both the interarrival and service times follow exponential distributions. Let be the number of customers in the system at time , with the assumption that (the system is initially empty). The jump times
(with ) are exponentially distributed, so is a continuous-time Markov chain with embedded Markov chain . Let be the arrival rate and the service rate, with . Then the global balance equations for the stationary distribution are
The solution to this recurrence is
where . From here it follows that the mean number of customers in the system is
The mean time in system, or mean sojourn time, satisfies
as on average there will be customers in the queue when a customer arrives, and so the customer is in the system for service times. Note that
This equality is known as Little’s Law.
To compute the distribution of the sojourn time, let be the number of customers in the system immediately before an arrival, and the service time of the customer. It follows that
Conditioning on yields
PASTA (Poisson Arrivals See Time Average) yields
It follows that .
To compute the distribution of the time waiting in queue , we have
Since iff , it follows that , and that . Therefore the density of is
The next item of interest is the busy period of the system. Let , and for
The busy periods are the time intervals where , that is, , and the idle periods or . The sequences , define an alternating renewal process, and by the renewal reward theorem,
Now, the mean idle time is simply the mean interarrival time, so , and the limit above is equal to the utilization of the server. It follows that
The distribution of the busy period can be written in terms of modified Bessel functions, i.e.
with given by
(See “ Transient Queue length distribution” here for the derivation.)
One final consideration is the departure distribution of the queue. The probability that an arbitrary departing customer leaves behind an empty system is , and the time until the next departure is the sum of an interarrival time and a service time. Otherwise, the time until the next departure is a service time. It follows that the interdeparture distribution has density
the same as that of the interarrival distribution. In fact, for each we have
so the M/M/1 queue is a time-reversible stochastic process. Since the arrival times in the original process are the departure times in the reversed process, the departure process is also a Poisson process with rate .