This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Thus n + 1 starts service immediately and Wn+1 = 0. This
is the case for customer 3 in the ﬁgure. These two cases can be combined in the single
equation
Wn+1 = max[Wn + Yn − Xn+1 , 0]; for n ≥ 0; W0 = 0. (7.4) Since Yn and Xn+1 are coupled together in this equation for each n, it is convenient to
deﬁne Un+1 = Yn − Xn+1 . Note that {Ui ; i ≥ 1} is a sequence of IID random variables.
From (7.4), Wn = max[Wn−1 + Un , 0], and iterating on this equation,
Wn = max[max[Wn−2 +Un−1 , 0]+Un , 0] = max[(Wn−2 + Un−1 + Un ), Un , 0]
= max[(Wn−3 +Un−2 +Un−1 +Un ), (Un−1 +Un ), Un , 0]
= ··· ··· (7.5) 7.2. THE WAITING TIME IN A G/G/1 QUEUE: 283
s3 s2
✛
Arrivals
0
✛
✛ x1 s1
✛ x2 ✲✛
✲✛
y0 w1 ✲ x3
w2
✲✛ y1 ✲✛ y2 ✲
✲ Departures ✲
✛ x2 + w2 = w1 + y1✲ Figure 7.2: Sample path of arrivals and departures from a G/G/1 queue. Customer 0
arrives at time 0 and enters service immediately. Customer 1 arrives at time s1 = x1 .
For the case shown above, customer 0 has not yet departed, i.e., x1 < y0 , so customer
1’s time in queue is w1 = y0 − x1 . As illustrated, customer 1’s sytem time (queueing
time plus service time) is w1 + y1 .
Customer 2 arrives at s2 = x1 + x2 . For the case shown above, this is before customer
1 departs at y0 + y1 . Thus, customer 2’s wait in queue is w2 = y0 + y1 − x1 − x2 . As
illustrated above, x2 + w2 is also equal to customer 1’s system time, so w2 = w1 + y1 − x2 .
Customer 3 arrives when the system is empty, so it enters service immediately with no
wait in queue, i.e., w3 = 0. = max[(U1 +U2 + . . . +Un ), (U2 +U3 + . . . +Un ), . . . , (Un−1 +Un ), Un , 0]. (7.6)
It is not necessary for the theorem below, but we can understand this maximization better
by realizing that if the maximization is achieved at Ui + Ui+1 + · · · + Un , then a busy period
must start with the arrival of customer i − 1 and continue at least through the service of
customer n. To see this intuitively, note that the analysis above starts with the arrival of
customer 0 to an empty system at time 0, but the choice of 0 time and customer number
0 has nothing to do with the analysis, and thus the analysis is valid for any arrival to an
empty system. Choosing the largest customer number before n that starts a busy period
must then give the correct waiting time and thus maximize (7.5). Exercise 7.2 provides
further insight into this maximization.
n
n
Deﬁne Z1 = Un , deﬁne Z2 = Un + Un−1 , and in general, for i ≤ n, deﬁne Zin = Un + Un−1 +
n
· · · + Un−i+1 . Thus Zn = Un + · · · + U1 . With these deﬁnitions, (7.5) becomes
n
n
n
Wn = max[0, Z1 , Z2 , . . . , Zn ]. (7.7) Note that the terms in {Zin ; 1 ≤ i ≤ n} are the ﬁrst n terms of a random walk, but it
is not the random walk based on U1 , U2 , . . . , but rather the random walk going backward,
starting with Un . Note also that Wn+1 , for example, is the maximum of a diﬀerent set of
variables, i.e., it is the walk going backward from Un+1 . Fortunately, this doesn’t matter
for the analysis since the ordered variables (Un , Un−1 . . . , U1 ) are statistically identical to
(U1 , . . . , Un ). The probability that the wait is greater than or equal to a given value α is
n
n
n
Pr {Wn ≥ α} = Pr {max[0, Z1 , Z2 , . . . , Zn ] ≥ α} . (7.8) This says that, for the nth customer, Pr {Wn ≥ α} is equal to the probability that the
random walk {Zin ; 1 ≤ i ≤ n} crosses a threshold at α by the nth trial. Because of the 284 CHAPTER 7. RANDOM WALKS, LARGE DEVIATIONS, AND MARTINGALES initialization used in the analysis, we see that Wn is the waiting time in queue of the nth
arrival after the beginning of a busy period (although this nth arrival might belong to a a
later busy period than that initial busy period).
As noted above, (Un , Un−1 , . . . , U1 ) is statistically identical to (U1 , . . . , Un ) and thus Pr {Wn ≥ α}
is the same as the probability that the ﬁrst n terms of a random walk based on {Ui ; i ≥ 1}
crosses a threshold at α. Since the ﬁrst n + 1 terms of this random walk provide one more
opportunity to cross α than the ﬁrst n terms, we see that
· · · ≤ Pr {Wn ≥ α} ≤ Pr {Wn+1 ≥ α} ≤ · · · ≤ 1. (7.9) Since this sequence of probabilities is nondecreasing, it must have a limit as n → 1, and
this limit is denoted Pr {W ≥ α}. Mathematically,2 this limit is the probability that a
random walk based on {Ui ; i ≥ 1} ever crosses a threshold at α. Physically, this limit is the
probability that the waiting time in queue is at least α for any given very largenumbered
customer (i.e., for customer n when the inﬂuence of a busy period starting n customers
earlier has died out). These results are summarized in the following theorem.
Theorem 7.1. Let {Xi ; i ≥ 1} be the interarrival intervals of a G/G/1 queue, let {Yi ; i ≥
0} be the service times, and assume that the system is empty at time 0 when customer 0
arrives. Let Wn be the time that the nth cus...
View
Full
Document
 Spring '09
 R.Srikant

Click to edit the document details