Tải bản đầy đủ - 0 (trang)
5 M|G|1 queueing systems with server breakdowns

5 M|G|1 queueing systems with server breakdowns

Tải bản đầy đủ - 0trang

110



5 MIG 1l-FCFS

The resume policy



l



of the server.



Is a new vacation



started



server finds the queue empty, or is the server just becoming

Depending



on the application



queueing



models



if after a vacation



the



idle in these cases?



that one studies, one can decide for one or another model.



As an example,



maintenance



work



When modelling



a system including



is preferably



done during



its maintenance,



idle periods



the maintenance



of a system.



activities



could be



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,

car maintenance

Without



5.5.1



going into too much detail regarding

and batch arrivals



Single



arrivals



We first consider



a variant



random



comes first (compare



schedule: e.g., every 20000 km or once a year, whichever



ing systems with server breakdowns

breakdowns



whichever



length whenever



derivations,



and single arrivals



a



comes first).



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.



Upon returning



of



from a vacation,



the server starts

again. Whenever,



working again when there are jobs queued, until the station empties

upon return from a vacation, the server finds the queue empty, it takes



another vacation.

vacations.



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

characterised

by the first two moments E[S] and E[S2]. As usual,

vacation

has

a

duration

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

waiting



time E[W]



time.



The average



consists of three parts. The first part is the average remaining



vacation



time, given that a vacation is going on at the instance of arrival. The latter is the case

with probability

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



job.



Consequently,



we



have



w21 p2E[sl+

w21 Jw%1w1*

WV = Cl- d2E[vl+



(5.37)



5.5 M(GI1



queueing



By using Little’s



systems



with



law to rewrite



E[N,]



server



breakdowns



= XE[W]



111



an d rearranging



terms, we obtain



q/j/T] = E[v21 I WS21

2E[V]

We observe that the expected waiting



(5.38)



2( 1 - p) *



time E[W]



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



with



from a vacation

arrival.



For E[W]



exhaustive



service



and a single



E[W]



=



slightly



result:



XE[S2]



+ XE[V])



un



Whenever the server returns

becomes idle, waiting on the next



more complex



XE[V2]



2(&(X)



is taken:



vacation.



and finds the system empty, it simply

we then have the following



vacation



+ 2(1--



(5.39)



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

f;(s



For the above evaluation

of V.



What



B):

= X) = (lm



eCtfv(t)dt)



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,

the waiting

5.5.2



.

(5.40)

s=x

of f;(s) and, hence, of the distribution



model yields a



vacation model since the additive term

thus yielding a smaller contribution

to



time.



Batch



arrivals



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

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

probabilities

the second factorial moment is E[H( H - l)]. E ac h mini-packet

requires a random amount



rate X. An arriving



Recalling that

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



P=



E[V2]



WV = 2E[Vl+



XE[H]E[S2]



20 - P>



+ E[H(H



- l)]E[S]



WHl(1 - P> ’



(5.41)



112



5 M 1G 1l-FCFS



queueing



models



where the first term indeed is the residual vacation time and the latter two terms represent

the earlier presented average message waiting



5.6



Further



The M]G]l



time in an MIHl ]G] 1 model without



vacations.



reading



q ueue is treated in most textbooks



on computer



performance



evaluation.



The



earliest results on the M]G] 1 queue have been derived by Pollaczek [235]. Early work on the

embedded Markov chain approach has been performed by Palm [228] and Kendall [155].

Background



on queues with server breakdowns



Many variants



5.7



of the M(G]l



can be found in the survey of Doshi [76].



q ueue are treated in depth in the book by Takagi [274].



Exercises



5.1. The MIGll



queue.



In a university computer center three types of jobs are distinguished

(with their relative

occurrence):

student jobs (30%): faculty jobs (507)o and administrative

jobs (20%). Jobs

of these three classes have negative exponential

milliseconds, respectively.

1. Compute



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]

against X.



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?

5.2. Modelling

We consider



of a disk

a (simplified)



system.

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



distributed



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.



of one



latency, the



5.7 Exercises



113



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



latency.



time.



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

probability

secutively.



bi (i = 1, . . . , s) under the assumption



that these blocks are stored con-



The issue of disk modelling



is discussed in detail in [248].



5.3. MIG/l



batch



Consider



queues



with



arrivals.



a MIG 11 queue with batch arrivals.



The arrival



Every batch consists of H mini-jobs (mini-packets),

furthermore have: E[S] = 0.03 deterministically.

1. Compute



the mean batch size E[H].



2. Compute



the second factorial



moment E[H(H



with



process (of batches) has rate A.

hk = $, for k = 1, s. s, 5. We



- l)].



3. How large can X be before the system becomes unstable?

4. Compute



E[W]



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

arrival



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)



Chapter



6



MI GI 1 queueing

scheduling



I



models



with



various



disciplines



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

non-preemptive

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

disciplines



6. I



case, processor



sharing scheduling.



Finally, we discuss scheduling



based on the already elapsed service time of jobs in Section 6.6.



Non-preemptive



Up till now we have assumed



priority



scheduling



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.

communication



Another



case where



systems which transmit



priorities



real-time



are needed is in integrated



services



data such as voice or video samples next



to time-insensitive

data. Also in computer system

make sense, e.g., to distinguish between interactive



scheduling multiple priority classes do

jobs and computation-intensive

batch



jobs. To illustrate



let us consider the following



Example

Consider



the need for priority



6.1. A computer

a computer



center



scheduling,

without



example.



priorities.



center where jobs enter as a Poisson process with



rate X. Of the



116



