Unified and refined analysis of the response time and waiting time in the M/M/ m FCFS preemptive-resume priority queue

We present a unified and refined analysis of the response time and waiting time in the M/M/$ m $ FCFS preemptive-resume priority queueing system in the steady state by scrutinizing and extending the previous studies such as Brosh (1969), Segal (1970), Buzen and Bondi (1983), Tatashev (1984), and Zeltyn et al. (2009). In particular, we analyze the durations of interleaving waiting times and service times during the response time of a tagged customer of each priority class that is preempted by the arrivals of higher-priority class customers. Our new contribution includes the explicit formulas for the second and third moments of the response time and the third moment of the waiting time. We also clarify the dependence between the waiting time and the total service time. Numerical examples are shown in order to demonstrate the computation of theoretical formulas.

1. Introduction. We consider a queueing system with m servers and an infinite capacity of the waiting room with several priority classes of customers. Customers of class p arrive in a Poisson process with rate λ p (> 0) independently of customers of all other classes. Every customer requests a service which has the exponential distribution with mean 1/µ irrespective of his class. Classes are indexed 1, 2, . . . such that customers of class p have preemptive priority for service over customers of class q if p < q.
There are three cases which may happen when a customer of class p arrives: • Unless all servers are busy, his service is started immediately.
• If all servers are busy serving customers of classes equal or higher than p, he must wait at the tail of waiting customers of class p. • If all servers are busy serving customers, out of whom at least one of them is of class lower than p, let q (> p) be the lowest priority class of those customers being served. At this moment there are at most customers of classes q, q+1, . . . in the waiting room. In this case, the service to one of customers of class q is preempted and he is displaced from the service facility to the head of the waiting room. We select such a customer of class q for displacement that his service was started or resumed last among all the customers of class q in service. Then the service to the arriving customer of class p is started. This policy of selecting the customer to displace is assumed by Segal [7]. It is called Last-Come, First-Displaced (LCFD) by Fujiki [4].
As soon as a server becomes available, one of the customers of the highest priority class among those in the waiting room is called in for service. Within the same class, a customer is chosen on the first-come, first-served (FCFS) basis. When the service is resumed, a new sample of the service time is set up from the exponential distribution with mean 1/µ, irrespective of the amount of service given to him previously.
Thus we may call our system an "M/M/m preemptive-resume priority queue with FCFS and LCFD within the same class." The study of response time and waiting time of customers in this model dates back to old days including Brosh [1], Segal [7], Buzen and Bondi [2], Tatashev [10], and Zeltyn et al. [13]. The purpose of this paper is to review and refine these works from a unified viewpoint of the first passage time in a birth-and-death process with absorbing states [8]. We derive explicit formulas for the moments of the response time and waiting time of a tagged customer of each priority class in the steady state. We also clarify the dependence between the waiting time and the total service time. In the appendix, we summarize the results for the M/M/2 FCFS preemptive-resume priority queue. We use the following notation for the analysis throughout this paper: For this setting of parameter values, we will show several performance measures against λ for the range 0 ≤ λ ≤ 20. Our formulas can be applied to systems with any number of servers, any number of classes, and any different distinct values of arrival rates. However we must assume that the service rates are identical for all customers of all classes and that the system is stable up to customers of class p (ρ + p < 1).

