• No results found

On CP-utilization and processing times in an exponential CP-terminal system

N/A
N/A
Protected

Academic year: 2021

Share "On CP-utilization and processing times in an exponential CP-terminal system"

Copied!
12
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

On utilization and processing times in an exponential

CP-terminal system

Citation for published version (APA):

Wal, van der, J. (1983). On CP-utilization and processing times in an exponential CP-terminal system. (Memorandum COSOR; Vol. 8311). Technische Hogeschool Eindhoven.

Document status and date: Published: 01/01/1983

Document Version:

Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers)

Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website.

• The final author version and the galley proof are versions of the publication after peer review.

• The final published version features the final layout of the paper including the volume, issue and page numbers.

Link to publication

General rights

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

• You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement:

www.tue.nl/taverne Take down policy

If you believe that this document breaches copyright please contact us at: openaccess@tue.nl

providing details and we will investigate your claim.

(2)

EINDHOVEN UNIVERSITY OF TECHNOLOGY

Department of Mathematics and Computing Science

Memorandum COSOR 83 - I)

On CP-utilization and processing times 1n an exponential CP-terminal system

by

Jan van der Wal

Eindhoven, the Netherlands June 1983

(3)

On CP-utilization and processing times ~n an exponential CP-Terminal system

by

Jan van der Wal

Abstract

This paper considers a closed queueing network model for the case of a number of different terminals sharing one central processor (CP). When there are two or more jobs at the CP it has to be decided which job to serve first.

The servicing order will affect CP-utilization and responstimes. It is shown that CP-utilization is usually rather insensitive to the servicing order, so that the main consideration, when deciding upon the priorities at the CP, may be the processing times.

(4)

z

-1. Introduction

Consider the following model for the interaction between a number of terminals, say T

1,TZ, ••• ,TN, and a central processor (CP).

The terminals are producing jobs which have to be processed by the common facility CPo A terminal 'thinks' for some random time until he has pro-duced a job. Then the job is sent to the CP and instantaneously it arrives at the CP-queue. Meanwhile the terminal goes to 'sleep'. If the CP has pro-cessed the job then the terminal wakes up again and starts to think about a next job. Since the CP can serve only one job at a time there is a problem: in what order should the jobs of the CP-queue be served. Possible rules are: FCFS (first come first served), PS (processor sharing), or rules which give priority to some terminals above others. When one has to decide upon a ser-vicing order the following two aspects will be very important:

(i) what happens to the production rate of the system, here the CP-utilization; (ii) what happens to the responstimes.

Clearly in general the system will be very difficult to ureat analytically. Therefore in this paper the facilitating assumption is made that all think times and all service requirements.areindependent and exponentially distributed.

(5)

3

-Then the system is fully characterized by the thinkrates A. and the average ~

required servicetime I/~. of the terminals T., i

=

1,2, ••• ,N. Further it is

~ ~

allowed that jobs interrupt eachothers service without loss of efficiency, i.e. no swapping times and preemptive resume type interrupts.

The remainder of the paper is organized as follows. The body of the paper are the Sections 2 and 3 where the exponential system will be analyzed. Sections 4 and 5 indicate two of the difficulties that arise if some of the sympli-fying assumptions are dropped.

Section 4 deals with the case when preemptions are no longer allowed and Section 5 shows that the analysis is seriously complicated if thinktimes and servicetimes-are no longer exponential.

2. Optimal CP-utilization

In this section we review some recent results on the optimal CP-utilization. First let us consider the case that the thinkrates of all terminals are equal: L = A for i = 1,2, ••• ,N. For this problem one would expect some

~

control limit rule like smallest jobs first or maybe largest jobs first to optimize CP-utilization. Somewhat surprisingly, however, it turns out that the CP-utilization is in no way at all affected by the servicing order. This result has been established independently by Courcoubetis, Varaiya and Walrand

