There is extensive literature on the M/G/1 queue, which has been studied in .... n (x, t)+(λ + µ2(x))P(2) n (x, t) = λP. (2) nâ1(x, t),. (6) d dt. Q(t) + λQ(t) = (1 â r) â« â.
Information and Management Sciences Volume 14, Number 2, pp.47-56, 2003
An M/G/1 Queue with Second Optional Service with General Service Time Distribution Jehad Al-Jararha
Kailash C. Madan
Yarmouk University
Yarmouk University
Jordan
Jordan
Abstract We study an M/G/1 queue with second optional service. Poisson arrivals with mean arrival rate λ (> 0), all demand the first ‘essential’ service, whereas only some of them demand the second ‘optional’ service. The service times of the first essential service are assumed to follow a general (arbitrary) distribution with distribution function B1 (v) and that of the second optional service with general (arbitrary) distribution with distribution function B2 (v). The time-dependent probability generating functions have been obtained in terms of their Laplace transforms and the corresponding steady state results have been derived explicitly. Also the mean queue length and the mean waiting time have been found explicitly.
Keywords: First Essential Service, Second Optional Service, Supplementary Variable Technique.
1. Introduction There is extensive literature on the M/G/1 queue, which has been studied in various forms by numerous authors including Cox [5], Gaver [6], Keilson and Kooharian [8], Bhat [1], Cohen [4], Medhi [12], Chaudhry and Templeton [2], Choi and Park [3] and Madan [9, 10]. Recently Madan [11] has studied the time-dependent as well as the steady state behavior of an M/G/1 queue with second optional service, using the supplementary variable technique in which he has considered general service time distribution for first service and exponential service time distribution for the second optional service. In the present paper we have generalized Madan’s work in the sense that we have assumed that both services are general with different distribution functions. The following assumptions briefly describe the mathematical model of our study: Received July 2001; Revised July 2002; Accepted December 2002.
48
Information and Management Sciences, Vol. 14, No. 2, June, 2003
• Customers arrive at the system one by one according to a Poisson stream with mean arrival rate λ (> 0). • There is a single server who provides the first essential service to all arriving customers. Let B1 (v) and b1 (v) respectively be the distribution function and the density function of the first service times. • As soon as the first service of a customer is complete, then with probability r he may opt for the second service, in which case his second service will immediately commence or else with probability 1 − r he may opt to leave the system, in which case another customer at the head of the queue (if any) is taken up for his first essential service. • The second service times as assumed to be general with the distribution function B2 (v) and the density function b2 (v). • Further, µi (x)dx is the conditional probability of completion of the i-th service given that elapsed time is x, so that µi (x) =
bi (x) , 1 − Bi (x)
i = 1, 2,
(1)
,
(2)
and, therefore, bi (v) = µi (v)e−
Rv 0
µi (x)dx
i = 1, 2.
• Various stochastic processes involved in the system are independent of each others.
2. Definitions and Equations Governing the System (i)
We assume that Pn (x, t) i = 1, 2 is the probability that at time t, there are n (≥ 0) customers in the queue excluding the one being provided the ith service and the lapsed (i)
service time of this customer is x. Accordingly, P n (t) =
(i) x=0 Pn (x, t)dx
R∞
denotes the
probability that at time t, there are n customers in the queue excluding one customer in ith service irrespective of the value of x. Then we let Q(t) be the probability that at time t, there is no customer in the system and the server is idle. The system has the following set of differential-difference equations (Cox [5]): ∂ ∂ (1) (1) P (x, t) + Pn(1) (x, t) + (λ + µ1 (x))Pn(1) (x, t) = λPn−1 (x, t), ∂x n ∂t
n≥1
(3)
An M/G/1 Queue with Second Optional Service with General Service Time Distribution
∂ (1) ∂ (1) (1) P0 (x, t) + P0 (x, t) + (λ + µ1 (x))P0 (x, t) = 0, ∂x ∂t ∂ ∂ (2) (2) P (x, t) + Pn(2) (x, t) + (λ + µ2 (x))Pn(2) (x, t) = λPn−1 (x, t), n ≥ 1, ∂x n ∂t ∂ (2) ∂ (2) Pn (x, t) + Pn(2) (x, t) + (λ + µ2 (x))Pn(2) (x, t) = λPn−1 (x, t), ∂x ∂t Z ∞ Z ∞ d (2) (1) P0 (x, t)µ2 (x)dx. P0 (x, t)µ1 (x)dx + Q(t) + λQ(t) = (1 − r) dt 0 0
49
(4) (5) (6) (7)
The above system equations are to be solved subject to the following boundary conditions are: Pn(1) (0, t)
= (1 − r)
(1)
P0 (0, t) = (1 − r) Pn(2) (0, t) = r
Z
(2) P0 (0, t)
Z
=r
∞
Z
∞ 0 ∞
(1) Pn+1 (x, t)µ1 (x)dx (1)
∞
+
P1 (x, t)µ1 (x)dx +
0
Pn(1) (x, t)µ1 (x)dx,
0
0
Z
Z
Z
∞ 0 ∞
0
(2)
Pn+1 (x, t)µ2 (x)dx, (2)
n ≥ 1,
P1 (x, t)µ2 (x)dx + λQ(t),
n ≥ 1,
(8) (9) (10)
(1)
P0 (x, t)µ1 (x)dx.
(11)
The argument in obtaining the above boundary conditions is as follows. Consider Equations (8) and (9). The addition of two terms in the right side of Equation (8) and three terms in the right sider of Equation (9) account for various mutually exclusive cases. The integral in the first term in the right hand sides of these equations indicates completion of the first service and multiplication by (1−r) means that the customer does not opt for the second service. This leads to the left side of Equation (8) or Equation (9) indicating zero value for x which implies the beginning of the first service for the next customer. The integral in the second term in the right hand sides of these equations means completion of the second service which again leads to the left side with zero value of x which implies the beginning of the first service of the next customer. An extra term λQ(t), the third term in the right hand side of Equation (9), means when an idle server receives a new arrival, then the first service of this customer immediately starts. This again leads to the left side of Equation (9). A similar reasoning applies in obtaining boundary conditions (10) and (11). Further, we assume the following initial conditions: Q(0) = 1,
Pn(i) (0) = 0
i = 1, 2.
(12)
50
Information and Management Sciences, Vol. 14, No. 2, June, 2003
3. Generating Functions of the Queue Length: The Time-Dependent Solution We define the probability generating functions Pq(1) (x, z, t) =
∞ X
z n Pn(1) (x, t),
Pq(j) (z, t) =
n=0
∞ X
z n Pn(j) (t),
j = 1, 2,
(13)
n=0
and define Laplace transform of a function f (t) as f¯(s) =
Z
∞
e−st f (t)dt,
Real(s) > 0.
(14)
0
We take Laplace transform of Equations (3) through (11) and use (12). Thus we have ∂ ¯ (1) (1) P (x, s) + (s + λ + µ1 (x))P¯n(1) (x, s) = λP¯n−1 (x, s), n ≥ 1, ∂x n ∂ ¯ (1) (1) P0 (x, s) + (s + λ + µ1 (x))P¯0 (x, s) = 0, ∂x ∂ ¯ (2) (2) P (x, s) + (s + λ + µ2 (x))P¯n(2) (x, s) = λP¯n−1 (x, s), n ≥ 1, ∂x n ∂ ¯ (2) (2) P (x, s) + (s + λ + µ2 (x))P¯0 (x, s) = 0, ∂x 0 Z ∞ Z ∞ (1) (2) ¯ (s + λ)Q(s) = 1 + (1 − r) P¯ (x, s)µ1 (x)dx + P¯ (x, s)µ2 (x)dx 0
P¯n(1) (0, s) = (1 − r) (1) P¯0 (0, s) = (1 − r)
P¯n(2) (0, s) = r (2) P¯0 (0, s) = r
∞
Z
Z0 ∞ 0
Z
Z
∞
0 ∞ 0
0
0
0
(1) P¯n+1 (x, s)µ1 (x)dx +
(1) P¯1 (x, s)µ1 (x)dx +
Z
Z
∞
0 ∞
0
(2) P¯n+1 (s)µ2 (x)dx,
n ≥ 1,
(2) ¯ P¯1 (s)µ2 (x)dx + λQ(s).
(15) (16) (17) (18) (19) (20) (21)
P¯n(1) (x, s)µ1 (x)dx
(22)
(1) P¯0 (x, s)µ1 (x)dx
(23)
We multiply Equations (15) and (16) and Equations (17) and (18) by suitable power of z, and use Equation (13) and simplify. We, thus have ∂ ¯ (1) P (x, z, s) + (s + λ − λz + µ1 (x))P¯q(1) (x, z, s) = 0. ∂x q ∂ ¯ (2) P (x, z, s) + (s + λ − λz + µ2 (x))P¯q(2) (x, z, s) = 0 ∂x q
(24) (25)
Similarly, from Equations (20) and (21), we obtain z P¯q(1) (0, z, s) = (1 − r) +
Z
∞ 0
Z
∞ 0
P¯q(1) (x, z, s)µ1 (x)dx − (1 − r)
P¯q(2) (x, z, s)µ2 (x)dx
−
Z
∞ 0
Z
∞ 0
(1) P¯0 (x, s)µ1 (x)dx
(2) P¯0 (x, s)µ2 (x)dx
¯ + λz Q(s).
(26)
An M/G/1 Queue with Second Optional Service with General Service Time Distribution
51
Then from Equations (22) and (23) P¯q(2) (0, z, s) = r
Z
∞ 0
P¯q(1) (x, z, s)µ1 (x)dx.
(27)
Using Equation (19), Equation (26) becomes z P¯q(1) (0, z, s) = (1 − r)
Z
∞ 0
P¯q(1) (x, z, s)µ1 (x)dx +
¯ +1 + [λ(z − 1) − s]Q(s).
Z
∞ 0
P¯q(2) (x, z, s)µ2 (x)dx (28)
Integrating Equations (24) and (25) between 0 and x, we have P¯q(i) (x, z, s) = P¯q(i) (0, z, s)e−[s+λ+−λz]x−
Rx 0
µi (t)dt
,
i = 1, 2,
(29)
(1) (2) where P¯q (0, z, s) and P¯q (0, z, s) are defined in Equations (27) and (28) respectively.
Integrating Equation (29) with respect to x by parts, we have P¯q(i) (z, s) = P¯q(i) (0, z, s) ¯bi [s + λ − λz] =
where
Z
∞ 0
1 − ¯bi [s + λ − λz] s + λ − λz
e−(s+λ−λz)x¯bi (x)dx,
!
i = 1, 2
(30)
i = 1, 2,
(31)
is the Laplace transform of bi (x). We see that by virtue of Equation (29), we have Z
∞ 0
P¯q(i) (x, z, s)µi (x)dx = P¯q(i) (0, z, s)¯bi [s + λ − λz],
i = 1, 2.
(32)
Using Equation (32), Equations (27) and (28) become P¯q(2) (0, z, s) = r P¯q(1) (0, z, s)¯b1 [s + λ − λz],
(33)
z P¯q(1) (0, z, s) = (1 − r)P¯q(1) (0, z, s)¯b1 [s + λ − λz] + P¯q(2) (0, z, s)¯b2 [s + λ − λz] ¯ +1 + [λ(z − 1) − s]Q(s).
(34)
We solve Equations (33) and (34) simultaneously for P¯ (i) (0, z, s), i = 1, 2 and have ¯ 1 + {(λ(z − 1) − s}Q(s) , z − (1 − r)¯b1 (s + λ − λz) − r¯b1 (s + λ − λz)¯b2 (s + λ − λz) ¯ r¯b1 (s + λ − λz){1 + {(λ(z − 1) − s}Q(s)} , P¯q(2) (0, z, s) = ¯ ¯ ¯ z − (1 − r)b1 (s + λ − λz) − r b1 (s + λ − λz)b2 (s + λ − λz) P¯q(1) (0, z, s) =
(35) (36)
Now, using Equations (35) and (36) into equation (30) we obtain ¯ 1 + {(λ(z − 1) − s}Q(s) 1−¯b1 [s+λ−λz] , (37) P¯ (1)(z, s)= s + λ − λz z−(1−r)¯b1 (s+λ−λz)−r¯b1 (s+λ−λz)¯b2 (s+λ−λz) ! ! ¯b1 (s + λ − λz){1 + {(λ(z − 1) − s}Q(s)} ¯b2 [s+λ−λz] ¯ r 1− (2) . (38) P¯ (z, s)= s + λ − λz z−(1−r)¯b1 (s+λ−λz)−r¯b1 (s+λ−λz)¯b2 (s+λ−λz) !
!
52
Information and Management Sciences, Vol. 14, No. 2, June, 2003
(1) (2) Let P¯q (z, s) = P¯q (z, s) + P¯q (z, s) denote the probability generating function of the
number in the queue irrespective of the type of service being provided. Then adding equations (37) and (38) we have 1−(1−r)¯b1(s+λ−λz)−r¯b1(s+λ−λz)¯b2 (s+λ−λz) . z−(1−r)¯b1(s+λ−λz)−r¯b1(s+λ−λz)¯b2 (s+λ−λz) (39) 1 ¯ If we let z = 1 in Equation (39), we can easily verify that Q(s) + P¯q (z, s) = s as it
¯ 1+{(λ(z−1)−s}Q(s) P¯q (z, s) = s + λ − λz
!
!
should be. Further, it can shown that the denominator of the right hand side of (39) has one zero inside the unit circle |z| = 1 which is sufficient to determine the only unknown (1) (2) ¯ Q(s) appearing in the numerator. Therefore, P¯q (z, s) and also P¯q (z, s) and P¯q (z, s) can be completely determined. 4. The Steady State Results To define the steady state probabilities and the corresponding probability generating functions we drop the argument t and for the matter, the argument s, wherever it appears in the time-dependent analysis up to this point. Then the corresponding steady state results can be obtained by applying the well-known Tauberian property, ¯ = lim f (t). lim sf(s)
s→0
(40)
t→∞
Thus multiplying both sides of equation (39) by s, taking limit as s → 0, applying property (40) and simplifying, we have Pq (z) =
{1 − (1 − r)¯b1 (λ − λz) − r¯b1 (λ − λz)¯b2 (λ − λz)}Q . −z + (1 − r)¯b1 (λ − λz) + r¯b1 (λ − λz)¯b2 (λ − λz)
(41)
We see that for z = 1, Pq (z) in equation (41) is indeterminate of the 00 form. Therefore, we apply L’Hopital’s rule on equation (41), using the fact that ¯bi (0) = 1 and −¯b0 (0) = i
E(vi ) i = 1, 2, where E(vi ) isthe expected service time for the ith service. Thus we have, on simplifying Pq (1) = lim Pq (z) = z→1
−[λE(v1 ) + rλE(v2 )] · Q. −1 + λE(v1 ) + rλE(v2 )
(42)
Now, since we must have Q + Pq (z) = 1, therefore, adding Q to (42), equating to 1 and simplifying we have Q = 1 − λE(v1 ) − rλE(v2 ),
(43)
An M/G/1 Queue with Second Optional Service with General Service Time Distribution
53
where λE(v1 ) + rλE(v2 ) < 1 emerges out to be the stability condition under which the steady state exists. We note that Q is the steady state probability that the server is idle. Consequently system’ utilization factor is given by ρ = 1 − Q = λE(v1 ) + rλE(v2 ).
(44)
Substituting for Q from (43) in (41), we finally have Pq (z) =
{1 − (1−r)¯b1 (λ−λz) − r¯b1 (λ−λz)¯b2 (λ−λz)}{1 − λE(v1 ) − rλE(v2 )} . −z + (1 − r)¯b1 (λ − λz) + r¯b1 (λ − λz)¯b2 (λ − λz)
(45)
5. The Mean Number in the System Let Lq denote the mean number of customers in the queue. Then, we have from d dz Pq (z) at z = 1. We note that for z = 1, P q (z) in Equation (45) indeterminate of the 00 form. Therefore, we process as follows. (z) Let Pq (z) = N D(z) , where N (z) and D(z) respectively denote the numerator and the
Equation (45), Lq = is
denominator of the right hand side of Equation (45). Then we use the following wellknown result in queueing theory (Kashyap and Chaudhry [7] and Madan [9]) D 0 (z)N 00 (z)−N 0 (z)D 00 (z) D 0 (1)N 00 (1)−N 0 (1)D 00 (1) d Pq (z) = Pq0 (1) = lim = . z→1 z→1 dz 2(D 0 (z))2 2(D 0 (1))2 (46) We carry out the desired derivatives at z = 1, using the fact the ¯b00 (0) = E(v 2 )
Lq = lim
i
i
i = 1, 2, the second moment of the service time for the ith service. After a lot of algebra and simplification, we have N 0 (1) = −[λE(v1 ) + rλE(v2 )][1 − λE(v1 ) − rλE(v2 )] N 00 (1) = −λ2 [E(v12 ) + rE(v22 ) + 2rE(v1 )E(v2 )][1 − λE(v1 ) − rλE(v2 )] D 0 (1) = −1 + λE(v1 ) + rλE(v2 ) D 00 (1) = λ2 [E(v12 ) + rE(v22 ) + 2rE(v1 )E(v2 )] Substituting the above values in (46) and simplifying, we obtain Lq =
λ2 [E(v12 ) + rE(v22 ) + 2rE(v1 )E(v2 )] . 2[1 − λE(v1 ) − rλE(v2 )]
(47)
If L denotes the mean number in the system including one in service, we then use Little’s formula or we can show independently that
54
Information and Management Sciences, Vol. 14, No. 2, June, 2003
L + Lq + ρ, where ρ = λE(v1 ) + rλE(v2 ) as found in equation (44). Thus we have L = Lq + ρ =
λ2 [E(v12 ) + rE(v22 ) + 2rE(v1 )E(v2 )] + λ{E(v1 ) + rE(v2 )}. 2[1 − λE(v1 ) − rλE(v2 )]
(48)
6. The Mean Waiting Time The mean waiting time in the queue and in the system are obtained by using: Lq λ[E(v12 ) + rE(v22 ) + 2rE(v1 )E(v2 )] = λ 2[1 − λE(v1 ) − rλE(v2 )] 2 L λ[E(v1 ) + rE(v22 ) + 2rE(v1 )E(v2 )] W= = + {E(v1 ) + rE(v2 )}. λ 2[1 − λE(v1 ) − rλE(v2 )]
Wq =
(49) (50)
7. Special Cases Case I: The second service is exponential In this case we let E(v2 ) = 1 and ¯b2 (λ − λz) = µ2
µ2 λ+µ2 −λz
in equations (43), (45), (47),
(48), (49), (50) and we have on simplifying the results: rλ Q = 1 − λE(v1 ) − , µ2 {(λ + µ2 − λz) − [(1 − r)(λ − λz) + µ2 ]¯b1 (λ − λz)}{1 − λE(v1 ) − Pq (z) = −(λ + µ2 − λz)z + [(1 − r)(λ − λz) + µ2 ]¯b1 (λ − λz) Lq =
L=
Wq =
W=
2rE(v1 ) } µ2 , 2{1 − λE(v1 ) − µrλ2 } 1) } n λ2 {E(v12 ) + µ2r2 + 2rE(v µ2 2 + λ E(v1 ) 2{1 − λE(v1 ) − µrλ2 } 1) } λ{E(v12 ) + µ2r2 + 2rE(v µ2 2 , 2{1 − λE(v1 ) − µrλ2 } 1) λ{E(v12 ) + µ2r2 + 2rE(v } n µ2 2 + E(v1 ) + 2{1 − λE(v1 ) − µrλ2 }
λ2 {E(v12 ) +
2r µ22
(51) rλ µ2 }
, (52)
+
(53)
+
r o , µ2
(54)
(55) r o . µ2
(56)
The results (51) to (56) agree with results of Madan [11]. Case II: Both services are exponential In this case we let E(v1 ) = 1 and ¯b1 (λ − λz) = µ1
µ1 λ+µ1 −λz
in the results of case I. We
then have: Q=1−
λ rλ − , µ1 µ2
(57)
An M/G/1 Queue with Second Optional Service with General Service Time Distribution
Pq (z) =
{(λ + µ1 − λz)(λ + µ2 − λz) − µ1 [(1 − r)(λ − λz) + µ2 ]}{1 −
λ µ1
−(λ + µ1 − λz)(λ + µ2 − λz)z + µ1 [(1 − r)(λ − λz) + µ2 ] 2 2 λ { µ2 + µ2r2 + µ12rµ2 } 1 2 , Lq = 2{1 − µλ1 − µrλ2 } L=
Wq = W=
λ2 { µ22 +
2r n 1 + µ12rµ2 } µ22 +λ λ rλ µ1 2{1 − µ1 − µ2 } λ{ µ22 + µ2r2 + µ2r } 1 µ2 1 2 , 2{1 − µλ1 − µrλ2 } } n1 λ{ µ22 + µ2r2 + µ2r 1 µ2 1 2 + + µ1 2{1 − µλ1 − µrλ2 } 1
+
−
rλ µ2 }
,
r o , µ2
55
(58) (59)
(60)
(61) r o . µ2
(62)
Case III: No customer requires second service In this case we let r = 0 in the main results (43), (45), (47), (48), (49), (50) and obtain: Q = 1 − λE(v1 ), {1 − ¯b1 (λ − λz)}{1 − λE(v1 )} Pq (z) = , −z + ¯b1 (λ − λz) λ2 E(v12 ) Lq = , 2[1 − λE(v1 )] λ2 E(v12 ) + λE(v1 ), L= 2[1 − λE(v1 )] λE(v12 ) Wq = , 2[1 − λE(v1 )] λE(v12 ) W = + E(v1 ) 2[1 − λE(v1 )]
(63) (64) (65) (66) (67) (68)
The results in (63) to (68) are known results of the M/G/1 queue. (see Medhi [12], Chapter 6) Acknowledgements The authors are grateful to the Managing Editor and both the learned referees for their valuable comments and suggestion to improve the paper in its present form. References [1] Bhat, U. N., Imbedded Markov chain analysis of a single server bulk queue, J. Aust. Math. Soc., Vol.4, pp.244-263, 1964.
56
Information and Management Sciences, Vol. 14, No. 2, June, 2003
[2] Chaudhry, M. L. and Templeton, J. G. C., The queueing system M/GB /1 and its ramifications, Euro J. Oper. Res., Vol.6, pp.56-60, 1981. [3] Choi, B. D. and Park, K. K., The M/G/1 retrial queue with Bernoulli schedule, Queueing Systems, Vol.7, pp.219-228, 1990. [4] Cohen, J. W., The Single Server Queue, North Holland, Amsterdam, 1969. [5] Cox, D. R., The analysis of non-Markovian stochastic processes by the inclusion of supplementary variables, Proceedings of the Cambridge Philosophical Society, Vol.51, pp.433-441, [in section-4], 1955. [6] Gaver, D. P., Imbedded Markov chain analysis of a waiting line process in coutinuous time, Ann. Math. Stat., Vol.30, pp.698-720, 1959. [7] Kashyap, B. R. K. and Chaudhry, M. L., An Introduction to Queueing Theory, A & A Publications, Kingston, Ont., Canada, 1988. [8] Keilson, J. and Kooharian, A., On time-dependent queueing processes, Ann. Math. Stat., Vol.31, pp.104-112, 1960. [9] Madan, K. C., On a M [x] /M [b] /1 queueing system with general vacation times, International J. Management and Information Sciences, Vol.2, pp.51-60, 1991. [10] Madan, K. C., An M/G/1 queueing system with compulsory server vacations, Trabajos de Investigaction Operativa, Vol.7, No.1, pp.105-115, 1992. [11] Madan, K. C., An M/G/1 queue with second optional service, Queueing Systems, Vol.34, pp.37-46, 2000. [12] Medhi, J., Stochastic Processes, Wiley Eastern, 1982.