We return now to discussion of the two-class queue, and to determining the LST of the stationary accumulated priorities at the time points that customers move into service. Once we have the LST for the stationary accumulated priority, we immediately also have the LST for the stationary waiting time, by a simple rescaling of the argument, since a customer of class \(i\) with accumulated priority \(v\) upon entry to service has waited for time \(v/b_i\) in the queue.
First consider the case where service times have the same distribution for the two classes, with \(B^{(1)} = B^{(2)}= B\) and common mean \(1/\mu = 1/\mu _1 = 1/\mu _2\). By Lemma 4.2, customers become accredited as a Poisson process with rate \(\lambda _1( 1 - b_2/b_1)\), so the duration of an accreditation interval has the same distribution as the busy period of an \(M/G/1\) queue with arrivals at rate \(\lambda _1(1-b_2/b_1)\) and service time distribution \(B\). It then follows from expression (10) that the duration of an accreditation interval has a LST that satisfies the functional equation
$$\begin{aligned} \widetilde{\Gamma }(s) = \widetilde{B} \left( s + \lambda _1 (1 - b_2/b_1) \left( 1-\widetilde{\Gamma }(s)\right) \right) . \end{aligned}$$
(17)
We shall employ this solution of Eq. (17) in a variety of contexts, and so we write its solution in terms of its parameters as \(\widetilde{\Gamma }(s;b_1,b_2,\lambda _1,B)\). Following Eq. (10), an alternative notation for this is \(\widetilde{G}(s;\lambda _1 (1 - b_2/b_1), B)\).
If the distribution \(B_0\) of the initial service time in the accreditation interval is different from the succeeding service times, which still have distribution \(B\), then for \(\widetilde{\Gamma }(s)\) satisfying (17), the length of the accreditation interval has LST given by
$$\begin{aligned} \widetilde{\Gamma }_0(s) = \widetilde{\Gamma }_0(s;b_1,b_2,\lambda _1,B,B_0)= \widetilde{B}_0\left( s + \lambda _1(1 - b_2/b_1)\left( 1-\widetilde{\Gamma }(s)\right) \right) . \end{aligned}$$
(18)
Following Eq. (11), an alternative notation for this is \(\widetilde{G}_0(s;\lambda _1 (1 - b_2/b_1), B,B_0)\). Taking derivatives and putting \(s=0\), or referring to Conway, Maxwell and Miller [5, page 151, Eqs. (7a), (9a)], we see that the mean duration of an accreditation interval of the form described by (17) is
$$\begin{aligned} \frac{1}{\mu -\lambda _1(1-b_2/b_1)} \end{aligned}$$
(19)
and the mean duration of an accreditation interval of the form described by (18) is
$$\begin{aligned} \frac{\mu }{\mu _0\left[ \mu -\lambda _1(1-b_2/b_1)\right] }, \end{aligned}$$
(20)
where \(\mu _0^{-1}\) is the mean of \(B_0\).
We would like to derive the distribution of the value \(\widehat{V}\) of the accumulated priority of a customer at the point that it enters service during an accreditation interval. Suppose the accreditation interval commences at time \(t_0\). Let \(V_\mathrm{init} = M_1(t_0) =M_2(t_0)\) denote the initial priority level in the accreditation interval. If the accreditation interval initiates a busy period for the queue, then \(V_\mathrm{init}=0\). However, if the accreditation interval does not initiate a busy period then \(V_\mathrm{init} > 0\) with probability one. Then the random variable \(\widehat{V}\) can be written as \(\widehat{V} =V_\mathrm{init}+V\) where \(V\) is any additional priority that the customer accumulates during the accreditation interval, after having accumulated priority \(V_\mathrm{init}\). To calculate the distribution of \(V\), we modify the delay cycle approach of Conway, Maxwell and Miller [5, p. 151] to obtain the following theorem.
Theorem 6.1
For an accreditation interval with parameters \(b_1, b_2\), \(\lambda _1\) and \(B,\) that starts at time \(t_0\) with initial priority level \(V_\mathrm{init}\), let \(\widehat{V} = V_\mathrm{init} + V\) denote the accumulated priority of customers at the point that their service starts.
-
1.
The distribution of \(V\), conditional on \(V_\mathrm{init}=v\), has LST
$$\begin{aligned} \widetilde{V}^*(s;b_1,b_2,\lambda _1,B)=\frac{(\mu - \lambda _1(1-\frac{b_2}{b_1}))(\widetilde{\Gamma }(b_2s)-\widetilde{B}(b_1s))}{(1-\frac{b_2}{b_1})(b_1s-\lambda _1(1- \widetilde{B}(b_1s)))} \end{aligned}$$
(21)
where \(\widetilde{\Gamma }(s) = \widetilde{\Gamma }(s;b_1,b_2,\lambda _1,B)\) is the solution of the functional Eq. (17).
-
2.
The random variable \(V\) is independent of \(V_\mathrm{init}\).
Proof
Let \(S_0\) denote the service time of the customer who initiates the accreditation interval and, for \(j = 0,1,2 \ldots \), recursively define \(S_{j+1}\) to be the time taken to serve customers who become accredited during the interval \((t_0 + \delta _{j-1}, t_0 + \delta _j]\) where \(\delta _j =\sum _{i=0}^j S_i\) and \(\delta _{-1}\) is equal to zero. Note that these customers must have attained priority level \(v\) during the interval \((t_0 + (1-b)\delta _{j-1},t_0 + (1-b)\delta _j]\), where \(b = b_2/b_1\). We shall denote the length of this interval by \(A_j\). For \(j = 0,1,2, \ldots \), define \(\alpha _j = (1-b)\delta _j\), \(H_j\) to be the distribution function of \(S_j\) and \(\widetilde{H}_j(s) = E\{e^{-sS_j}\}\). By Lemma 4.2, customers become accredited according to a Poisson process with parameter \(\lambda _1(1-b)\), and we readily obtain the fact that
$$\begin{aligned} \widetilde{H}_j(s) = \widetilde{H}_{j-1}(\lambda _1(1 - b)(1 - \widetilde{B}(s)). \end{aligned}$$
(22)
In a similar fashion to Conway, Maxwell, and Miller [5, pp. 152–155], consider a marked customer that attains priority level \(v\) in the interval \((t_0+\alpha _{j-1},t_0+\alpha _j]\) (so becomes accredited during the interval \((t_0+\delta _{j-1},t_0+\delta _j]\)), and condition upon \(S_j\), the residual duration \(Y\) of \((t_0+\alpha _{j-1},t_0+\alpha _j]\) at the time that the customer has priority level \(v\), and the number \(N\) of customers who attained priority \(v\) during \((t_0 + \alpha _{j-1},t_0 + \alpha _j]\) prior to the marked customer, with the region of feasibility for \((Y,S_j)\) being \(\mathcal{S} = \{(y,t):0 \le y \le (1-b)t,\ 0 \le t < \infty \}.\)
Given that \(Y=y\), the additional waiting time \(V/b_1\) of the marked customer is equal to \(y\), plus the \(N=n\) service times of the customers who attain priority \(v\) ahead of it in the interval \((t_0+\alpha _{j-1},t_0+\alpha _j]\), plus the difference between the time instant at the end of the interval, \(t_0 + \alpha _j\), and the time instant \(t_0 + \delta _j\). Thus
$$\begin{aligned} E\{e^{-sV/b_1}|S_j=t,Y=y,N=n\}&= e^{-sy} \widetilde{B}(s)^n E\{e^{-s(\delta _{j-1}+t -[\alpha _{j-1} + (1-b)t])}\}\nonumber \\&= e^{-sy} \widetilde{B}(s)^n e^{-s b t}E\{e^{-s b\delta _{j-1}}\}. \end{aligned}$$
(23)
Removal of the conditioning on \(N\) yields
$$\begin{aligned} E\{e^{-sV/b_1}|S_j=t,Y=y\}=e^{-sy} e^{-\lambda _1 ((1-b)t-y)(1-\widetilde{B}(s))} e^{-sb t}E\{e^{-s b\delta _{j-1}}\}. \end{aligned}$$
(24)
To remove the conditioning on \(S_j=t,Y=y,\) we apply the direct analogue to the last expression in [5, page 153], and integrate over the region \({\mathcal S}\) against the joint density \(dy dH_j(t)/[(1 - b)E(S_j)]\). Denoting by \(\Xi _j\) the event that the tagged arrival occurs in the interval \(S_j\) and paralleling the steps in Conway, Maxwell and Miller [5], we see that
$$\begin{aligned}&E\{e^{-sV/b_1}|\Xi _j\}\end{aligned}$$
(25)
$$\begin{aligned}&\quad =\frac{E\{e^{-s b\delta _{j-1}}\}\int _{t=0}^\infty e^{-s b t} e^{-\lambda _1(1 - b)(1- \widetilde{B}(s))t}\int _{y=0}^{(1- b)t} e^{-sy} e^{\lambda _1 y(1-\widetilde{B}(s))}dy dH_j(t)}{(1-b)E(S_j)}\nonumber \\&\quad =\frac{E\{e^{-s b\delta _{j-1}}\}\int _{t=0}^\infty e^{-sb t} e^{-\lambda _1(1 - b)(1-\widetilde{B}(s))t}(1-e^{-(1-b)t(s-\lambda _1+\lambda _1 \widetilde{B}(s))})dH_j(t)}{E(A_j)(s-\lambda _1(1-\widetilde{B}(s)))}.\nonumber \\ \end{aligned}$$
(26)
Evaluation of the final integral yields
$$\begin{aligned} E\{e^{-sV/b_1}|\Xi _j\}=\frac{E\{e^{-s(S_{j+1}+b\delta _j)}\}-E\{e^{-s(S_{j}+b\delta _{j-1})}\}}{E(A_j)(s-\lambda _1(1- \widetilde{B}(s)))}. \end{aligned}$$
(27)
Letting \(A=\sum _{i=0}^\infty A_i\) and \(S=\sum _{i=0}^\infty S_i\), and multiplying the conditional transform (27) by the probability \(P(j)=E(A_j)/E(A)=E(S_j)/E(S)\) that the marked arrival attains priority \(v\) during \((t_0+\alpha _{j-1},t_0+\alpha _j]\) and summing over \(j\), the intermediate terms cancel, yielding
$$\begin{aligned} E\{e^{-sV/b_1}\}=\frac{E\{e^{-sb S}\}-E\{e^{-s{S_0}}\}}{E(A)(s-\lambda _1(1- \widetilde{B}(s)))}. \end{aligned}$$
(28)
Since \(S\) is just the total length of the accreditation interval, we can substitute the solution of the functional equation (17), evaluated at \(s b\), for \(E\{e^{-s b S}\}\), and also use (19) to observe that \(E(A) = (1-b)/(\mu - \lambda _1(1-b)) \). Finally, remembering that \(S_0\) is the initial service time and multiplying the argument of the LST by \(b_1\), because that is the rate of priority accumulation, we obtain expression (21). \(\square \)
In most circumstances below, the service time distribution for the customer that initiates an accreditation interval will differ from that of the customers who continue it. The result for this slight variant of (21) is given in the next theorem.
Theorem 6.2
If the initial service time distribution \(B_0\) differs from the service time distribution of the subsequent customers within the accreditation interval, the LST of the priority accumulated during the interval is
$$\begin{aligned} \widetilde{V}(s;b_1,b_2,\lambda _1,B,B_0)=\frac{\mu _0(1 - \lambda _1(1-\frac{b_2}{b_1})/\mu )(\widetilde{\Gamma }_0(b_2s)-\widetilde{B}_0(b_1s))}{(1-\frac{b_2}{b_1})(b_1s-\lambda _1(1-\widetilde{B}(b_1 s)))}, \end{aligned}$$
(29)
where \(\widetilde{\Gamma }_0(s) = \widetilde{\Gamma }_0(s;b_1,b_2,\lambda _1,B,B_0)\) in (18).
If \(B^{(1)} \ne B^{(2)}\) then accreditation intervals are all periods of the kind considered in Eq. (18) and Theorem 6.2, with \(B = B^{(1)}\). An accreditation interval starting a busy period at time \(t_0\) with \(M_1(t_0) = M_2(t_0) = v = 0\) has \(B_0=B_0^{(2)}\). On the other hand, an accreditation interval starting in the middle of a busy period with \(M_1(t_0) = M_2(t_0) = v > 0\) has \(B_0 = B_2^{(2)}\). We will denote the LSTs of the distributions of the lengths of these accreditation intervals by, respectively, \(\widetilde{\Theta }_0^{(1)}(s) =\widetilde{\Gamma }_0(s;b_1,b_2,\lambda _1,B^{(1)},B_0^{(2)} )\) and \(\widetilde{\Theta }^{(1)}(s) =\widetilde{\Gamma }_0(s;b_1,b_2,\lambda _1,B^{(1)},B_2^{(2)})\), both interpreted as in Eq. (18).
The LST of the overall busy period distribution follows from the observation in Remark 4.1 that it can be considered as an accreditation interval with \(V_\mathrm{init}=0\), arrival rate \( \lambda _2 + \lambda _1b_2/b_1\), priority rates \(b_2\) and 0 (rather than \(b_1\) and \(b_2\) respectively), and service time distributions \(\Theta ^{(1)}\) and \(\Theta _0^{(1)}\) (rather than \(B\) and \(B_0\), respectively).
Thus, we can write the LST of the distribution of the length of this busy period as \(\widetilde{\Gamma }_0(s;b_2,0,\lambda _2 + \lambda _1b_2/b_1,\Theta ^{(1)},\Theta _0^{(1)})\) as defined in Eq. (18). It is readily shown, after straightforward algebra and substitutions, that the implicit equation for this busy period LST yields an expression that is identical to that for an FCFS M/G/1 queue with both classes of customers, as one would expect.
The LST of the stationary accumulated priority of the non-accredited customers at the time that they enter service, conditional on it being positive, also follows from the above observation. It is given by the accumulated priority distribution with parameters \(b_2, 0, \lambda _2 + b_2\lambda _1/b_1, \Theta ^{(1)}\) and \(\Theta _0^{(1)}\). That is,
$$\begin{aligned} \widetilde{V}^{(2)}(s) = \widetilde{V}(s;b_2,0,\lambda _2 + b_2\lambda _1/b_1,\Theta ^{(1)},\Theta _0^{(1)}) \end{aligned}$$
(30)
in the sense of Eq. (29). Class 2 customers must, of necessity, be non-accredited when they enter service and, by Remark 4.1, the class of such a customer is independent of its priority. Also by Remark 4.1, class 2 customers who start service with priority \(v\) have been in the system for time \(v/b_2\). Thus the LST of the stationary waiting time for class 2 customers is given by the weighted sum of the LSTs of zero and \(\widetilde{V}^{(2)}(s/b_2)\),
$$\begin{aligned} \widetilde{W}^{(2)}(s) = (1-\rho ) + \rho \widetilde{V}^{(2)}(s/b_2). \end{aligned}$$
(31)
A class 1 customer experiences one of the following outcomes:
-
1.
It arrives to an empty queue.
-
2.
It arrives to a non-empty queue, and is not accredited when it enters service. Since, by Theorem 3.2(3), the class of a non-accredited customer is independent of its priority, in this case the LST of its stationary accumulated priority on entering service is \(\widetilde{V}^{(2)}(s)\), given by equation (30).
-
3.
It enters service during the first accreditation interval of the busy period, in which case its stationary priority has LST
$$\begin{aligned} \widetilde{V}^{(1,0)}(s) = \widetilde{V}(s;b_1,b_2,\lambda _1,B^{(1)},B_0^{(2)}) \end{aligned}$$
(32)
in the sense of Eq. (29).
-
4.
It enters service during an accreditation interval which is started by an unaccredited customer of either class, with priority \(V_\mathrm{init}>0\), in which case the extra priority that the arriving customer accumulates above \(V_\mathrm{init}\) before it enters service has LST
$$\begin{aligned} \widetilde{V}^{(1,1)}(s) = \widetilde{V}(s;b_1,b_2,\lambda _1,B^{(1)},B_2^{(2)}) \end{aligned}$$
(33)
again in the sense of Eq. (29). Furthermore, this extra priority is independent of \(V_\mathrm{init}\), which is distributed according to a random variable with LST \(\widetilde{V}^{(2)}(s)\), because \(V_\mathrm{init}\) is the priority of the non-accredited customer entering service at the beginning of the accreditation interval.
By Lemma 4.2, class 1 customers become accredited at rate \(\lambda _1(1-b_2/b_1)\) when the queue is non-empty, while they arrive at rate \(\lambda _1\), so the probability that an individual class 1 customer, arriving during a busy period, becomes accredited is \((1-b_1/b_2)\), while the probability that it enters service while unaccredited is \(b_2/b_1\). Using the fact that class 1 customers arrive according to a Poisson process and so observe time averages, we derive the fact the stationary probability that a customer finds the queue empty is \(1-\rho \), the probability that it begins its service as an unaccredited customer is \(\rho b_2/b_1\). The probability that a customer is accredited is \(\rho (b_1-b_2)/b_1\). To derive the probabilities of the third and fourth cases, that is whether a customer is accredited during the first accreditation interval of a busy period or a subsequent one, we need to calculate the ratio of the mean length of the first accreditation interval to the mean length of the whole busy period. By (19) and (20), this is \((1-\rho )/(1-\sigma _1)\) where \(\sigma _1=\rho _1(b_1-b_2)/b_1\). So the probabilities of the third and fourth categories are
$$\begin{aligned} \frac{\rho (1-\rho )(b_1-b_2)}{b_1(1-\sigma _1)} \end{aligned}$$
(34)
and
$$\begin{aligned} \frac{\rho (\rho -\sigma _1)(b_1-b_2)}{b_1(1-\sigma _1)}, \end{aligned}$$
(35)
respectively. So we finally arrive at the conclusion that the LST of the distribution of the priority of a class 1 customer when it enters service, conditional on this being positive, is
$$\begin{aligned} \widetilde{V}^{(1)}(s)&= \frac{b_2}{b_1}\widetilde{V}^{(2)}(s) + \frac{(1-\rho )(b_1-b_2)}{b_1(1-\sigma _1)}\widetilde{V}^{(1,0)}(s)\nonumber \\&+ \frac{(\rho -\sigma _1)(b_1-b_2)}{b_1(1-\sigma _1)}\widetilde{V}^{(2)}(s)\widetilde{V}^{(1,1)}(s), \end{aligned}$$
(36)
and the LST of the waiting time is
$$\begin{aligned} \widetilde{W}^{(1)}(s) = (1-\rho ) + \rho \widetilde{V}^{(1)}(s/b_1). \end{aligned}$$
(37)