[ I ] and Van der Wal [3J.

Both proofs consider the remaining busy period duration for the CPo

Clearly, since the Cp's idle period duration is independent of the service-rule, the one that maximizes the remaining busy period duration is optimal.

(6)

4

-Van der Wal [3] uses a dynamic programming type of argument to show that the expected remaining busy period duration is independent of the servi-cing order. Courcoubetis, Varaiya and Walrand [1], using Laplace trans-forms and otherwise very similar arguments, prove the even stronger result that the distribution of the remaining busy period duration is independent of the servicing order.

An important consequence of this result is that one can give - as one usually wants - some priority to smaller jobs, for example by using PS. This will decrease the responsetimes of the smaller jobs at the cost of the larger jobs, but it does not affect CP-utilization.

Now that we have the result for the case of equal thinkrates, it is not difficult to guess what the optimal servicing order will be if the thinkrates are different. Indeed one may show that the optimal servicing order is the one that always serves the job of the faster thinking terminal.

In the proof given in Van der Wal [3] the following argument is used. Con-sider the two priority rules n1 = (kl,kZ' ...'~) and

nZ = (kl,kZ, ... ,kn_l,kn+l,kn,kn+Z, ••• ,kN). The notation means the following. priority, T

kZ the second highest have a job at the CP then the

have been interchanged. It can be shown that and T

kn+1 than n

Z (from the point of CP-utilization) if job of T k 5 the priorities of T k n n l 1S strictly better According to n

j terminal Tk has the highest

1

priority, etc. So, if only T

k ' Tk and Tk

5 8 13

is served. Thus the only difference between n

j and nZ is that

Ak > A

k ' and that the rules are equally good if Ak

(7)

5

-By repeatedly interchanging the priorities of two terminals we finally

. (* * *) . . l ' f

arr1ve at the result that a rule k

1,k2, ••• ,kN 1S opt1ma 1 A ~ A~•••~

*

*

1<1 k 2 to smaller jobs A k* N may

• Contrary to the case of equal thinkrates giving priority now influence the production rate of the system.

The result for different thinkrates has also been announced in Courcoubetis, Varaiya and Walrand [1].

Veran [2] has given a fairly simple recursive scheme to compute the CP-utilization by any of the terminals from which also the response times for each terminal are easily obtained.

3~ Priorities and processing times

In Section 2 we only have looked at the CP-utilization, further denoted by PCP' As already mentioned there is a second important criterion, namely that the responstimes should not become too large, which might be conflicting with our first aim of maximizing PCP' So it is necessary to know how seriously PCP decreases if a suboptimal service rule is used.

It is not very convenient to deal with N different terminals so we consider only two types of customers called type A en type B. There are NA type A and NB type B terminals respectively, having thinkrates AA and AB and average sercice times l/~A and 1/~B' In Table 1 some data are gathered. The servicing order is indicated by A, if type A has absolute priority, B in case of

priority for type B, or PS for the intermediate case of processor sharing. In all examples A is the fastest thinker. The columns PCP' PA and PB denote the total CP-utilization, the utilization by type A and type B respectively. The last two columns show the responsquotients for type A and type B respec-tively, i.e. the quotients of the responstime and the service time.

(8)

6

-Most examples, of which only a few are shown in Table ~ showed only a small reduction in PCP if instead of the optimal ordering the worst one was used. Usually the decrease in PCP was below 3%. Examples 1 - 4 all show this beha-viour. They also show that the absolute priority cases give quite an increase

NA AA J..I A NB AB J..I B PCP PA PB r A1JA rB1JB A .664 .324 .340 1. 24 4.17 Ex. I PS 3 5 40 15 2 80 .652 .298 .354 2.07 2.34 B .646 .284 .362 2.54 1.49 A .842 .385 .457 1. 20 5.87 Ex. 2 PS 2 10 40 10 5 80 .825 .301 .524 2.65 3. 10 B .813 .254 .560 3.87 1. 87 A .788 .596 .192 1.73 6.02 Ex. 3 PS 5 3 20 5 1 20 .768 .548 .220 2.46 2.72 B .757 .521 .236 2.93 I. 22 A .839 .470 .369 1.38 7. 13 Ex. 4 PS 3 2 10 10 1 20 .821 .389 .432 2.72 3.14 B .810 .348 .462 3.61 1.64 A .747 .333 .414 1.00 4. 16 Ex. 5 PS 1 5 10 10 1 20 .714 .266 .448 1. 76 2.33 B .696 .234 .462 2.27 1.64 A .872 .500 .372 1.00 6.92 Ex. 6 PS 1 10 10 10 1 20 .805 .362 .443 I. 76 2.59 B .776 .314 .462 2. 18 1.64 A .964 .667 .297 1.00 13.65 Ex. 7 PS I 20 10 10 1 20 .881 .442 .439 1. 76 2.81 B .849 .297 .462 2.09 1.64 Table 1.

(9)

7

-in responstimes for the lower priority jobs. In all these cases PS seems to be the golden mean.

Examples 5-7, differing only in the thinkrates of the type A customer, show a larger decrease of ACp if type B receives absolute priority, namely around ]0%. Further we see that, if type A has priority, an increase in AA gives quite an increase in the responstime for type B, whereas if type B has priority, the responstime for type A remains very reasonable.

Summarizing, one might say that all examples show that generally it is not unrealistic to pay more attention to the responstimes than to the CP-utilization.

4. The nonpreemptive case

As we have seen, if preemptions of the resume type are allowed then the fastest thinker policy maximizes PCP' But what if preemptions are not allowed? One may easily argue that if there are only two types of terminals then the fastest thinker still is the optimal one. So let us consider an example with three terminals. Let the the thinkrates be A] and A

Z = A3 with A] > AZ' Then in order to maximize PCP we have to serve a T] job whenever one is present. Now let ~2 > ~3' Then if at a moment upon which a T] job completes service both TZ and T

3 have a job at the CP, one has to choose one of the two. Intuitively it seems a little better to serve the TZ job first since then you might be able to switch back earlier to your favourite T] customer.