6 M( G 11 queueing



Table 6.1: Mean waiting

incoming jobs, a fraction



models



with



1



0.1540



0.0222



2



0.3080



0.0542



3

4



0.4620

0.6160



0.1046

0.1953



5

6



0.7700

0.9240



0.4076

1.4803



times E[W]



various



scheduling



( in seconds) in a non-priority



pi = 40% comprises



inter-active



jobs with



disciplines



computing



center



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.

0

An important characteristic of priority strategies is whether they are preemptive or not:

l



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.



l



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



6.1 Non-preemptive



priority



117



scheduling



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



classes, numbered



1 through



classes



in which



arriving



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

waiting

l



l



time IV, consists of three components:

The remaining



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



r job;

l



The time it costs to serve jobs of higher priority

l;..



, 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.



form:



W)

k=l



k=l



6 MI G 11 queueing



118



where W, is the waiting



models



with



various



scheduling



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



l



index that ranges from 1 to



r-l



T



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[W,]



= E[Tp] + x



E[T;] + c



k=l



k=l



E[T;].



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

equals E[S,2]/2E[S,].

In total, we thus obtain:

E[Tp] = 5 pk=

k=l

2E[sd



l



disciplines



The term E[Ti] is determined



pT, where pr = X,E[S,],



processing



time of a class r job



= ; 5 &E[s;].



(6.3)



k=l



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

E[G]



l



=



E[&,k]/Pk



=



AkE[wk]/Pk



=



Finally, we have to calculate E[T[].

to Wait, on average &E[wr]



amount of service each, we have



PkE[Wk]-



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



service. Thus,



= pkE[W,].



Substituting these results in (6.2), we obtain



E[W,]= 5 +[S;] + 2 PkE[Wk]

+ ‘2 PkE[W,]

k=l



=



c







k=l

r-l

AI,



yE[S,2]



k=l

p



=



c



k=l



+ c



k=l



PkE[wk]



k=l

AI,



~EIS;l



+ 2



PkE[W,]



k=l



r-l



+ c



k=l



PkE[w/c]



+ E[W,]



(64



6.1 Non-preemptive

Bringing



priority



the E[W,]-t



119



scheduling



erms to the left, we obtain



(6*5)

Defining 0,. = C’,=, Pk (with



go = 0) and dividing



E[W,] =



c:z,



+E[S,Z]



by (1 - a,) we obtain:

+



CTk,;



PkE[Wk]



W)



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[wll



E[%=] c:z, hE[S;c2]

w.Pl

-------===

1 ---pi



= (1-Q)



W-d



(6.7)



*



Notice the similarity of this expression with the normal M]G]l



through



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



JWPI



E[Tp] + plE[W] = . . . =



E[W,] =



(1



-



(1



02)



-



Qz>(l



-



01)



*



(6.8)



Continuing this process we will recognize the following relation:



WY

E[wT1 = (1 - q.)(l - q.-1)’

with E[Tp] = CL=, &E[$!]/2.



(6.9)



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,] +



WY

(1 - a,)(1 - G-1)’



(6.10)



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

•I

interactive jobs is tremendous, at almost no performance penalty for the batch jobs.



120



6 MIG 11 queueing



x



P



EWl



Ai



pi



Ab



with



various



Pb



E[Wi]



scheduling



E[Wb]



disciplines



E[Tp]



1 0.1540



0.0222



0.4



0.004



0.6



0.15



0.0188



0.0222



0.0188



2

3



0.3080

0.4620



0.0542

0.1046



0.8

1.2



0.008

0.012



1.2

1.8



0.30

0.45



0.0378

0.0570



0.0547

0.1059



0.0375

0.0563



4

5



0.6160

0.7700



0.1953

0.4076



1.6

2.0



0.016

0.020



2.4

3.0



0.60

0.75



0.0763

0.0958



0.1987

0.4164



0.0750

0.0938



6



0.9240



1.4803



2.4



0.024



3.6



0.90



0.1154



1.5183



0.1126



Table 6.2: The waiting

The non-preemptive



priority



remains the same.



times in a computer



scheduling



the ordering of service of arriving

station



models



strategy



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

conservation



law [160] has the following



form:



P



c PJv?-1= PE~WI,

r=l



(6.11)



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)

we obtain

pE[W]



= 5 prE[Wr]

r=l



The right-hand



= 5

r=l



kE[N,,l

Pr



side of this equation expresses



= 5 E[N,,]E[S,].



X7-



a quantity



of work in the system, that is, the sum over all priority

jobs multiplied

Example



(6.12)



r=l



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



center



with



job priorities.



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.

Computing



piE[Wi]



+ pbE[Wb] f rom Table 6.2 yields the same result.



Cl



6.2 Preemptive



6.2



priority



Preemptive



In non-preemptive



121



scheduling



priority



priority



scheduling



scheduling,



a high-priority



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

high-priority

jobs. In a time-



sharing computer



system such a scheduling mechanism



can be implemented



a communication



system such a scheduling



can be applied at the mini-packet



level.

A job that has been preempted



mechanism



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.

The former

variant is known as the preemptive repeat identical (PRI) strategy and is what happens

most often in reality.



The latter strategy



is known



as preemptive



repeat diflerent



(PRD).



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

follows.



First



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



workload



classes does not matter



imposed by the lower priority



can simply be derived via the PK-formula



class (class 1) the



at all. Therefore,



E[W,]



for class 1:



E[W,] = AlE[sfl

2(1-



W[S,2]



p1) = 2(1 - 01)’



(6.13)



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

(6.14)

Notice the difference with



the non-preemptive



case here. There, the arriving



job always



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

5 M|G|1 queueing systems with server breakdowns

Tải bản đầy đủ ngay(0 tr)

×