2.
Mean response and waiting times. We first follow Buzen and Bondi [2] for the neat derivation of mean response time E[T p ] for customers of each class p. Let us focus on customers of class p. Due to the service and preemption mechanism mentioned above, the behavior of a customer is never affected by customers of lower priority classes as well as customers of the same class who arrive after him. Therefore, we have only to consider customers of classes 1, 2, . . . , p.
We denote by N + p the number of customers of classes 1, 2, . . . , p present in the system at an arbitrary time in the steady state and define Q + p,k := P {N + p = k} k = 0, 1, 2, . . . .
From the well-known analysis for the M/M/m queue [3, p. 90] with customers of classes 1, 2, . . . , p, we get where, from the normalization condition ∞ k=0 Q + p,k = 1, we have where we assume that ρ + p < 1 for the system to be stable. Then we get is Erlang's C formula [3, p. 91]. In the present case, we have as the probability that a customer of class p waits upon arrival. We denote by N p the number of customers of class p present in the system at an arbitrary time in the steady state. Then we get We denote by L p the number of customers of class p present in the waiting room at an arbitrary time in the steady state. Then we have which gives the mean waiting time [13] We where ρ + p = λ + p /µ. This result can also be obtained from the observation in the FCFS system (White and Christie [12]) that the mean response time E[T p ] of a tagged customer of class p is composed of his own mean service time, the mean time to serve those customers of classes 1, 2, . . . , p who are already present in the waiting room, and the mean workload brought by the subsequent arrivals of customers of classes 1, 2, . . . , p − 1 during E[T p ]. Thus we have the relation Since we have E[N k ] = λ k E[T k ] by Little's theorem for customers of class k (1 ≤ k ≤ p), we get the recursion with respect to p: which yields Eq. (5). We note that this argument holds only for the case of m = 1.
3. First passage time to service completion. We now focus on a tagged customer of class p in state k, which means that there are k other customers of classes 1, 2, . . . , p who compete for the servers with him at an arbitrary time in the steady state. Then the state transition diagram for our tagged customer is shown in Fig. 3. We consider the first passage time in this one-dimensional birth-and-death process with an absorbing state "service completion" denoted by "Sr". See, for example, Kulkarni [6,Chapter 4] and Taylor and Karlin [11,Chapter III] for the general treatment of first passage times in discrete-time Markov chains with absorbing states. Figure 3. State transition diagram for a customer of class p until service completion.
We follow Segal [7] and Zeltyn et al. [13] for the following arguments. We denote by T * p,k (s) the Laplace-Stieltjes transform (LST) of the distribution function (DF) for the response time of a tagged customer of class p in state k, where k = 0, 1, 2, . . .. Referring to Fig. 3, we get the following set of equations for {T * p,k (s); k ≥ 0}: where, for 0 ≤ k ≤ m − 1, we use The LST of the DF for the time that the tagged customer of class p stays in state k is given by For k ≥ m, we use which do not depend on state k. Then the above set of equations can be written as From the homogeneous set of equations for k ≥ m in Eq. (6), we assume the solution in the form where G * p−1 (s) is the solution to the quadratic equation We note that G * p−1 (s) is the LST of the DF for the length of a busy period in the M/M/1 queue with arrival rate λ + p−1 and service rate mµ, which we denote by G + p−1 . Then we have Substituting Eq. (7) into Eq. (6) with k = m, we get [7] We then have the non-homogeneous set of m equations for 0 ≤ k ≤ m − 1 in Eq. (6), which makes it possible to express both T * p,m−1 (s) and T * p,m (s) in terms of T * p,0 (s). Substituting them into Eq. (9), we can determine T * p,0 (s). Then we obtain all {T * p,k (s); k ≥ 0} in principle. Thus we get where we define In particular, for customers of the highest priority class p = 1 who are never preempted (λ + 0 = 0), we can get the simple solution to Eq. (6) as which leads to where is the well-known LST of the DF for the waiting time in the M/M/m FCFS queue (without priorities) with arrival rate λ 1 [3, p. 97]. For m = 1 (a single-server queue), we have where ρ + p := λ + p /µ and then get [12] T We then have the mean E[T p ] in Eq. (5) and the second and third moments

4.
Mean response time. Let us consider the mean response time in the framework of the first passage time. The mean response time for a customer of class p who competes for the servers with k others is given by E[T p,k ] = −dT * p,k (s)/ds| s=0 , k ≥ 0. The complete set of (m + 1) equations for the unknowns {E[T p,k ]; 0 ≤ k ≤ m} is derived from Eqs. (6) and (7) as where we have defined From Eq. (9) we get another relation .

Thus we obtain the expression for
Now, from Eq. (15), we have which can be written as From this expression with k = m and Eq. (17), we determine and get We also have The mean response time for a customer of class p is then given by [13] We have numerically confirmed that this yields the same result as Eq. (3).