We have run some examples of this type, the results of which are displayed in Table Z.

(10)

- 8

-The last two columns display CP-utilization as a function of the service order (i,j,k). Al ~1 A2 1J 2 A3 1J3 PCp (I,2,3) PCP (1,3,2) 5 5 1 5 1 1 0.8483 0.8481 3 2 2 2 2 1 0.9730 0.9728 4 4 1 4 1 2 0.8066 0.8065 8 4 2 8 2 1 0.9500 0.9496 6 4 2 6 2 2 0.9137 0.9133 Table 2.

As we see, 1n all examples the difference between PCp(I,2,3) and P

Cp(I,3,2) is very small; from a practical point of view, negligible. In all cases the 'smallest job first' is the best rule for breaking ties.

It will be clear that by changing

A

3 into

A

3 + €, with € sufficiently small, policy (1,3,2) becomes the fastest thinker policy whereas (1,2,3) remains the one maximizing PCp.

So the fastest thinker policy may be suboptimal. However, as the examples indicate, the policy will in general be very good, i.e. practically optimal.

5. The nonexpontential case

In the previous sections both thinktimes and jobsizes have been exponential. Below we will analyze an example which demonstrates that this assumption is essentiaL

(11)

9

-Example

There are 2 terminals having deterministic thinktimes t l ~ 3, t

2

=

4 and deterministic and equal jobsizes wI = w

2 = 3. According to the result for the exponential case of Section 2 CP-utilization is maximized by giving priority to the fastest thinker. As we will see however, for the example PCP is maximized by giving priority to the slower thinker.

In order to obtain PCP let us look at the renewal points of the process for each of the two serv~ce orderings.

Figures 1 and 2 below display the time dependent behaviour for each of the two terminals if at time 0 they both deliver a job to the CPo The notation

~s as follows, with each letter corresponding to 1 timeunit:

W W W W the CP is working on a job of the terminal

T T T T the terminal ~s thinking

Q Q Q Q

the terminal has a job at the CP which is waiting

for the CP to become free, so queue~ng.

Priority (1,2) T T T W W W T T T W W W T T T W W W W W W T T T T W W

Q Q Q

W T T T T

Q

WWW

Q Q Q

o

3 6 9 12 Figure 1 15 18 21 T W

As we see in Figure I the time points 3 and 21 are renewal points for the process. Further the CP is busy from 3 to 9, 10 to 16 and 18 to 21, i.e. 15 out of 18 time units. Hence PCp(I,2)

=

5/6.

(12)

10 -Priority (2,1)

o

3 W W W T T T

Q

T T T T W W W 7 10

W

T Figure 2

In Figure 2 the points 3 and 10 are renewal points and the CP ~s busy between 3 and 6 and between 7 and 10. Hence pCp(2,1)

=

6/7.

So indeed, ~n this example the fastest thinker rule ~s suboptimal.

References

[IJ Courcoubetis, C., P. Varaiya and J. Walrand, Invariance in resource sharing problems, In Procedings of the 21st IEEE Conference on

Decision and Control, December 1982.

[2J Veran, M., Etude d'une file d'attente avec priorites, in the procedings of the international seminar on modelling and performance evaluation methodology, Volume III, pp. 287-307, INRIA, January 1983.

[3J Wal, J. van der, CP-utilization in an exponential CP-Terminal system with equal think times and different job sizes, Eindhoven University of Technology, Dept. of Math. and Compo Sci., Memorandum CaSaR 82-13, August 1982.

[4J Wal, J. van der, The maximization of CP-utilization in an exponential CP-Terminal system with different thinktimes and different jobsizes, Eindhoven University of Technology, Dept. of Math. and Compo Sci., Memorandum CaSaR 82-14, August 1982.

Referenties

GERELATEERDE DOCUMENTEN

• De verkoper en diens makelaar zal aan aspirantkoper al hetgeen meedelen dat ter kennis van koper behoort te worden gebracht, met dien verstande dat inlichtingen over feiten welke

Mayele a été appréhendé le 5 Octobre 2010 à la suite d'une action conjointement menée par la brigade du Nord Kivu de la MONUSCO et les autorités congolaises.. Cette action de

De grote verschillen in mi- neralenoverschotten tussen melkveebedrijven die niet samenhangen met de intensiteit van de bedrijven, geven aan dat er nog kansen voor een verdere

In een aantal boringen worden ook deze soorten in een hoofdzakelijk Plioceen gezelschap aangetroffen.. minuta uit de Zanden

In formulas, we consider the matricized version of the real tensor T , given by equation (6) where matrix C contains the independent source values, and the mixing matrix M equals (A

We propose a new algorithm to impose independence constraints based on second order statistics in one mode of the Parallel Factor Analysis / Canonical Decomposition, also known as

Onderzocht moet worden of deze data gebruikt mogen worden voor een applicatie als de website daarmoetikzijn?. Tevens moet onderzocht worden of er nog andere GIS-data op

Voorstel ra