WAITING TIME ANALYSIS FOR MX/G/1 PRIORITY QUEUES WITH/WITHOUT VACATIONS UNDER RANDOM ORDER OF SERVICE DISCIPLINE

We study MX/G/1 nonpreemptive and preemptive-resume priority queues 
with/without vacations under random order of service (ROS) discipline 
within each class. By considering the conditional waiting times given the 
states of the system, which an arbitrary message observes upon arrival, we 
derive the Laplace-Stieltjes transforms of the waiting time distributions 
and explicitly obtain the first two moments. The relationship for the 
second moments under ROS and first-come first-served disciplines extends 
the one found previously by Takacs and Fuhrmann for non-priority single 
arrival queues.


Introduction
An M/G/1 queue is a fundamental model in queueing theory.Messages arrive at a buffer of infinite capacity according to a Poisson process, each being served in accordance with a generally distributed service time.A single server-works contin- uously until the system becomes empty.So far, many variants of the M/G/1 queue have been studied (Cooper [4], Kleinrock [18,19], Wakagi [26]).Our objective is the derivation of the first two moments for the waiting time of an arbitrary message of class p (p 1,2,...,P) in the above six cases.First, in Section 2 we derive the queue size distribution for the messages of class p at the beginning of service to a message of class p.In Section 3, we consider the waiting time distributions conditioned on the system state when an arbitrary message of class p arrives.They are used in Section 4 to calculate the first two moments of the waiting time for the arbitrary message of class p.The results are compared for different models in Section 5, and numerical examples are presented in Section 6.In Section 7, we summarize the work, and make a discussion on further results that can be derived straightforwardly from the present results.
Throughout this paper we assume that the system for each case is unsaturated (Section 3.1 in Takagi [26]), namely the existence of the steady state for all classes in the system.(This assumption is removed in a remark made in Section 7.) Furthermore, for the sake of convenience, we call the set of all priority classes higher than class p, an H-class; that lower than class p, an L-class; and a set of messages included in a batch, a supermessage.We introduce the following notation: ,p arrival rate of batches of class p (p 1,..., P), P ,p, " 2= ,p+ arrival rate of batches of H-class and class p P lk), A" arrival rate of batches of L-class k p + V length of a vacation, V*(s) Laplace-Stieltjes transform (LST) of the distribution function (DF) for V, I length of an idle period, I*(s) LST of the DF for I, gp, n probability that the batch of class p is n, Gp(z) generating function (GF)for gp, n, G)(z)first derivative of Gp(z), gp mean batch size of class p, g(i), ith factorial moment of the batch size of class p, B;*p(S) LST of the DF for the service time of a message of class p, b p mean service time of a message of class p, b (i) ith moment of the service time of a message of class p, , P Bg, p(s) LST of the DF for the service time of a supermessage of class p bg, p mean service time of a supermessage of class p gpbp), b ith moment of the service time of a supermessage of class p, b2, (2)b2p + gpb(p 2) p gp b(g3,) (3)b3 + 3g(p2)bpb (2) + gpb (3)  @p-1 length of the delay cycle generated by messages of H-class, whose initial delay is the service time of a batch of messages of//-class, Og+,p-I(X) DF for Og+,p_ 1, OgT, p_ 1(8) LST of Op_ l(X), o;( 1 W*p(s) LST of the DF for the waiting time of an arbitrary message of class p, E[W ith moment of the waiting time of an arbitrary message of class p, E[ .e xpected value of a random variable.
We note that the LST Og+,p_ 1(8) satisfies the equation OgT, p 1(s) BgT, p 1[ 8 + Ap+-I ApT-lOg+,p- 1(8)] (1) and that the first three moments of (R):p_ 1 are given by b:p-1 In this section, we derive the probability generating function (PGF) for the queue size of messages of class p at the beginning of service given to a message of class p in the steady state, denoted by (p(Z).The latter will be needed in Section 3.7 when the waiting time of an arbitrary message of class p is considered.We will apply the same approach to all our models.Note that the queue size distribution is invariant to the order of service as long as the service discipline selects customers in a way that is inde- pendent of their service time (Section 3.4 in Kleinrock [19]).Thus we can utilize the results for the FCFS system given by Takagi and Takahashi [28].
In order to derive p(z), we consider a tagged message of class p, denoted by M, and the supermessage, denoted by SM, to which M belongs.At the beginning of service of M, the following three types of messages of class p may exist in the queue (Figure 1).
(a) Messages that arrive during the waiting time of SM.
(b) Messages that arrive during the waiting time of M while the SM is in service.
(c) Messages that belong to SM but have not been served by the time of service of M. Let W g, p(8) be the LST of the waiting time of the SM, to which M belongs.Then the PGF for the number of (a)-messages is given by W*g,p[1p-IpGp(z)] (Section 5.5 in Kleinrock [18]).Let Dp(z) be the PGF for the sum of the numbers of (b) and (c)-messages.Dp(z)is derived in the same way for all our models.First we place the condition that the batch size G of SM is n.It then occurs with probability 1In that the number G_ of messages, which belong to SM and are served before M, is and that the number G+ of messages which are served after M is j, where + j + 1 -n.Since the probability that G-n is given by ngp, n/gp, we have Prob[G i, G + j] gp' + j + 1 + j O, 1 gp Therefore, we obtain:  ,p_l [ap apGp(z)].
From the expressions for Wg, p(8) given in [26,28] for the FCFS systems and Dp(z) in (4), the expressions for (p(z)in our models are derived as follows.
NPNV PRNV NPMV (1 Apgp{Bp[o'p_ l(Z)]-z} "vv [%-1 3. Conditional Waiting Times In this section we show preliminary results for the analysis of the waiting time W p of a tagged message M of class p, which is defined as the time interval from its arrival to the beginning of service.We first partition the time axis into several periods of system states for the non-preemptive models in Section 3.1 and for the preemptive- resume models in Section 3.2.Then we derive the LST and the first two moments of the DF for the conditional waiting time when the tagged message arrives during each of these periods in Sections 3.3 through 3.7.
3.1 Classification of the System States for Non-Preemptive Models In non-preemptive models, we call the duration in which the server is neither busy nor taking a vacation an idle period.M arrives as a member of a batch during an idle period.It has a chance to be selected for service (called eligible hereafter) immediately.Because the length I of an idle period is exponentially distributed with mean l/h, I*(s) and Eli] are given by I*(S)-s+A, If M arrives when the server is busy (or taking a vacation), it must wait at least until the server finishes the current service (or the vacation) and all messages of H- class leave the system.Such a period is called a delay cycle [26].Consider a delay cycle of length T, called a T-period, with its initial delay denoted by T o.If T*(s) and T(s) denote the LSTs of the DFs for T and To, respectively, we have [26] T*(s) T[s + p+-I ,p-4-_ 1OgT, p_ l(S)], (14a) )4 (1 Pp+_l (1 PT_ 1 A non-idle period is partitioned into the following disjoint sets of T periods (Figure 2).U-period, which begins with a vacation, and ends when the server has exhaustively served messages of H-class.H-period, which begins when a batch of messages of H-class arrives to find the server idle, and ends when the server has exhaustively served messages of H-class.
Lk-period which is initiated by the service to a message of class k (k-p + 1,..., P), and terminated when the server has exhaustively served messages of H-class.C-period, which begins with the service to a message of class p, and ends when the server has exhaustively served messages of H-class.The service periods for the non-preemptive models.
The LSTs of the DFs for the initial delays for the above periods are respectively given by U-period We denote the LSTs of the DFs for the above periods by U*(s), H*(s), L*k(s (k-p+ 1,...,P), and C*p(S), respectively.Note that H*(s)equals @g+,p_l(S)and that C*p(S) represents the LST of the DF for a completion time Cp (Gaver [10]) of a message of class p.
These are obtained by substituting the LSTs for the corresponding initial delays into T(s)in (14a).
3.2 Classification of the System States for Preemptive-Resume Models In preemptive-resume models, the service to a message is preempted upon the arrival of a batch of a higher priority.Since a message M of a given class is never delayed by the service of any lower-class message, we can neglect lower-class messages in the analysis for M. Thus there are no L/c-periods in the system.
We define the following periods for the preemptive-resume models (Figure 3).
Idle period, which begins when there are no messages of class p and H, and continues as long as the server is neither busy nor taking a vacation, or serving a message of L-class.U-period, which begins with a vacation and ends when the server has exhaustively served messages of H-class.H-period, which begins when a batch of messages of H-class arrives in an idle period, and ends when the server has exhaustively served messages of H-class.C-period, which begins with the service to a message of class p, and ends when the server has exhaustively served messages of H-class.Note that each of a U-period, an H-period, and a C-period has the same distribution as each of those in the non-preemptive models.For the idle period in this case, I*(s) and E[I] are given by I*(s)-Ap+ (15) 3.3 Conditional Waiting Time When M Arrives During an Idle Period When M .arrivesduring an idle period, M is eligible for service upon arrival.Let W p, m be the waiting time of M from the epoch when M is eligible for service, on the condition that there are m messages of class p, excluding M, in the system at that epoch.If M is selected for next service immediately, which occurs with probability 1/(m+ 1), the waiting time is zero; otherwise M is delayed, which occurs with probability m/(m + 1), and it will be served after the completion time of class p (Figure 4).By conditioning that j messages of class p arrive during the completion time, we have the following recurrence relation for the LST Wp, m(S of the DF for W p, rn W* 1 m E C* * P, m(s) m+ 1 +m+ 1 P,J(8)Wp, m+J -1(8)' This is an extension of Kingman's result [17] for the non-priority model.By follow- ing Takgcs [24], we obtain the first two moments of Wp, m as follows" mE Next, we derive the PGF II z) for the number IIp than M, that arrive in the same batch as M. Since (m + 1)gp, m + 1 r/p, m" Prb[n/p m] = 0(J + 1)gp, j +1 (m + l)gp, m + l We thus obtain the LST of the DF for the conditional waiting time of M when it arrives during an idle period"  The tagged message M must wait until the end of the U-period during which it arrives.Let x be the length of the U-period.First, we derive the waiting time for a given x.It consists of the period of time until the end of the U-period whose LST of the DF is denoted by Wlp(s IV, x), and the time thereafter until the start of service of M whose LST of the DF is denoted by W2p(S U, x) (Figure 5).They are independent of each other being conditioned on x.Note that Wp(S U, x)is the LST of the DF for the remaining time of a U-period of length x (Section 5.7 in Cooper [4] and Section 5.2 in Kleinrock [18]).Thus it is given by x

Server
When the U-period ends, M is eligible for service.Messages of class p in the system at this epoch consist of those messages that have arrived together with M in a batch and those arriving during the length x of time.Let II/pI(x) be the number of messages of class p, excluding M, in the system when the U-period of length x ends.II(z Ix) for Ip(m(X') Prob[II/pI(x) rn] is Then the GF IIp  The product of ( 19) and ( 21) yields E[e P lU, x].Since the probability that a message arrives during the U-period of length x is proportional to x as well as to the relative frequency of such a length given by dU(x)(Section 5.2 in Kleinrock [18]), after normalizing properly, we obtain -.W / .xdU(')f xdOg, p_ l(X). 1 -sex orp,IIm(x)W;,m(8), where II rp, m(X is given in (20a).where rp, mlI (x)is given in (20a).
(24)  C m(X) denotes the probability that there are m messages of class p, excluding where 7rp, M, in the system when the C-period of length x ends.Let HpC(z Ix) be its GF.HpC(z Ix) is given by the product of the following three PGFs.The first is p(Z), the PGF for the number of messages of class p in the system when the C-period starts, namely, when the service to a message of class p is started; it is given in Section 2 for )V[1-Gp(Z)]X the individual models.The second is e which is the PGF for the number of messages of class p arriving during the C-period of length z, excluding the batch which M belongs to.The third is Gl(z)/gp 'r which is the PGF for the ber of messages arriving with M in a batch, excluding M. where Hp (z Ix)is given in (20a). (26)

Waiting Times
In the following subsections, we derive the unconditional LST W*p(s) of the DF for the waiting time W p of an arbitrary message of class p and its first two moments for each model.To do so, we first obtain the probabilities that the system is at a random point in time during each period of the state defined in Section 3.Because of PASTA (Poisson arrivals see time averages,see Section 11.2 of Heyman and Sobel [11]), we can then derive the unconditional waiting time from the conditional waiting times for each model.

NPNV
In the NPNV model, the system can be in an idle period, an H-period, an Lk-period or a C-period.Note that a whole busy period consists of H-periods, L/c-periods and C- periods.Those epochs when the system becomes empty are regenerative points (Section 6.4 of Heyman and Sobel [11]), and a pair of an idle period and a busy period appears exactly once between any two successive regenerative points.Hence, from the ratio of the mean lengths of both periods, we have 1 Prob[idle]= -1 p. (27a) 1 gb An H-period appears once per busy period if a batch probability ,p-4-_ 1/, when the system is idle.Thus of H-class arrives with " ?-1 b g + , , p -1 flp+-I tip-4-_ 1 (1 p) Prob [H]  (27b) From (27a) and (27b), the remaining probabilities should sum to P Pp+-1(1 P) Pp-1 Noting that each group of messages of class p or L-class starts a C-period or an L k- period, we have the ratio Prob [C] Prob[Lp + 1] """ Prob[Lp] Apgp.bp:Ap+ lgp+ 1 .bp+ 1"" "Apgp.bptOp: tOp + 1"" "tOP

1-pp+_l
From (lS), ( 23), ( 24), ( 25) and ( 27), we can compute W*p(S)and the first two moments as follows: W*p(S) (1   In the PRNV model, the system can be in an idle period, an H-period, or a C-period. The probability that the server is not busy at an arbitrary epoch is 1-p, and the probability that a message of L-class is in service at an arbitrary epoch is pp Hence we have Prob[idle] (1 p)+ p 1 pp+. (29a) The probability that the system is in a C-period equals that in the NPNV model.

P?-I(1 pv + ).E[e-wp H] + PP E[e-Wp C],
1-pp+-I 1-pp+-I (30a) E[Wp] 2gp(1 pp-t-_ 1) + 2(1 pp-+ )(1 tip+-1)' + (2) zpgpb(p2) In multiple vacation models, if the server returns from a vacation to find no messages waiting, it begins another vacation immediately.A regenerative point in such systems is an epoch at which the system is empty and a vacation begins.The time interval between two such successive regenerative points is called a regeneration cycle (Section 2.2 of Takagi [26]), whose length is denoted by V c.The LST V(s) of the DF and the mean for V c are given by V(s where O(s)-(R)g+,,p(S) is the LST of the DF for the length (R)g of a busy period gener- ated by all messages, and it satisfies the equation In the NPMV model, the system can be in a U-period, an Lk-period or a C-period.
Since a U-period appears exactly once in a regeneration cycle, we get By the similar argument as in Section 4.1, we obtain Prob[Lk]_ Pk k-p + 1,...,P 1-pp+_l

1-pp+_l
The results in ( 22), ( 24), (25), and (32) yield W*p(S) and the first two moments as follows: (-LI-+ (1-+_1 (1-+_ 1(-+_1-+) 4.4 PRMV In the PRMV model, the system can be in an idle period, a U-period, an H-period or a C-period.The probabilities that the system is in either of a U-period or a C-period equal those in the NPMV model of Section 4.3:

1-pp+_l
Since an idle period corresponds to the time for service of messages of L-class, we have Prob[idle]-p-, Prob[H] p+-lP-. (34d)

Comparison of the Moments
In this section we compare the results obtained for the individual models in Section 4.

Comparison Between ROS and FCFS Systems
For each model, the mean waiting time under ROS equals that under FCFS; this is obvious from Little's formula (Little [20]) and the fact that the queue size distribu- tion is invariant.
We can also derive the following relationship on the second moments between ROS and FCFS disciplines for each priority class common to all models: This relation extends the result for the non-priority, single arrival model, which was originally derived by Takcs [24] and later interpreted by Fuhrmann [8].We note that Fuhrmann's argument does not apply to batch arrival models.Therefore, the relation in ( 41) is established for batch arrival priority models for the first time in this paper.

Comparison Between Non-Preemptive and Preemptivelsume Systems
Comparing ( 28) with (30), the results for the PRNV model can be derived by setting A/c 0 (k p+ 1,...,P) in the results for the NPNV model; this is because the existence of L-class messages has no influence on the waiting time of a message of class p.However, the above never holds for the vacation models, because a sequence of vacations or an idle period may be terminated by the arrival of L-class messages.
These observations are also made under FCFS [28].

Comparison Between Systems Without Vacations and With Vacations
The moments of the waiting times in vacation models have some terms common to those in non-vacation models.Although the service of a message, which finds the system idle, starts upon its arrival in non-vacation models, it does so after the residual time of a vacation in vacation models.This explains the difference in the moments for the two models.Therefore, as p gets closer to 1, namely as the probability that a message arrives during a vacation gets smaller, the waiting time distribution gets closer to that of the model without vacations.A similar argument is given by Kella and Yechiali [15].

Numerical Examples
In this section, we present some numerical examples.First, Figures 6 and 7 display the mean and the coefficient of variation of the waiting time as a function p for three non-preemptive models, where the ratio of the arrival rates among different classes is fixed.These figures show the behavior concerning class 1 and class 4 so that we can clearly see the difference among classes.We obtain the numerical results under the following scenario: number of classes ratio of arrival rates service time for messages of class 1 service time for messages of class 2 service time for messages of class 3 service time for messages of class 4 batch size for messages of class 1 batch size for messages of class 2 batch size for messages of class 3 batch size for messages of class 4 vacation time 4 1: "2: z3:A4 1: 1: 1:1 3-stage Erlang distribution with mean 0.5 constant of length 0.5 2-stage Erlang distribution with mean 0.5 exponential distribution with mean 0.5 geometric distribution with mean 2 constant of size 2 uniform distribution with mean 2 constant of size 2 2-stage Erlang distribution with mean 1.0 In Figure 6, we observe the following relationship: E[Wp]NV <_ E[Wp]sV <_ E[Wp]MV, while in Figure 7, we get the reverse relationship about the coefficient of variation of the waiting time.These relationships also hold for the preemptive-resume models.
Next, Figures 8 and 9 show the mean and coefficient of vacation of the waiting time as a function of p for the NPNV model, where we assume the same scenario as in Figures 6 and 7   Figures 10 and 11 show the mean and the coefficient of variation of the waiting time as a function of g2 for the NPNV model, where we assume that Pl P2 P3-P4 0.1, that the batch size of class 2 is constant, and that the scenario is otherwise the same as in Figures 6 and 7   From these figures, we establish the following interesting behavior.In the case where p is small and the mean batch size of a higher class is larger than that of a lower class, the mean waiting time of the higher class can be larger than that of the lower class.This is because the service to a tagged message may be delayed by other messages which belong to the same supermessage.Note that this never occurs in

Figure 3 :
Figure 3: The service periods for the preemptive-resume models.

Figure 4 :
Figure 4: The conditional waiting time when M is not selected with prob.m/(m + 1).
Waiting Time When M Arrives During a U-Period

Figure 5 :
Figure 5: The conditional waiting time when M arrives during a U-period of length x.

Figure 6 :
Figure 6: The mean waiting time in non-preemptive models

Figure 7 :
Figure7: The coefficient of variation of the waiting time in non-preemptive models. .

Figure 8 :
Figure 8: The mean waiting time in the NPNV model.

Figure 9 :
Figure 9: The coefficient of variation of the waiting time in the NPNV model. .

Figure 10 :
Figure 10: The mean waiting time vs. g2 in the NPNV model.

Figure 11 "
Figure11" The coefficient of variation of the waiting time vs. g2 in the NPNV model.
Conditional Waiting Time When M Arrives During an H-Period By an argument similar to the one that led to (22), we can derive E[e