Tải bản đầy đủ - 0trang
5 M|G|1 queueing systems with server breakdowns
5 MIG 1l-FCFS
The resume policy
of the server.
Is a new vacation
server finds the queue empty, or is the server just becoming
on the application
if after a vacation
idle in these cases?
that one studies, one can decide for one or another model.
As an example,
a system including
of a system.
modelled as server vacations which can only start when there are no jobs to be served.
Depending on the maintenance strategy, a maintenance activity may be started after a
fixed number of services or after a fixed time interval,
going into too much detail regarding
and batch arrivals
We first consider
comes first (compare
schedule: e.g., every 20000 km or once a year, whichever
ing systems with server breakdowns
and single arrivals
we will present M]G] 1 queue-
in Section 5.5.1 and with server
in Section 5.5.2.
of the MI G ] 1 model in which the server takes a vacation
the system becomes empty.
from a vacation,
the server starts
working again when there are jobs queued, until the station empties
upon return from a vacation, the server finds the queue empty, it takes
This model is called an Mj GI 1 model with exhaustive service and multiple
Assume that jobs arrive
as a Poisson stream with intensity
X, and that job lengths
have a distribution
by the first two moments E[S] and E[S2]. As usual,
V and is characterised by its first two moments
p = XE[S]. A
E[V] and E[V2].
Let us use the method of moments to derive the average waiting
consists of three parts. The first part is the average remaining
time, given that a vacation is going on at the instance of arrival. The latter is the case
1 - p, the probability
that there is no work to be done. The second and
third part are similar to the corresponding parts in the normal MIG] 1 queue: p times the
average residual service time for the job being served and E[N,] = E[N] - p times the
average service times of the jobs queued in front of the arriving
WV = Cl- d2E[vl+
By using Little’s
law to rewrite
an d rearranging
terms, we obtain
q/j/T] = E[v21 I WS21
We observe that the expected waiting
2( 1 - p) *
of a packet in this system simply equals
and the waiting
the sum of the residual vacation duration, E[V2]/2E[V],
in a normal M]G/l model. This result is not surprising.
time as perceived
All jobs being served in fact receive
service as in a normal MJ G] 1 queue, however, delayed by the expected remaining
time (of the last vacation).
A slight change to the above model is the case where at most one vacation
ibf GI I model
from a vacation
and a single
Whenever the server returns
becomes idle, waiting on the next
and finds the system empty, it simply
we then have the following
where we recognize the normal M/G]1 waiting time, plus a term accounting for the server
vacation. In this term, f;(X) is the Laplace transform of the density function of V, evaluated at s = X (see also Appendix
For the above evaluation
= X) = (lm
we thus require knowledge
can be observed though, is the fact that the single vacation
smaller expected waiting time than the multiple
f;(X) in the left denominator
is always positive,
of f;(s) and, hence, of the distribution
model yields a
vacation model since the additive term
thus yielding a smaller contribution
We can easily generalise the M]G] 1 model with server breakdowns to one with batch
arrivals, as discussed in Section 5.4. We have a Poisson arrival process of batches with
batch of random size H consists of Ic = 1,2,. . . mini-packets
in a batch is E[H];
hk, k = 1,2, *se. The expected number of mini-packets
the second factorial moment is E[H( H - l)]. E ac h mini-packet
requires a random amount
rate X. An arriving
first and second moment E[S] and E[S2], respectively.
~JwqE[Sl, we have for the average message waiting time E [W] the following result:
of service with
WV = 2E[Vl+
20 - P>
WHl(1 - P> ’
5 M 1G 1l-FCFS
where the first term indeed is the residual vacation time and the latter two terms represent
the earlier presented average message waiting
time in an MIHl ]G] 1 model without
q ueue is treated in most textbooks
earliest results on the M]G] 1 queue have been derived by Pollaczek . Early work on the
embedded Markov chain approach has been performed by Palm  and Kendall .
on queues with server breakdowns
of the M(G]l
can be found in the survey of Doshi .
q ueue are treated in depth in the book by Takagi .
5.1. The MIGll
In a university computer center three types of jobs are distinguished
(with their relative
student jobs (30%): faculty jobs (507)o and administrative
jobs (20%). Jobs
of these three classes have negative exponential
lengths with mean values 10, 30 and 20
the first and second moment of the job service time.
2. At which overall job arrival
3. Express E[W]
as a function
rate does the system become overloaded?
of the overall arrival
rate X and draw a graph of E[W]
4. What value does the arrival rate reach, when the expected waiting time is at most
equal to two times the expected service time ? How big is the utilisation in that case?
of a disk
single disk system.
The disk has t tracks
and s sectors per
track. We assume that seek operations can be performed with constant speed w tracks
per second. The number of disk rotations per second is T. A single sector (containing b
bytes) corresponds to the smallest unit of transfer (a block). We consider the case where
disk requests (for single blocks) arrive as a Poisson process with rate X and assume that
requests are uniformly
over the disk; successive requests are independent
another. The service time of a single request then consists of the rotational
seek time and the block transfer time.
1. Find expressions
for the first and second moment of the rotational
2. Find expressions
for the first and second moment of the seek time.
3. Find expressions
for the first and second moment of the block transfer
4. Give an expression
for the expected response time for a disk request.
5. How would the analysis change when a single disk request consists of i blocks with
bi (i = 1, . . . , s) under the assumption
that these blocks are stored con-
The issue of disk modelling
is discussed in detail in .
a MIG 11 queue with batch arrivals.
Every batch consists of H mini-jobs (mini-packets),
furthermore have: E[S] = 0.03 deterministically.
the mean batch size E[H].
the second factorial
process (of batches) has rate A.
hk = $, for k = 1, s. s, 5. We
3. How large can X be before the system becomes unstable?
in case p = 0.9.
5. Now, suppose we are not aware of the results for the MlGll queue with batch arrivals.
Instead, to approximate the fact that arrivals take place in batches, we accelerate the
process with a factor E[H]
queueing model. How large is E[W]
and treat the resulting
system as a normal MI G/ 1
in this case?
6. To improve upon the approximation
derived in the previous exercise, we now assume
that arrivals of batches do take place, but we “encode” the batch size in the service
times, i.e., we assume that a service lasts &k
when the arrival
consists of k mini-
packets (which is the case with probability
hk, F; = 1, .. . ,5). Compute E[S] and
E[S2] and evaluate the expected waiting time E[W] using the normal MlGll result.
Performance of Computer Communication Systems: A Model-Based Approach.
Boudewijn R. Haverkort
Copyright © 1998 John Wiley & Sons Ltd
ISBNs: 0-471-97228-2 (Hardback); 0-470-84192-3 (Electronic)
MI GI 1 queueing
N this chapter we continue the study of MlGjl q ueueing models. In particular, we will
study the influence of various new scheduling disciplines, in comparison to the FCFS
scheduling we have addressed in Chapter 5. We address non-preemptive priority scheduling
in Section 6.1 and preemptive priority scheduling in Section 6.2. A limiting case of the
priority scheduling is shortest job next scheduling, which is discussed in
Section 6.3. Then, in Section 6.4 we discuss the round robin scheduling strategy and, in
Section 6.5, its limiting
Finally, we discuss scheduling
based on the already elapsed service time of jobs in Section 6.6.
Up till now we have assumed
that all the jobs that need to be served have the same
priority. In practice, this is often not the case. In communication
systems, as an example, short packets that contain control information might have priority over the generally
longer user packets.
systems which transmit
are needed is in integrated
data such as voice or video samples next
data. Also in computer system
make sense, e.g., to distinguish between interactive
scheduling multiple priority classes do
jobs and computation-intensive
jobs. To illustrate
let us consider the following
the need for priority
6.1. A computer
center where jobs enter as a Poisson process with
rate X. Of the
6 M( G 11 queueing
Table 6.1: Mean waiting
incoming jobs, a fraction
( in seconds) in a non-priority
pi = 40% comprises
fixed length of 10
msec, and a fraction of CQ = 60% comprises batch jobs with a fixed length of 250 msec. We
can compute the expected service time E[S] = 0.4 x 10 + 0.6 x 250 = 154 msec. We thus
find that the system becomes unstable at X = l/O.154 z 6.6 job arrivals per second. For
the second moment we find E[S2] = 0.4 x 0.012 + 0.6 x 0.2502 = 0.0375 seconds2. Using
the standard MlGll result, we can compute the expected waiting times for increasing load,
as indicated in Table 6.1
What can be observed is that even for small utilisations the average waiting time E[W]
is significantly larger than the time required to serve interactive jobs. This is an undesirable
situation which can be overcome by introducing (higher) priority for the interactive jobs.
An important characteristic of priority strategies is whether they are preemptive or not:
In preemptive priority strategies a job in service is stopped being served as soon as
a higher-priority job arrives. In that case, first the higher-priority job is served,
after which the service of the lower-priority job that was originally being serviced
is resumed or restarted. Preemptive scheduling strategies thus order the jobs in the
queue, including the one in service.
In non-preemptive priority strategies, a job in service is always first finished before a
new job is put into service. Non-preemptive priority strategies only order the jobs in
the queue. Apart from the introduced overhead, preemptive priority strategies are
better for the higher-priority jobs than non-preemptive ones. On the other hand,
non-preemptive strategies are generally easier to implement and cause lessoverhead.
In this section we focus on non-preemptive priority
devoted to preemptive priority scheduling.
scheduling, whereas Section 6.2 is
Figure 6.1: M]G]l
model with P priority
Let us now consider a model of a single server system
classified in P priority
jobs can be
P. We assume that class 1 has the
highest and class P the lowest priority.
Jobs of class r = 1, . . . , P, arrive at the queueing
station according to a Poisson process with rate X,. The average service requirement for
class r jobs is E[S,] = l/,+. The second moment of the service requirements for class r
jobs is E[S,2]. In Figure 6.1 we show the M]G/l model with multiple priorities. Note that
we have drawn multiple queues for convenience only; one could also consider a single queue
in which the customers are ordered on the basis of their priority.
We will now derive a relation between the average waiting time E[W,]
of a class r job
and the average waiting times of jobs of higher priority classes 1,. . . , r - 1.
A job of class r arriving at the queueing station has to wait before it can be served. Its
time IV, consists of three components:
service time of the job in service, if any;
The time it costs to serve all the jobs of priority
and equal priority
classes k = 1,. . . , r, i.e., of all higher
jobs, that are present in the system upon the arrival of the class
The time it costs to serve jobs of higher priority
, r - 1, that arrive during the waiting
In an equation,
this takes the following
classes, i.e., jobs of classes k =
period of the class r job.
6 MI G 11 queueing
where W, is the waiting
time of class r jobs, Tp the remaining
service time of the job in
service, TL the time it costs to serve all the class Ic customers
arrival of the class r customer (note the summation
TL the time it costs to serve all the class k customers
index that ranges from 1 to
We will now derive expressions
that are present upon the
index that ranges from 1 to r) , and
that arrive during IV, and that need
to be served before the class r customer (note the summation
r - 1). Taking expectations on both sides we obtain:
= E[Tp] + x
E[T;] + c
for the three terms on the right hand side of this equation:
The remaining service time of the job in service clearly depends on the class of the job
that is in service. A job of class r is in service with probability
the utilisation caused by class r jobs. The remaining
In total, we thus obtain:
E[Tp] = 5 pk=
The term E[Ti] is determined
pT, where pr = X,E[S,],
time of a class r job
= ; 5 &E[s;].
by the number of jobs per class in the queueing station
upon the arrival of the new class r job. Due to the PASTA property and Little’s
law we know that on average there are E[ N*,k] = .&E[Wk] class k jobs upon arrival
in the queue. Since they require on average I/pk
Finally, we have to calculate E[T.
to Wait, on average &E[wr]
amount of service each, we have
D uring the E[W,] time units the class r job has
j o11sof class k arrive, each requiring I/&
we have E[TJ = &E[Wr]/pk
Substituting these results in (6.2), we obtain
E[W,]= 5 +[S;] + 2 PkE[Wk]
+ ‘2 PkE[W,]
erms to the left, we obtain
Defining 0,. = C’,=, Pk (with
go = 0) and dividing
by (1 - a,) we obtain:
1 - CT,
We thus have established a relation that expresses E[W,] in terms of E[W,_I]
E[W,]. Taking the case f = 1 we obtain:
E[%=] c:z, hE[S;c2]
Notice the similarity of this expression with the normal M]G]l
waiting time formula. If
P = 1, the above expression even reduces to the PK result we have seen before. For the
casef = 2 we obtain
E[Tp] + plE[W] = . . . =
Continuing this process we will recognize the following relation:
E[wT1 = (1 - q.)(l - q.-1)’
with E[Tp] = CL=, &E[$!]/2.
Th’is result is known as Cobham’s formula [57, 581. Notice
that we can express the average response time for class r as
E[&] = E[S,] +
(1 - a,)(1 - G-1)’
Example 6.2. A computer center with two priority classes.
To illustrate the impact of the use of priorities, let us readdress the computer center that
servestwo types of customers. Instead of merging the two classeswe now give priority to the
shorter interactive jobs. In Table 6.2 we show the results. For easein comparison we also
include the non-priority results. We observe that the average waiting time for interactive
jobs is only slightly longer than the remaining service time of the job in service (shown
in the rightmost column of the table). As can be seen, the performance improvement for
interactive jobs is tremendous, at almost no performance penalty for the batch jobs.
6 MIG 11 queueing
Table 6.2: The waiting
remains the same.
times in a computer
the ordering of service of arriving
center with job priorities
in fact does nothing
jobs. The amount of work
more than change
to be done by the queueing
Note that we assume that the overhead for “implementing”
the priorities is negligible. One might therefore expect that some kind of law exists that
expresses that whenever one gives one class of jobs a higher priority, that other classes of
jobs suffer from this.
Indeed, such conservation
law does exist. This law expresses that the sum of the average
waiting times per class, weighted by their utilisations, remains the same, independent of
the priority assignment to the various classes. This law, often denoted as Kleinrock’s
law  has the following
c PJv?-1= PE~WI,
where p = C,‘=, pr, and E[W] is the average waiting time when there are no priority
classes. E [W] can thus be derived by the normal M]G]l result. Substituting
pr = X,/p,.
(Little’s law for the server only) and E[W,] = E[N,,,]/X,
(Little’s law for the queue only)
= 5 prE[Wr]
side of this equation expresses
= 5 E[N,,]E[S,].
of work in the system, that is, the sum over all priority
that is often called the amount
classes of the number of queued
by their average service requirements,
6.3. The conservation
law for the computer
As an example of the conservation law reconsider the computer center with job priorities.
From Table 6.1 we read that for X = 5, the amount of work in the system equals 0.314.
+ pbE[Wb] f rom Table 6.2 yields the same result.
job might have to wait for a low-
priority job already in service when the former arrives.
allow for the preemption of low-priority
jobs by arriving
To circumvent this, we might
jobs. In a time-
system such a scheduling mechanism
can be implemented
system such a scheduling
can be applied at the mini-packet
A job that has been preempted
can be handled in various
very well; in
ways when the processor
restarts working on it. Most efficient is to resume the work from the point where the
preemption took place. This is called the preemptive resume (PRS) strategy. Instead of
resuming the work, the job can also be restarted. Two possibilities exists in this case, at
least from a modelling point of view. One can either repeat exactly the same job, or one
can repeat a job with a service time redrawn from the service time distribution.
variant is known as the preemptive repeat identical (PRI) strategy and is what happens
most often in reality.
The latter strategy
As the PRS-strategy
excludes the possibility of work being redone, it seems to be the most
efficient. That the PRD-strategy
is more efficient than the PRI-strategy
can be seen as
observe that the probability
job increases in length.
long, and the probability
a different job drawn
that it will be shorter
of a job being preempted
increases when the
If such a job is then later repeated identically, it will again be
that it is preempted remains relatively high. If on the other hand
from the same distribution
is repeated, there is a fair probability
than the “original” (long) one. It will thus finish faster and will be
preempted with a smaller probability.
We now focus on the PRS-strategy.
For jobs of the highest priority
classes does not matter
imposed by the lower priority
can simply be derived via the PK-formula
class (class 1) the
at all. Therefore,
for class 1:
E[W,] = AlE[sfl
p1) = 2(1 - 01)’
For jobs of class r = 2,-s- , P, the situation is slightly different.
These jobs first of all
have to wait for the remaining service time of the job in service if it is of class r or higher
priority, i.e.,of one of the classes 1, -9. , r. The expected value of this quantity equals
Notice the difference with
case here. There, the arriving