Limiting Behavior and Applications of Markov Chains
6. Queueing System G/M/1
Consider a single-server queueing system with exponentially distributed service times which are independent of each other and of the arrival process, and with an arrival process where the successive interarrival times are independent and identically distributed. We will let a denote the
parameter of the service time distribution and let φ denote the interarrival time distribution. Then qn defined by (5.3) becomes the probability that the server completes exactly n services during an interarrival time provided that there are that many customers available to be served. We define rn = qn + 1 + qn + 2 + · · · as before and let
so that r is the expected number of services which the server is capable of completing during an interarrival time.
If r ≥ 1, then the server can keep up with arrivals, and we expect the queue size to be recurrent; if r
< 1, then the queue size is likely to increase to infinity, and the process is transient. Note that this queueing system is the dual of the system M/G/1 studied in the preceding section. This duality comes about by the reversed roles of the interarrival times and service times. Therefore, with r fixed, when one system is transient the other is recurrent and vice versa. Later we will make these heuristic remarks more precise. The duality mentioned extends somewhat further and enables us to obtain the limiting distribution of the queue size for the G/M/1 system as a function of the probabilities of never becoming empty in the M/G/1 system. There is a similar functional relationship between the limiting distribution of the queue size for the M/G/1 system and the probabilities of never becoming empty for the G/M/1 system.
In this section we denote by the number of customers present in the system just before the time Tn of the nth arrival.
(6.1) THEOREM. is a Markov chain with state space E = {0, 1, . . .} and transition matrix
Proof. Let Mn + 1 be the number of services completed during the (n + 1)th interarrival time [Tn, Tn
+ 1). Then
that is, is the number of customers that were there before the nth arrival plus the nth customer less those whose services were completed during the next interarrival time. It follows from (6.3) that to show that X* is a Markov chain, it is sufficient to show that Mn + 1 is conditionally independent of
the past history before Tn given the present number . But this follows from the independence of the service times and interarrival times and the fact that by the memorylessness of the exponential distribution, the remaining service time of the customer who was being served at time Tn (if any) has the same exponential distribution as any service time.
Furthermore, the above reasoning shows that as long as there are customers to be served, the conditional distribution of the number of services completed will be Poisson: with Z = Tn + 1 − Tn,
Taking expectations with respect to Z, which is independent of , we obtain
Putting (6.3) and (6.4) together, we see that the transition probabilities P*(i, j) are as claimed.
It is clear from an inspection of (6.2) that the Markov chain X* is irreducible aperiodic. Therefore all the states are of the same type. The following theorem shows that they are all recurrent non-null if and only if r > 1.
(6.5) THEOREM. X* is recurrent non-null if and only if r > 1. If r > 1, the limiting distribution
is given by
where β is the unique number satisfying
If r ≤ 1, then π*(j) = 0 for all j.
Proof. By Theorem (2.1), X* is recurrent non-null if and only if ν = νP*, ν1 = 1 has a solution; and if there is a solution, then π* = ν. Writing out the equations for ν = νP*, we obtain (observe that the initial equation uses rn = qn + 1 + qn + 2 + · · ·)
Let a function f be defined by
Now the equation for ν0 gives an equation for f(1), summing the equations for ν0 and ν1 yields an equation for f(2), and so on. We obtain
In other words, f satisfies
with Q as defined by (5.32), and we are interested in a solution of this satisfying
Remembering that Q was obtained from P by deleting the 0th row and column, we conclude by Proposition (4.5) that such a solution f exists if and only if the chain X is transient. By Theorem (5.34), this is true if and only if r > 1. If r > 1, the solution for f is given by (5.35), where β satisfies (5.36), which is the same relation as (6.8).
Solving for ν, by using (6.9), out of the expression (5.35) for f, we obtain
which is the same as the claimed limiting distribution π*. This completes the proof, since the last statement, that r ≤ 1 implies π* = 0, follows directly from Theorem (5.3.2).
The limiting distribution obtained in the recurrent non-null case, then, is a geometric distribution. It is easy to work with, and in particular, we see that
It is worth mentioning that this last result may be used, in practice, to estimate β directly; so after ascertaining that the model fits the system of practical interest, all one needs is an estimate of the average number of customers in the system just before an arrival. Once this number is obtained, (6.10) may be used to estimate by setting . In other words, if one is interested only in the queue-size process, one does not need to estimate the probabilities qn or try to solve the equation (6.8) for β.
It is easy to relate these results to the waiting times of the individual customers. Let Wn be that of the nth customer. Then, if the service is on a first-come, first-served basis, the nth customer’s waiting time will be equal to the sum of the service times of those customers whom he found there upon his arrival. That is, Wn is equal to the sum of random variables each of which has the exponential distribution with parameter a. From the interpretation of the geometric distribution in its relation to the time of first success in a sequence of Bernoulli trials (cf. Chapter 3 for details), we may think of Wn for large n as the time of first success with trials being performed at the times of arrivals in a Poisson process with rate a (note that there is a trial at time 0 in this setup). From the results on decomposition of Poisson processes (cf. Chapter 4) we see that Wn will have an exponential distribution, for large n, with parameter equal to a times the probability of success 1 − β, except that at t = 0 there is a probability of immediate success equal to 1 − β. Hence,
Some further quantities of interest can be obtained from this by straight-forward methods. We leave some of these as exercises.
We return to the queue size process X* and consider it when it is not recurrent non-null, namely, when r ≤ 1. The next theorem shows that when r < 1, X* is transient and when r = 1, X* is recurrent null. In the transient case we compute the probability that the queue never becomes empty given the number of initial customers.
(6.12) THEOREM. X* is transient if and only if r < 1. If r < 1, the probability f*(j) that the queue starting with j customers never becomes empty is given by
where the π(j) are given by (5.21), (5.22), and (5.23).
Proof. In view of Proposition (4.5), f* is the solution of h = Q*h, 0 ≤ h ≤ 1, where Q* is obtained from P* by deleting the 0th row and column. Then the equations for h = Q*h become (write f*(j) = hj)
Define π0 = q0h1, π1 = (1 − q0)h1, and let πj = hj − hj − 1 for j = 2, 3, . . . . Then the first equation of (6.14), along with π0 = q0h1, implies the two equations
and subtracting the equation for hj − 1 from the one for hj for j = 2, 3, . . . yields
In other words, π satisfies π = πP with P as given in (5.2), and we are interested in the solution of π = πP with ∑πj = limj hj = 1. From Theorem (5.14), such a solution exists if and only if r < 1. When r <
1, the solution is given by (5.21), (5.22), and (5.23), and the solution π is connected to h by the relation hj = π0 + · · · + πj. This completes the proof.
A special case of some interest is the single-server queueing system with Poisson arrivals and exponential service times (usually denoted by M/M/1 queue). One may consider it either as a special M/G/1 queue or as a special G/M/1 queue. It is easier, from the computational point of view, to take it as a special case of the G/M/1 queue with the interarrival distribution
(and, of course, exponential service times with parameter a).
To compute the limiting distribution of the queue size just before the nth arrival, we use Theorem (6.5). Now, to solve for β in (6.8), first note that
Thus, equation (6.8) becomes
We know that 1 is a solution. To obtain the other, we see that when r = a/λ > 1 we have, as the smallest solution,
So we have
It turns out, though it is not at all apparent from anything which precedes this, that we also have
for the queue size Yt at time t, and similarly
for the queue size Xn just after the nth departure (cf. Exercise (8.21) for this).
For a different formulation of this problem we refer the reader to Section 6 of Chapter 8. For the general G/M/1 queue and its time-dependent behavior, see Section 7 of Chapter 10.