5.
Second and higher moments of the response time. The ℓth moment of the response time for a customer of class p who competes for the servers with k others is given by For the ℓth moment, the complete set of (m + 1) equations for the unknowns {E[T ℓ p,k ]; 0 ≤ k ≤ m} is derived from Eqs. (6) and (7) in terms of the moments of lower degrees as follows: We can obtain {E[T ℓ p,k ]; 0 ≤ k ≤ m} successively with respect to ℓ in the same way as in the preceding section. First, by recursion we have The case k = m − 1 in this equation yields Thus we get (20) By further recursion of Eq. (19) we have From Eq. (20) and Eq. (21) with k = m, we determine Thus we can calculate {E[T ℓ p,k ]; 1 ≤ k ≤ m} by Eq. (21). In particular we have Finally, the ℓth moment of the response time for a customer of class p is where E[F ℓ p,m ] = (−1) ℓ d ℓ F * p,m (s)/ds ℓ | s=0 is obtained recursively using The second moment of the response time for a customer of class p is given by [13] The third moment is given by We plot E[T 2 p ] and E[T 3 p ] in Figs. 4 and 5, respectively, for the numerical example described in Section 1. We denote by W • p,k (s) the LST of the DF for the initial waiting time W • p,k of a customer of class p who competes for the servers with k other customers of class 1, 2, . . . , p. By definition, we have For k ≥ m, we have the following set of equations: where B ′ * p (s) and α ′ p are defined in Section 3. Thus we have These relations are satisfied by where G * p−1 (s) is given in Eq. (8). Then we get where C(m, a) is given in Eq. (2). This leads to the Brosh's result [1]: .
We can also get the second and third moments of W • p as .
We note that is the LST of the DF for the initial waiting time of a customer of class p who arrives when all servers are busy serving customers of classes 1, 2, . . . , p. For m = 1 (a single-server queue), we observe that W + p (s) ≡ T * p (s) given in Eq. (14). Gaver [5] defined the completion time for a customer of class p as the time interval from the instant at which he enters service (clearly, there are no customers of classes 1, 2, . . . , p − 1 in the system at this moment) to the first instant after his service completion at which there are no customers of classes 1, 2, . . . , p − 1 in the system. In our framework, the LST of the DF for the completion time of a customer of class p who competes for the servers with k other customers is given by T * p,k (s) for k ≥ m. Since the initial waiting time and completion time are independent, we have the relation which agrees with Eqs. (7) and (9). 7. Waiting time. After a customer of class p enters service for the first time, his service may be preempted several times before completion when he is pushed out of the service facility by the arrivals of customers of classes 1, 2, . . . , p − 1. He stays in the waiting room until he again enters service. The total amount of the time a customer spends in the waiting room is called the waiting time, which is the response time minus the service time.
Tatashev [10] derived the LST of the DF for the waiting time W p for customers of class p. Later Zeltyn et al. [13] show the mean and the second moment of W p . Their analysis and result are reviewed in this section.
Let P p,k {Pr} be the probability that a tagged customer of class p competing for the servers with k other customers (they are all customers of classes 1, 2, . . . , p − 1 and those customers of class p who have arrived before the tagged customer) is preempted, where k = 0, 1, 2, . . . , m − 1. The state transition diagram for our tagged customer is shown in Fig. 6. We consider the first passage time in this onedimensional birth-and-death process with two absorbing states, namely "service preemption" denoted by "Pr" and "service completion" denoted by "Sr".

✖✕ ✗✔
Sr Figure 6. State transition diagram for a customer of class p until service preemption or completion.

