1
QUEUE LENGTH DISTRIBUTION IN A FIFO SINGLE-SERVER QUEUE WITH MULTIPLE ARRIVAL STREAMS HAVING DIFFERENT SERVICE TIME DISTRIBUTIONS Tetsuya Takine Department of Applied Mathematics and Physics Graduate School of Informatics, Kyoto University Kyoto 606-8501, Japan phone: +81-75-753-4758 fax: +81-75-753-4756 e-mail:
[email protected] Abstract This paper considers the queue length distribution in a class of FIFO single-server queues with (possibly correlated) multiple arrival streams, where the service time distribution of customers from each arrival stream may differ from one another among streams. It is widely recognized that the queue length distribution in a FIFO queue with multiple non-Poissonian arrival streams having different service time distributions is very hard to analyze, since we have to keep track of the complete order of customers in the queue to describe the queue length dynamics. In this paper, we provide an alternative way to solve the problem for a class of such queues. We characterize the stationary joint queue length distribution in terms of the joint probability generating function, by considering the joint distribution of the number of customers arriving from each stream during the stationary attained waiting time. Further we provide recursion formulas to compute the stationary joint queue length distribution, the stationary distribution of the total number of customers and the marginal distribution of the number of customers from a particular stream.
Subject Classification: Queue, Algorithm: queue length distribution in a FIFO queue with multiple arrival streams having different service time distributions.
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
2
This paper considers the queue length distribution in work-conserving FIFO single-server queues with multiple arrival streams. An analytically tractable model of such a queue is
P M =GI = i
i 1 queue,
i.e., all arrival streams follow independent Poisson processes and the service time distribution of customers from each arrival stream are i.i.d. (independent and identically distributed) which may differ from one another among streams. In this model, the dynamics of the total number of customers can be formulated as a M=GI=1 queue. Let P denote the number of arrival streams and Hk3 (s) (k = 1; . . . ; P ) denote the LST (Laplace-Stieltjes transform) of the service time distribution of customers from the
kth stream with arrival rate k . Then the probability generating function of the stationary distribution of the total number Y of customers in the system is given by (Wollf 1989)
E [z Y ] =
(1 0 )(z 0 1)
z0
P X k k =1
P X k k=1
Hk3( 0 z )
Hk3( 0 z )
where denotes the overall utilization factor and =
jzj 1;
;
PP . k =1 k
Further the probability generating
function of the stationary joint distribution of queue lengths Yk (k = 1; . . . ; P ) of customers from stream k is found to be
!X P
P X k
!
P X k 3 (1 0 ) z 0 H 0 1 k zk k k i h Y1 k k =1 =1 =1 Y k E z1 1 1 1 zPP = ; ! P P P X X X k k 3 zk 0 H k 0 k z k k=1 k=1 k =1
jzk j 1 (k = 1; . . . ; P ):
Note also that the probability generating function of the stationary joint queue length distribution satisfies (Keilson and Servi 1988)
E
h
z Y1 1
111
i
zPYP =
W
3
0
P X k=1
k zk
!X P
!
P X k 3 H k 0 k z k ; k=1 k=1
jzk j 1 (k = 1; . . . ; P );
where W 3 (s) denotes the LST of the stationary waiting time distribution (which is identical among all streams due to the PASTA property (Wolff 1992)):
W 3(s) =
(1 0 )s
s0+
P X k =1
3
k Hk (s)
;
Re(s) > 0:
Note that those simple analytical results come mainly from three facts: (i) Poisson process is closed under superposition, i.e., the superposition of independent Poisson processes with rates k (k = 1; . . . ; P ) is a Poisson process with rate , (ii) the superposed arrival process and service times are independent,
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
3
i,e, given an arrival, the probability that this customer is from stream k is equal to k =, independent of the superposed arrival process, and (iii) the PASTA property (Wollf 1982). Now we consider a FIFO single-server queue with multiple non-Poissonian arrival streams. If the service times of customers from all streams are i.i.d., the problem is reduced to characterize the superposed arrival process, and the resulting queue is formulated as a G=GI=1 queue in general. A certain class of arrival processes such as MAP (Markovian arrival process) introduced by Lucantoni, Meier-Hellstern and Neuts (1990) is closed under superposition, i.e., the superposition of independent
MAP ’s can be represented by MAP . Thus for such a class of arrival processes, the waiting time distribution and the distribution of the total number of customers can be analyzed in the same way as the queue with a single arrival stream with i.i.d. service times. Contrary, when the service time distributions of multiple non-Poissonian streams differ from one another, the analysis of such queues is not so easy, since the superposed arrival process and service times are dependent. For example, let us consider a FIFO single-server queue with two independent arrival streams, one of which is a Poisson arrival stream with i.i.d. exponential service times with 1 mean 0 1 and the other is a two-stage Erlang arrival stream with i.i.d. exponential service times with
1 mean 0 2 , where 1 = 2 . Even though the system dynamics can be formulated as a continuos6
time Markov chain by keeping track of the type of customers (i.e., from which stream each customer arrives) in the waiting line and the service position, the structure of this Markov chain is terribly complicated and therefore it is formidable to obtain the stationary distribution from this formulation. Thus an analytical treatment in full generality to characterize queues with multiple non-Poissonian arrival streams having different service time distributions had not been reported for a long time until Takine and Hasegawa (1994a) showed simple formulas for work in system in a MAP=G=1 queue with statedependent service times (see (7) below). Thus, with the result in Takine and Hasegawa (1994a) and Little’s law, we can obtain the mean queue length. To the best of our knowledge, however, no analytical results on higher moments of the queue length or the queue length distribution itself in the
MAP=G=1 queue with state-dependent service times have not been available so far. Related studies on work in system (or waiting time) in queues with multiple non-Poissonian arrival streams having different service time distributions can be found in Asmussen (1991), Machihara (1993), Takine (1996b) and Zhu and Prabhu (1991). Regterschot and de Smit (1986) consider the MMP P=G=1 queue with state-dependent service times and derives analytical expressions for the LST of the waiting time distribution and the probability generating function of the distribution of the total number of customers
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
4
by a matrix factorization method which heavily relies on complex plain methods. Note also that the queue length and the waiting time distributions in such a queue under priority disciplines has been analyzed by Sugahara et al. (1995), Takine (1996a) and Takine (1998). In this paper, we consider the queue length distribution in a work-conserving FIFO single-server queue with (possibly correlated) multiple non-Poissonian arrival streams, where the service time distribution of customers from each arrival stream may differ from one another among streams. In par-
MAP with representation (C ; D1 ; . . . ; D P ), where C and D k (k = 1; . . . ; P ) are M 2 M matrices whose (i; j )th elements are denoted by Ci;j and Dk;i;j , respectively (He 1996). In the marked MAP , the infinitesimal generator of the underlyticular, we assume that the arrival process is a marked
D, where C has negative diagonal elements, and off-diagonal elements in C and all elements in D ing continuous-time Markov chain which governs customer arrivals is given by
C + D1 +
111
+
P
k
(k = 1; . . . ; P ) are non-negative. Note that
C + D) e = 0;
(1)
( where
D= and
e denotes an M
2
k =1
D; k
1 vector whose elements are all equal to one. We assume that the Markov
chain represented by the infinitesimal generator
D
P X
C + D is positive recurrent. When a state transition
k arrives to the system. Hereafter we call customers from stream k (k = 1; . . . ; P ) class k customers. Let N(x;y ] (k ) denote the number of class k customers arrivals during an interval ( x; y ]. Then the (i; j )th element of driven by
k
(k = 1; . . . ; P ) occurs, a customer from stream
"
exp represents
C+
P X k=1
! #
zk Dk x
h
i
E z1N(; +x] (1) 1 1 1 zPN(; +x] (P ) 1fS +x =j g j S = i ; where St denotes the state of the underlying Markov chain at time t and 1fg denotes the indicator function of event . Note that when
P = 1, marked MAP is reduced to MAP . For the details of
the marked MAP , readers are referred to He (1996). Throughout the paper, matrices and vectors are denoted in bold capital letters and bold small letters, respectively. We assume that service times of class k (k = 1; . . . ; P ) customers who arrive with the transition from state i to state j are i.i.d. according to a distribution function Hk;i;j (x) with mean hk;i;j . We define
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
D (x) (k = 1; . . . ; P ) as an M 2 M matrix whose (i; j )th element D k
k;i;j
D
k;i;j
(x) = D
k;i;j
H
k;i;j
(x);
5
(x) is given by
k = 1; . . . ; P; i; j = 1; . . . ; M:
Let D 3 (s) (k = 1; . . . ; P ) denote the LST of D (x): k
D 3 (s) =
Z1 0
k
0
k
e0 dD (x);
Re(s) > 0; k = 1; . . . ; P:
sx
k
At a glance, the service time structure for each arrival stream might look unnecessarily complicated. However, the above dependency between an arrival process and service times naturally arises in the superposition of independent MAP streams having different service time distributions. Readers are referred to Takine and Hasegawa (1994a) which gives a simple example of such a case. Note also that MAP is weakly dense in simple stationary point processes (Asmussen and Koole 1993). Thus, approximately with any desired accuracy, our formulation is capable for representing any FIFO singleserver queue with multiple stationary arrival streams, each of which has i.i.d. service times whose distribution may differ from one another among streams. For simplicity in description, let D (x) be
X D(x) = D (x); P
(2)
k
k
=1
and the LST of D (x) is denoted by D 3 (s):
Z1 0 X 3 D (s) = e dD (x) = D 3 (s); 00 =1 P
Re(s) > 0:
sx
k
(3)
k
We denote by the stationary probability vector of the underlying Markov chain and it satisfies
(C + D ) = 0;
e = 1:
(4)
Then the mean arrival rate (k = 1; . . . ; P ) of class k customers is given by k
= D e; k
k
k = 1; . . . ; P:
Let denote the utilization factor of class k customers, i.e., k
= k
Z1 0
0
xdD (x)e; k
Furthermore, we denote the overall arrival rate by =
P =
P k
=1
k = 1; . . . ; P:
P
P k
=1
and the overall utilization factor by k
. In the rest of the paper, we assume < 1, which ensure that all customers arriving to k
the system are eventually served.
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
6
We shall provide some preliminary results given in Takine and Hasegawa (1994a), which analyzed the workload process in the MAP=G=1 queue with state-dependent service times. As explained in Takine and Hasegawa (1994a), the arrival process considered in this paper is equivalent to a MAP with state-dependent service times. Therefore, in the rest of this section, we summarize the results in Takine and Hasegawa (1994a), which will be used later in the paper. We define Q as an M
2 M matrix which represents the infinitesimal generator of an underlying
Markov chain obtained by excising the busy periods. Namely, if we observe the system only when the server is idle, the observed underlying Markov chain is governed by the generator
Q satisfies Q=C+
Q. The matrix
1 dD(x) exp[Qx]: 00
Z
(5)
Note here that exp[Qx] denotes the transition probability matrix of the underlying Markov chain during the first passage time to the idle state of the server given that the first passage time starts with the amount x of the initial work. Let denote a 1 2 M vector which satisfies
Q = 0;
e = 1:
(6)
Let V denote a generic random variable representing the amount of stationary work in system (i.e., the sum of the unfinished work of all customers in the steady state). Also let S denote a generic random variable representing the state of the underlying Markov chain in the steady state. With those, we define v (x) as a 1 2 M vector whose j th element vj (x) represents the distribution function of the amount of stationary work in system when the underlying Markov chain is in state j :
x; S = j);
vj (x) = Pr(V Furthermore, let
v 3(s) denote a 1 2 M
j = 1; . . . ; M:
vector whose j th element represents the Laplace-Stieltjes
transform (LST) of vj (x). We then have (Takine and Hasegawa 1994a)
v3(s) = (1 0 )s sI + C + D3(s) 01 ; 2
3
Re(s) > 0;
(7)
from which moments of the distribution of V can be recursively computed. In particular, the average of stationary work in system is given by
E [V ] =
1
10
h
D(2) e + D (1) + (1 0 ) (e 0 C 0 D)01 D(1)e 0
where
D(n) = slim !0+
(01)n dn 3 D (s) n! dsn
(n = 1; 2):
i
;
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
7
Let w (x) (resp. r (x)) denote a 1 2 M vector whose j th element w (x) (resp. r (x)) represents k
k
k;j
k;j
the distribution function of the actual waiting time (resp. sojourn time) of class k customers when the underlying Markov chain is in state j immediately after their arrivals, i.e., for k = 1; . . . ; P and
j = 1; . . . ; M , w (x) = Pr(W k;j
k
x; S 3 = j);
r (x) = Pr(R k;j
k
k
x; S 3 = j); k
where W (resp. R ) denotes a generic random variable representing the actual waiting time (resp. k
k
sojourn time) of class k customers in the steady state and S 3 denotes a generic random variable repk
resenting the state of the underlying Markov chain immediately after arrivals of class k customers in the steady state. It then follows from the conditional PASTA (K¨onig and Schmidt 1990) that for
k = 1; . . . ; P ,
Z
w (x) = k
v(x)D
k
r (x) =
;
k
k
x
0
0
dv(y)D (x 0 y) k
:
k
We denote by the LST’s of w (x) and r (x) by w 3 (s) and r 3 (s), respectively. We then have k
w3 (s) = k
k
v3 (s)D
k
;
k
k
r3 (s) =
k
v 3(s)D3 (s)
k
k
;
Re(s) > 0;
(8)
k
for k = 1; . . . ; P . Remark 1.
represents the stationary probability vector of the underlying Markov chain given that
the server is idle (Takine and Hasegawa 1994a), i.e., Pr(V = 0; S = j ) = (1 0 ) ; j
where denotes the j th element of . j
j = 1; . . . ; M;
2
1 STATIONARY JOINT QUEUE LENGTH This section consists of two subsections. Since customers are served on a FIFO basis, the number of waiting customers at time t is equal to the number of customers arriving in the attained waiting time at time t (Sengupta 1989, Sakasegawa and Wolff 1990). We thus consider the stationary attained waiting time in section 1.1. Next, in section 1.2. we derive the joint probability generating function of the stationary queue length distribution, by considering the number of customer arriving during the stationary attained waiting time.
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
8
1.1 Attained waiting time distribution We start with the definition of the attained waiting time (Sengupta 1989). Let c denote the nth n
customer arriving to the system at time t . We denote the service time of c by H . Let V denote the n
n
n
t
amount of work in system at time t and V = V n 0 (i.e., the amount of work in system found by c n
t
n
on arrival). We denote by I the interval [t + V ; t + V + H ) during which c is served. Then the n
n
n
n
n
n
n
attained waiting time at time t is defined as
A =t0t t
if
n
t2I ; n
and A = 0 if the system is empty. In other words, the attained waiting time is the length of time spent t
by a customer being served (if any) in the system. Thus all customers waiting in the queue arrived during the attained waiting time since customers are served on a FIFO basis. Let S be the state of t
the underlying Markov chain at time t and S (n) be S n . Assuming the steady state, we define 1 2 M vector
a (x) (k = 1; . . . ; P ) whose j th element a k
t
k;j
(x) is given by
a (x) = Pr(A0 x; 0 2 I for some n; S (n) = j; j c is of class k): k;j
n
n
a
Further we define 1 2 M vector (x) whose j th element a (x) is given by j
a (x) = Pr(A0 = 0; S0 = j ) + Pr(A0 x; 0 2 I ; S (n) = j ): j
n
a (x) and a(x) are given by
Lemma 1.
k
a
(x) =
k
k
k
Z
x
0
0
w (y)dy 0
and
a(x) = v(x) +
k
Z
x
0
0
Z
x
0
0
r (y)dy
k
v(y)dy(C + D);
:
(9)
(10)
respectively.
a
Proof. Let 3 (s) be the LST of k
a (x): k
a3 (s) = k
Z
1 0 e da (x); 00 sx
k
Re(s) > 0;
whose j th element is denoted by a3 (s). We call class k customers who arrive with the transition k;j
from state i to state j (i:j = 1; . . . ; M ) class (k; i; j ) customers. Note that A > 0 implies a customer is being served and the stationary probability of a class ( k; i; j ) customer being served is given by
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
k;i;j
= D i
k;i;j
h
k;i;j
, where denotes the ith element of i
.
9
By definition, the waiting time of a
customer being served and the elapsed service time are conditionally independent given a class ( k; i; j ) customer being served. Thus we have
a3 (s) = k;j
X w3 M
k:i:j
i
where w 3
k:i:j
(s)
1 0 H 3 (s) k;i;j
h
=1
k;i;j
s
;
(s) denotes the LST of the stationary waiting time distribution of class (k; i; j ) customers
and H 3 (s) denote the LST of the service time distribution function H
k;i;j
k;i;j
(x) of class (k; i; j ) cus-
tomers. Note here that with the conditional PASTA (Ko¨ nig and Schmidt 1990),
v 3(s)D 3 w (s) = D
k;i;j
i
k;i;j
i
:
k;i;j
Thus we obtain
a3 (s) = k
v3(s)D 0 v3(s)D 3 (s) k
k
s
(w3 (s) 0 r3 (s)) ; = s k
k
k
k
(11)
k
from which (9) follows. Let a3 (s) be the LST of a(x):
a3(s) =
Z 1 e0 0
0
sx
da(x);
Re(s) > 0;
whose j th element is denoted by a3 (s). It is clear from the definition of a(x) and Remark 1 that j
a(0) = (1 0 ): Thus
a3(s) = (1 0 ) +
X a (x): P
k
k
With (11), we obtain
a3(s) = (1 0 ) +
k
=1
v 3(s)D 0 v3 (s)D3(s) s
Since v 3 (s) satisfies (see (7))
v3(s)[sI + C + D3(s)] = (1 0 )s; (12) is rewritten to be
a3 (s) = v3(s) +
v3(s) s
(C + D );
:
(12)
(13)
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
10
2
from which (10) follows. Remark 2.
Sengupta (1989) shows that the distribution of the attained waiting time in the stationary
FIFO G=G=1 queue is equivalent to the stationary distribution of the virtual waiting time. In our formulation, this relationship is represented by a(x)e =
v (x)e, which is readily confirmed with (1)
and (10).
1.2 Joint queue length formulas Let x3 (z1 ; . . . ; zP ) denote a 1 2 M vector whose j th element xj (z1 ; . . . ; zP ) is given by
h
i
xj (z1 ; . . . ; zP ) = E z1X1 1 1 1 zPXP 1fS=j g ;
jzk j 1
(k = 1; . . . ; P );
where Xk (k = 1; . . . ; P ) denotes a generic random variable representing the number of waiting cus-
tomers of class k in the steady state. Similarly, let y 3 (z1 ; . . . ; zP ) (jzk j 1 for all k = 1; . . . ; P ) denote
a 1 2 M vector whose j th element yj (z1 ; . . . ; zP ) is given by
i
h
jzk j 1
yj (z1 ; . . . ; zP ) = E z1Y1 1 1 1 zPYP 1fS=j g ;
(k = 1; . . . ; P );
where Yk (k = 1; . . . ; P ) denotes a generic random variable representing the number of class k cus-
tomers in the steady state. To obtain x3 (z1 ; . . . ; zP ) and y 3 (z1 ; . . . ; zP ), we need the following lemma. Lemma 2. P X k =1
The following equation holds for jzk j 1 (k = 1; . . . ; P ).
Z1
"
! #
P X
C + zi Di x " !i=1 X ! # Z1 P P P X X drk (x) exp C + zi Di x : = (1 0 ) C + zi D i + k
k zk
0
0
dwk (x) exp
i=1
Proof. It follows from (8) and (13) that
v(x) +
Zx
With this equation, we obtain (1 0 ) =
Z1 0
0
dv(x) exp
0
0
v(y)dyC +
"
0
k=1
P X
Zx P X k=1
i=1
0
k
0
0
rk (x)dy = (1 0 ):
! # Z1
"
P X
! #
v(x)C exp C + zi Di x dx i=1 ! # " Z1 P P X X + k rk (x) exp C + zi Di x dx: k =1
C+
0
0
i=1
zi Di x +
i=1
0
0
(14)
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE Postmultiplying both sides of the above equation by C + (1 0 ) =
C+
Z1 0
0
P X i=1
zi Di
dv(x) exp
!
"
11
PP z D and rearranging terms, we obtain i=1 i i (15)
C+
Z1
P X i=1
! #
zi Di x
"
C+
P X
P X
zi D i
i=1
!
! #
P X
!
v(x) (C + D) exp C + zi D i x dx C + zi D i i=1 i=1 " ! # ! Z P P P 1 X X X + k (r k (x) 0 w k (x)) exp C + zi D i x dx C + zi Di ; 00 i=1 i=1 k =1 P v(x)D = w (x) and D = P D . Note here that +
0
0
where we use
k
k
k
k =1
lim
x!1
(16)
k
v(x)(C + D) = (C + D) = 0;
and lim r (x) = lim w k (x) = x!1 k x!1
Dk =k :
Thus, taking partial integrals in the last two terms at the right hand side of (16) and noting exp[( C +
PP z D )x] and C + PP z D are commutative, we have i=1 i i i=1 i i ! Z1 ! " ! # P P P X X X (1 0 ) C + zi Di = dv(x) C + ziD i exp C + ziD i x 00 i=1 i=1 i=1 " ! # Z1 P X 0 00 dv(x) (C + D) exp C + ziDi x i=1 ! # " Z1 P P X X 0 k 00 d(rk (x) 0 wk (x)) exp C + ziDi x k=1 " ! # i=1 Z1 P P X X dwk (x) exp C + zi D i x = k zk 00 i=1 k=1 ! # " Z P P 1 X X 0 k 00 drk (x) exp C + ziDi x ; i=1 k=1 PP where we again use v (x)D k = k w k (x) and D = k=1 D k in the last equality. We now state the main theorem of the paper.
x3(z1 ; . . . ; zP ) and y3 (z1 ; . . . ; zP ) satisfy " ! X ! # Z1 P P P X X 3 x (z1 ; . . . ; zP ) C + zk Dk = k (zk 0 1) dwk (x) exp C + zi Di x ;
Theorem 1.
k =1
and
k=1
0
0
i=1
! X ! # " Z1 P P P X X 3 y (z1 ; . . . ; zP ) C + zk Dk = k (zk 0 1) drk (x) exp C + zi Di x ; 00 i=1 k =1 k=1
2
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
12
respectively, for jzk j 1 (k = 1; . . . ; P ). Proof. By definition, At = 0 implies no customers in the system. Now suppose At > 0 and t
2 In
for some n, i.e., cn is being served. Since customers are served based on a FIFO basis, the number of waiting customers at time t is identical to the number of customers arriving during an interval
(t 0 At ; t] = (tn ; t]. Note that At is fully determined by arrivals before time tn and arrivals during (tn ; t] do not affect At . Further, given At and S (n), the joint distribution of the number of customers
of each class arriving in ( tn ; t] are completely determined. That is, if we define x3 (k; z1 ; . . . ; zP ) and
y 3(k; z1 ; . . . ; zP ) as 1 2 M vectors whose j th elements xj (k; z1 ; . . . ; zP ) and yj (k; z1 ; . . . ; zP ) are given
by
h
i
h
i
xj (k; z1 ; . . . ; zP ) = E z1X1 1 1 1 zPXP 1fS=jg j class k customer is being served ; and
yj (k; z1 ; . . . ; zP ) = E z1Y1 1 1 1 zPYP 1fS=jg j a class k customer is being served ; respectively, we have
"
! # Z1 P X 3 dak (x) exp C + ziD i x ; x (k; z1 ; . . . ; zP ) = 00 ! # " i=1X Z1 P 3 y (k; z1 ; . . . ; zP ) = zk dak (x) exp C + zi D i x : 00 i=1
Further Pr(a class k customer is being served) = k . These observations lead to
#
" Z1 P P X X 3 x (z1 ; . . . ; zP ) = (1 0 ) + k dak (x) exp (C + zi Di )x ; 00 i=1 k =1
and
"
#
Z1 P P X X y3 (z1 ; . . . ; zP ) = (1 0 ) + k zk dak (x) exp (C + zi D i)x : 00 i=1 k =1
With lemma 1, the above two equations are rewritten to be
"
# Z1 P P X X 3 x (z1; . . . ; zP ) = (1 0 ) + k (wk (x) 0 rk (x)) exp (C + zi Di )x dx; 00 i=1 k=1
and
y 3(z1 ; . . . ; zP ) = (1 0 ) +
P X k =1
k zk
Z1 0
0
"
(w k (x) 0 r k (x)) exp (C +
P X i=1
#
ziD i )x dx;
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE respectively. Postmultiplying both sides in these equations by (C + integrals, we obtain
X x3(z1 ; . . . ; zP ) C + zi Di P
i=1
= (1 0 )
C+ P
i=1
= (1 0 )
C+
PP z D ) and taking partial i=1 i i
!
P X i=1
X y3(z1 ; . . . ; zP ) C + zi Di
13
!
P X i=1
zi D i
zi D i
"
! X Z1 P
0
k =1
! X P
0
k =1
k
d(wk (x) 0 rk (x)) exp (C +
0
0
k zk
"
Z1 0
P X i=1
d(wk (x) 0 rk (x)) exp (C +
0
#
ziD i )x ;
P X i=1
#
zi Di )x :
2
Finally, with Lemma 2, we have the theorem.
We now consider the total number of customers in the system and the marginal distribution of the number of class k customers in the system. Let x3 (z ) denote a 1 2 M vector whose j th element xj (z ) is given by
h
i
xj (z ) = E z X1 +111+XP 1fS=jg ;
jz j 1:
Similarly, let y 3 (z ) denote a 1 2 M vector whose j th element y j (z ) is given by
h
i
yj (z ) = E z Y1 +111+YP 1fS=j g ;
jzj 1:
By setting zk = z for all k = 1; . . . ; P in Theorem 1, we obtain the following corollary. Corollary 1.
x3(z ) and y3 (z ) are given by X k x3(z ) (C + z D) = (z 0 1) k =1 P
and
y 3(z ) (C + z D) = (z 0 1) respectively, where jz j 1. Remark 3.
Z1 0
0
P Z 1 X k k =1
0
0
dwk (x) exp [(C + z D) x] ;
dr k (x) exp [(C + z D) x] ;
The general relationship between the time-average queue length distribution and the
queue length distribution immediately after departures in the stationary queue with (single-class) batch
MAP arrivals has been established by Takine and Takahashi (1998). Note that Corollary 1 is considered as a special case of the result in Takine and Takahashi (1998), since the summands at the right hand sides of the equations in Corollary 1 represent the vector probability generating function of the
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
14
number of customers (regardless of their classes) immediately after departures of any class from the waiting space and from the system, respectively.
x
Also, let 3 (z ) denote a 1 2 M vector whose j th element x (z ) is given by
h
k
x (z ) = E z k 1f k;j
y
X
S
i
k;j
jzj 1:
g ;
=j
and let 3 (z ) denote a 1 2 M vector whose j th element y (z ) is given by
h
k
y (z ) = E z k 1f k;j
Y
S
=j
i
k;j
jz j 1:
g ;
By setting z = z and z = 1 for i = 1; . . . ; P; i 6= k in Theorem 1, we obtain the following corollary. k
Corollary 2.
i
x3 (z) and y3 (z) (k = 1; . . . ; P ) are given by k
k
x3 (z ) (C k
k
+z
D ) = (z 0 1) k
k
Z 1 dw (x) exp [(C + zD ) x] ; 0
k
0
k
Z1
and
y3 (z) (C + zD ) = (z 0 1) 00 dr (x) exp [(C respectively, where jz j 1 and X C =C+ D: k
k
k
k
k
k
k
+z
D ) x] ; k
P
i
k
6
=1 =
i i k
Remark 4.
Corollary 2 is also considered as a special case of the result in Takine and Takahashi
(1998), since the integrals at the right hand sides of the equations in Corollary 2 represent the vector probability generating function of the number of class k customers immediately after departures of class k from the waiting space and from the system, respectively.
2 RECURSION FORMULAS TO COMPUTE QUEUE LENGTH In this section we provide recursion formulas to compute the queue length distributions. We first
x
consider the joint distribution of the numbers of waiting customers in each class. Let (n1 ; . . . ; n )
denote a 1 2 M vector whose j th element x (n1 ; . . . ; n ) represents j
P
x (n1 ; . . . ; n ) = Pr(X1 = n1 ; . . . ; X = n ; S = j ): j
P
By definition,
x3(z1; . . . ; z ) = P
P
X1 1 1 1 X1 z n1
=0
P =0
n
n1
1
P
1 1 1 z P x(n1; . . . ; n n
P
P
):
P
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE Let denote the maximum absolute value of the diagonal elements of matrix
15
C . It then follows from
Theorem 1 that
1 X n1 =0
111
1 X nP =0
z1n1
111
zPnP
x(n ; . . . ; n ) C +
=
P
1
P X
(zk
k=1
where
v
(m)
0 1)
1
0
Lemma 3.
Let
(0)
m=0
v
(m)
v
(m)
D
( ). Let
A
m
k
C+
I + 01
P X i=1
zi
D
!#m i
;
A
= 01
m
(m = 0; 1; . . .) denote
D
( m)
( );
m = 1; 2; . . . :
1
G= XA G
m
m
:
K denote an M 2 M stochastic matrix which is given by K=A
0
v (m)
+
1 X m=0
AG
0;
m 1
m
K is denoted by f . Then v
and the invariant probability vector of
v
(0)
( ) =
(0)
( ) is given by
(1 0 )
fA e f ; 0
( )’s are recursively computed by
v
(m)
(17)
(18)
G denote an M 2 M stochastic matrix which is given by the minimum nonnegative m=0
and
"
k
v
( ) ;
solution of the equation:
Let
( )
D
zk
k =1
!
Z1 (x)m d (x): e0x m! 00
( ) =
First we consider the computation of the
A = I + 0 C + D
1 X
P X
( ) =
v
(0)
B
( )
0
m
+
m X1 n=1
v
(n)
A
( )
!
0
I 0A
m n+1
01
1
;
m = 1; 2; . . . ;
where for m = 1; 2; . . .,
A
m
Proof. We note that
v
(m)
=
1 X n= m
AG0 n
n m
;
B
m
=
1 X n= m
A G0 n+1
n m
( ) > 0,
1 X m=0
v
(m)
v
( )z m = 3 ( 0 z );
jzj 1;
:
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE and therefore
P1
m=0
v(m) () = .
Roughly speaking,
16
v(m)()’s represent the vector probability mass
functions of m arrivals from an independent Poisson stream with rate during the stationary virtual waiting time whose vector LST is given by v 3 (s). From (13), we obtain
v 3( 0 z )[(1 0 z )I + C + D3( 0 z )] = (1 0 z )(1 0 );
(19)
Comparing coefficient vectors of z m (m = 0; 1; . . .) in both sides of (19), we have h
i
v(0) () I + C + D (0)() h
i
v(1) () I + C + D (0)()
+ v (0) ( )
h
= (1 0 );
(20)
i
0I + D(1)() = 0(1 0 );
(21)
and for m = 2; 3; . . . ; h
v(m) () I + C + D (0)() where
D
(m)
i
+ v (m01) ( )
h
i
0I + D(1) ()
0
+
m X2 n=0
Z1 (x)m ( ) = e0x dD (x); m! 00
v (n)()D(m0n)() = 0;
(22)
m = 0; 1; . . . :
From (20) and (21), we have h
i
v(0)() = v(1) () I + 01 C + D(0) ()
+ v (0) ( )
h
i
I + 01 C + D(0) () + D (1)()
;
and from (22), h
v(m)( ) = v(m+1)() I + 01 C + D (0)()
i
+ 01
m X n=0
v (n)( )D(m0n)();
m = 1; 2; . . .
That is, the above equations can be rewritten to be
v (0)(); v(1) (); . . .
=
v(0)(); v(1)(); . . .
0 B B B B B B B B B B B B B B B @
A0 + A1 A0 O O O .. .
A2 A1 A0 O O .. .
A3 A2 A1 A0 O .. .
A4 A3 A2 A1 A0 .. .
1
111 C C 1 1 1 CCC 1 1 1 CCC C; 1 1 1 CCC C 1 1 1 CCA
(23)
...
where Am ’s (m = 0; 1; . . .) are given in (18). Note here that Am ’s (m = 0; 1; . . .) are nonnegative P (m) M 2 M matrices which satisfies 1 ( ) is identical m=0 Am e = e. Those and (23) imply that the v
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
17
with the stationary distribution of a Markov chain of M=G=1 type (Neuts 1989). Thus straightforward applications of the general theory of Markov chains of M=G=1 type (Neuts 1989) and a numerically
2
stable recursion due to Ramaswami (1988) lead to Lemma 3. Remark 5.
It can be shown that G introduced in Lemma 3 is given by
G = I + 01Q; where Q is given in (5). Also, it follows from (20) that v (0) ( ) may be computed as
h
i01
v(0) () = (1 0 ) I + 01 C + D(0)() when I + 01
C + D (0)()
;
is nonsingular.
Next we consider the factor "
I + 01 C +
We define F m (n1 ; . . . ; nP )’s for m = 0; 1; . . ., nk matrices which satisfy " I + 01
Lemma 4.
C+
P X i=1
zi D i
!#m
=
P X
zi D i
i=1
!#m :
0 (k = 1; . . . ; P ) and n1 + 1 1 1 + nP m as M 2 M
X
X n1 z1 1 1 1 zPnP F m (n1 ; . . . ; nP ):
111
n1 0 nP 0 n1 +111+nP m
The F m (n1 ; . . . ; nP ) for m = 0; 1; . . ., nk
0 (k = 1; . . . ; P ) and n1 + 1 1 1 + nP m is
computed by the following recursion with F 0 (0; . . . ; 0) = I : For m = 0; 1; . . .,
F m+1 (0; . . . ; 0) = (I + 01 C )m+1 ; F m+1 (n1 ; . . . ; nP ) = F m(n1 ; . . . ; nP )(I + 01 C ); +
P X
k=1 nj 1
F m(n1 ; . . . ; nk01 ; nk 0 1; nk+1; . . . ; nP )01D k ; if
F m+1 (0; . . . ; 0;
(24)
P X k=1
nk = 1; 2; . . . ; m;
m + 1 ; 0; . . . ; 0) = ( 01 D k )m+1 : k th
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
18
Proof. Note that for m = 0; 1; . . .,
X
X
111
111
n1 0 nP 0 n1 + +nP m+1
=
X
z1n1
1 1 1 zPnP F m+1(n1; . . . ; nP ) X
111
nP 0 n1 0 n1 + +nP m
=
111
X
111
X
nP 0 n1 0 n1 + +nP m P
111
+
"
F m(n1; . . . ; nP ) I + 01
z1n1
111
z1n1
1 1 1 zPnP F m(n1; . . . ; nP ) I + 01C
XX
zPnP
h
111
X
nP 0 k =1 n1 0 n1 + +nP m
111
z1n1
C+ i
P X i=1
zi
Di
!#
1 1 1 zkn0k01 zknk+1zkn+1k 1 1 1 zPnP F m(n1; . . . ; nP )01Dk : 1
+1
(25)
Comparing the coefficient vectors of z1n1 1 1 1 zPnP of both sides of the above equation, we obtain the
2
lemma. Remark 6.
Lemma 4 is considered as an extension of the results in Lucantoni and Ramaswami
(1985) and Takine et al. (1994b) to a multi-dimensional case. Let
D(km)() be D(km)() =
Z1 0
0
e0x
(x)m d m!
Dk (x);
k = 1; . . . ; P; m = 0; 1; . . . :
Together with the above results, we obtain the following theorem.
x
The vector joint distribution (n1; . . . ; nP ) for nk = 0; 1; . . . (k = 1; . . . ; P ) is given by
Theorem 2.
x(0; . . . ; 0) = and for n1 + 1 1 1 + nP
1 X m=0
v(m)()D(I + C )m(0C )01;
1,
x(n1;2. . . ; nP ) P 6X
=6 4
k=1 nk 1
+
x(n1; . . . ; nk01; nk 0 1; nk+1; . . . ; nP )Dk 1 X 111
m=n1 + +nP
0
X P
v(m) ()DF m(n1; . . . ; nP ) 1 X 111
k=1 m=n1 + +nP nk 1
01
3 v(m)()Dk F m(n1; . . . ; nk01; nk 0 1; nk+1; . . . ; nP )775 (0C )01:
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
19
Also, the vector joint distribution y (n1; . . . ; nP ) for nk = 0; 1; . . . (k = 1; . . . ; P ) is given by
y(0; . . . ; 0) = (1 0 ); and for n1 + 1 1 1 + nP
1,
y(n1 ;2. . . ; nP ) P 6X =6 y (n1 ; . . . ; nk01 ; nk 0 1; nk+1; . . . ; nP )Dk 4 k =1 nk 1
+
1 X
m X
111
m=n1 + +nP i=0
0
v(i)()D (m0i)( )F m(n1 ; . . . ; nP )
3 X (i) 7 v ()D(km0i) ()F m(n1 ; . . . ; nk01 ; nk 0 1; nk+1; . . . ; nP )75 (0C )01 ;
1 X
X P
m
111
k=1 m=n1 + +nP nk 1
01 i=0
where the v (m) ( ) is computed with Lemma 3, and the F m (n1 ; . . . ; nP ) is computed with Lemma 4. Proof. From (17) and (24), we have
1 X n1 =0
111 =
1 X nP =0 P X k =1
=
P X k =1
z1n1
111
x(n1 ; . . . ; nP ) C +
zPnP
(zk 0 1) (zk 0 1)
1 X
X
v(m) ()D k
m=0
1 X n1 =0
111
1 X nP =0
111
P X k =1
zk D k
X
n1 0 nP 0 n1 + +nP m
z1n1
111
1 1 1 zPnP
z1n1
!
1 1 1 zPnP F m(n1; . . . ; nP )
1 X 111
m=n1 + +nP
v(m) ()D k F m (n1 ; . . . ; nP ):
Comparing the coefficient vectors of z1n1 1 1 1 zPnP of both sides of the above equation, we obtain the former part of the theorem. The equation for y (0; . . . ; 0) follows from Remark 1. The recursion for the y (n1 ; . . . ; nP ) can be proved in a very similar way by noting k
Z1 0
0
e0x
m X (x)m dr k (x) = v(i)()D(km0i)(): m! i=0
Thus we obtain
1 X n1 =0
111 =
1 X nP =0 P X k =1
z1n1
111
zPnP
(zk 0 1)
y (n1 ; . . . ; nP ) C +
1 X n1 =0
111
1 X nP =0
z1n1
111
n zP P
P X k =1
zk D k
1 X 111
! m X
m=n1 + +nP i=0
from which the recursion for the y (n1 ; . . . ; nP ) follows.
v(i)()D(km0i) ()F m (n1 ; . . . ; nP );
2
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
20
Next we consider the total number of waiting customers and the total number of customers in the system. Let x(n) and y (n) (n = 0; 1; . . .) denote 1 2 M vectors whose j elements x (n) and y (n) j
j
represent xj (n) = Pr(X = n; S = j );
y j (n) = Pr(Y = n; S = j );
respectively, where X = X1 + 1 1 1 + X and Y = Y1 + 1 1 1 + Y . P
P
The vector distribution x(n) is given by
Corollary 3.
1 X
x(0) =
v(
)
m
( )D (I + C ) (0C )01 ; m
=0
m
and for n = 1; 2; . . .,
2 3 1 1 X X x(n) = 4x(n 0 1)D + v( )( )DF (n) 0 v( ) ()DF (n 0 1)5 (0C )01 ; = = 01 m
m
m
m
m n
where the
v(
)
m
m n
( ) is computed with Lemma 3, and the
m = 0; 1; . . .
8 > > > (I + 01 C ) > >
F
m
(n) is computed with
;
F 0 (0)
=
I and for
n = 0;
(n)(I + 01C ) + F (n 0 1) 01 D ; n = 1; . . . ; m;
> > > > : (01 D) m
F
m
+1
m
;
n = m + 1:
Further the vector distribution y (n) is given by
y (0) = (1 0 ); y (1) = x(0) 0 y(0); y (n) = x(n 0 1);
n = 2; 3; . . . ;
Proof. Since the corollary for the x(n) can be proved in the same way as Theorem 2, so that we omit the details. The results for the y (n) is clear from the definitions of x(n) and y (n).
2
Finally we consider the marginal distributions of the number of waiting customers of class k and the the number of class k customers in the system. Let x (n) and y (n) (n = 0; 1; . . .) denote 1 2 M k
k
vectors whose j elements x (n) and y (n) represent k;j
k;j
xk;j (n) = Pr(Xk = n; S = j );
respectively.
yk;j (n) = Pr(Yk = n; S = j );
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE Corollary 4.
The vector distribution
xk (0) =
1 X m=0
21
xk (n) is given by v(m) ()Dk (I + 01C k )m(0C k )01;
and for n = 1; 2; . . .,
2 3 1 1 X X xk (n) = 4xk (n 0 1)D + v(m) ()Dk F (mk)(n) 0 v(m)()Dk F (mk) (n 0 1)5 (0C k )01; m=n m=n01
where the
v(m)() is computed with Lemma 3, and the F (mk)(n) is computed with F (0k) (0) = I and for
m = 0; 1; . . .
8 > > > (I + 01 C k )m+1 ; n = 0; > > < F (mk)+1(n) = >> F (mk)(n)(I + 01C k ) + F (mk) (n 0 1)01Dk ; n = 1; . . . ; m; > > > m+1 : 01
Dk ) ; Further the vector distribution y k (n) for n = 0; 1; . . . is given by (
n = m + 1:
1 X m X
yk (0) = v(n)()D(km0n) ()(I + 01C k )mDk (0C k )01; m=0 n=0 yk (1) = xk (0) 0 yk (0); yk (n) = xk (n 0 1); n = 2; 3; . . . : Since Corollary 4 can be proved in the same way as Corollary 3, we omit the proof. REFERENCES Asmussen, S.
1991. Ladder heights and the Markov-modulated M/G/1 queue. Stoch. Proc.
Appl. 37, 313–326. Asmussen, S. and Koole, G.
1993. Marked point processes as limits Markovian arrival
streams. J. Appl. Prob. 30, 365–372. He, Q.-M.
1996. Queues with marked customers. Adv. Appl. Prob. 28, 567–587.
Keilson, J. and Servi, L. D.
1988. A distributional form of Little’s law. Opns. Res. Lett. 7
223–227. Konig, D. and Schmidt, V.
1990. Extended and conditional versions of the PASTA property.
Adv. Appl. Prob. 22, 510–512. 1985. Efficient algorithms for solving the nonlinear matrix equations arising in phase type queues. Stoch. Mod. 1, 29–51. Lucantoni, D. M. and Ramaswami, V.
QUEUE LENGTH IN A FIFO SINGLE-SERVER QUEUE
22
1990. A singleserver queue with server vacations and a class of non-renewal arrival processes. Adv. Appl. Prob. 22, 676–705. Lucantoni, D. M., Meier-Hellstern, K. S. and Neuts, M. F. .
Machihara, F.
1993. On the queue with PH-Markov renewal preemption. J. Opns. Res. Soc.
J. 36, 13–28. 1989. Structured Stochastic Matrices of M=G=1 Type and Their Applications. Marcel Dekker, New York. Neuts, M. F.
1988. Stable recursion for the steady state vector for Markov chains of M=G=1 type. Stoch. Mod. 4, 183–188. Ramaswami, V.
1986. The queue MjGj1 with Markov modulated arrivals and services. Math. Opns. Res. 11, 465–483. Regterschot, G. J. K. and de Smit, J. H. A.
1990. The equality of the virtual delay and attained waiting time distributions, Adv. Appl. Prob. 22, 257–259. Sakasegawa, H. and Wolff, R. W.
Sengupta, B.
1989. An invariance relationship for the G=G=1 queue. Adv. Appl. Prob. 21,
956-957. 1995. Analysis of a nonpreemptive priority queue with SPP arrivals of high class. Perfor. Eval. 21, 215–238. Sugahara, A., Takine, T. , Takahashi, Y. and Hasegawa, T.
1994a. The workload in the MAP=G=1 queue with statedependent services its application to a queue with preemptive resume priority. Stoch. Mod. 10, 183– 204. Takine, T. and Hasegawa, T.
1994b. Mean waiting times in nonpreemptive priority queues with Markovian arrival and i.i.d. service processes. Perfor. Eval. 20, 131–149. Takine, T., Matsumoto, Y., Suda, T. and Hasegawa, T.
1996a. A nonpreemptive priority MAP/G/1 queue with two classes of customers, J. Opns. Res. Soc. J. 39 266–290. Takine, T.
1996b. A continuous version of matrix-analytic methods with the skip-free to the left property. Stoch. Mod. 12 673–682. Takine, T.
1998. On the relationship between queue lengths at a random instant and at a departure in the stationary queue with BMAP arrivals. Stoch. Mod. 14 601–610. Takine, T. and Takahashi, Y.
Takine, T.
1998. The nonpreemptive priority MAP/G/1 queue, Opns. Res. to appear.
Wollf. R. W. Wollf. R. W.
1982. Poisson arrivals see time averages. Opns. Res. 30 223–231. 1989. Stochastic Modeling and the Theory of Queues. Prentice-Hall, Englewood
Cliffs, NJ. Zhu, Y. and Prabhu, N. U.
9, 313–322.
1991. Markov-modulated PH=G=1 queueing systems. QUESTA