HIDEAKI TAKAGI
Referring to Fig. 6, we have the complete set of m equations for {P p,k {Pr}; 0 ≤ k ≤ m − 1} as follows: where α p,k and β p,k (0 ≤ k ≤ m − 1) are given in Section 3. The solution is found as follows. By recursion we get where ξ k and η k are defined in Eq. (16). Then we get From the convention P p,m {Pr} = 1, we determine is the well-known Erlang's B formula [3, p. 80]. Thus we obtain We note that is the probability that the service for a customer of class p started after waiting is preempted (note that r 1 ≡ 0). The probability q p that the service for a customer of class p started without waiting is preempted can be found as follows. When his service is started there are k other customers of classes 1, 2, . . . , p with probability Then his service is preempted with probability P p,k {Pr}. Therefore we get Here we have .
Thus we can write [13] (note that q 1 ≡ 0) Similarly, let P p,k {Sr} be the probability that a tagged customer of class p competing for the servers with k other customers is completed without preemption, where k = 0, 1, 2, . . . , m − 1. Referring to Fig. 6, we have the complete set of equations for {P p,k {Sr}; 0 ≤ k ≤ m − 1} as follows: The solution is given by Then we can numerically confirm the relation as the probability that an arriving customer of class p is started service immediately upon arrival and his service is not preempted until completion. We can also confirm the relation as the probability that an arriving customer of class p is started service immediately upon arrival and his service is preempted before completion. Upon arrival of a tagged customer of class p, the following cases occur: • If less than m servers are busy for serving customers of classes 1, 2, . . . , p, his service is started immediately. This case occurs with probability 1 − C(m, mρ + p ). -If his service is not preempted, his waiting time is zero. This subcase occurs with probability 1 − q p . -If his service is preempted, he waits G + p−1 time units for his service to be resumed. This subcase occurs with probability q p . The resumed service is preempted i times with probability (1 − r p )(r p ) i (i = 0, 1, 2, . . .) with each preemption making him wait G + p−1 time units. • If m servers are busy for serving customers of classes 1, 2, . . . , p, he waits W + p time units for his service to be started for the first time. This case occurs with probability C(m, mρ + p ). His service is preempted i times with probability (1 − r p )(r p ) i (i = 0, 1, 2, . . .) with each preemption making him wait G + p−1 time units. Note that the LST of the DF for W + p is given in Eq. (26). Therefore, the LST of the DF for the waiting time of a tagged customer of class p is given by [10,13] The service for customers of the highest priority class p = 1 is never preempted so that we have as given in Eq. (13).
The mean waiting time for a customer of class p is given by .

M/M/m FCFS PREEMPTIVE-RESUME PRIORITY QUEUE 1961
We have numerically confirmed that this yields the same result as Eq. (4). The second moment of the waiting time for a customer of class p is given explicitly by This expression yields the same numerical values as those from the following expression derived by Zeltyn et al. [13]: The agreement of Eqs. (32) and (33) can be proved algebraically by using the relation [3, p. 92] .
The third moment of the waiting time for a customer of class p is given by where We plot E[W 2 p ] and E[W 3 p ] in Figs.7 and 8, respectively, for the numerical example described in Section 1. In Table 1, we show the difference in the mean and the second and third moments between the initial waiting time W • p and the waiting time W p for a customer of the lowest priority class p = 4.
For m = 1 (a single-server queue), we have  Then we get which yields 8. Service time. We are also interested in the total service time that each customer of class p receives before service completion in the M/M/m FCFS preemptiveresume priority queue. The total service time consists of several partial service times of two types, which we look at separately in the following. Let V * p,k (s) be the LST of the DF for the time to preemption for a customer of class p who competes for the servers with k other customers, where 0 ≤ k ≤ m − 1. Referring to Fig. 6, we have the complete set of m equations for {V * p,k (s); 0 ≤ k ≤ m − 1} as follows: We can obtain {V * p,k (s); 0 ≤ k ≤ m − 1} algebraically. We note that P p,k {Pr} = V * p,k (0) as given in Eq. (27)  By recursion as in Section 4, we get the relation Then we get which can be written as From the convention E[V p,m ] = 0, we determine We then get where P p,l {Pr} is given in Eq. (27). In particular, we have We next consider the second moment We can derive We then obtain where E[V p,l ] is given in Eq. (37). Let U * p,k (s) be the LST of the DF for the time to service completion for a customer of class p who competes for the servers with k other customers, where 0 ≤ k ≤ m−1. Referring to Fig. 6, we have the complete set of m equations for {U * p,k (s); 0 ≤ k ≤ m − 1} as follows: (s + λ + p−1 + µ)U * p,0 (s) = µ + λ + p−1 U * p,1 (s), [s + λ + p−1 + (k + 1)µ]U * p,k (s) = µ + λ + p−1 U * p,k+1 (s) + kµU * p,k−1 (s) 1 ≤ k ≤ m − 2, (s + λ + p−1 + mµ)U * p,m−1 (s) = µ + (m − 1)µU * p,m−2 (s).