• No results found

An algorithm for the evaluation of performance measures in a CP-terminal system

N/A
N/A
Protected

Academic year: 2021

Share "An algorithm for the evaluation of performance measures in a CP-terminal system"

Copied!
20
0
0

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

Hele tekst

(1)

CP-terminal system

Citation for published version (APA):

van Doremalen, J. B. M. (1984). An algorithm for the evaluation of performance measures in a CP-terminal system. (Memorandum COSOR; Vol. 8407). Technische Hogeschool Eindhoven.

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

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)

Department of Mathematics and Computing Science

Memorandum COSOR 84-07

An algorithm for the evaluation of performance measures in

a CP-terminal system by

J.B.M. van Doremalen

Eindhoven, The Netherlands November 1984

(3)
(4)

1. Introduction

In this paper we will discuss ~n algorithm for the evaluation of performance measures in a CP-terminal system with preemptive resume priorities. The al-gorithm is an efficient implementation of a recursive scheme which has been developed in [1]. Some of the ideas can be found already in the paper of Veran [4], but the algorithm itself is new.

The queueing system to be analysed is a model of a computer system consisting of a number of terminals and a central processor, a so-called CP-terminal system. Another application of the model is the machine-interference problem. For reasons of presentation we will use the terminology of the CP-terminal system.

The system consists of N terminals coupled with one central processor, the CPo At the terminals the stochastically independent thinktimes are negative ex-ponentially distributed with parameter A for terminal n, n ; 1,2, ... ,N.

n

The service times for jobs at the CP are stochastically independent and dis-tributed according to a distribution function G for a job from terminal n,

n n ; 1,2, ... ,N.

The service discipline at the CP is governed by a preemptive resume priority rule in the following manner. A terminal m job, delivered at the CP, inter-rupts the service of a job from terminal n at the CP if m

<

n. Terminal m jobs are said to have a higher priority than terminal n jobs. The service for the job from terminal n is resumed as soon as no higher priority jobs are being processed at the CP anymore.

The terminals in a natural way are divided in R sUbsequent groups, which share their job and think-time characteristics. The K terminals belonging

(5)

to the terminal group r, r = 1,2, ... ,R , have common think rates

A*

and

r

common service time distributions G*.

r

the following relations for the think-rates

r

L

K

i , r

=

1,2, ...,R, we have i=l

and service time distributions

A*

=

A

r n G* ::; G r n N r_1

<

n ~ Nr and r

=

1,2, ... ,R N 1

<

n ~ Nand r = 1,2, ... ,R . r- r

These groups have to be interpreted in the following way. As we have shown in [1] the analysis of a CP-terminal system with terminal groups can be transformed into the analysis of a CP-terminal system with single terminals and preemptive resume priorities. To develop an efficient algorithm for the

performance measure evaluation it is necessary, however, to keep in mind the shared characteristics within the original groups.

The set up of the paper is as follows. In Section 2 we shortly recapitulate the recursive scheme developed in [1] to evaluate the fractions of time the CP is processing jobs from terminal n, n = 1,2, ... ,N. It will be indicated where computational problems rise. The algorithm will be developed in

Sec-tion 3. The emphasis will be on an enumeraSec-tion to implement the recursion. In Section 4 an important subproblem, involving the service time distribu-tion and its influence, will be solved for some specific examples.

(6)

2. A recursive scheme to evaluate performance measures

It will be convenient to introduce the following notations, for n

=

1,2, ... ,N,

A

.-

A + A (where A

O

=

0).

n n-1 n

w

.-

or"

x d G

n(x) mean service time of a job from terminal n. n

u

.-

fraction of time the CP is processing jobs from terminal n. n

U

.-

U + u (where U

o =

0) .

n n-1 n

As we have shown in [1], it is sufficient to evaluate the fraction of time the CP is processing jobs from the successive terminals in order to obtain the other performance measures, e.g. mean response times, as well. These values u can be computed by evaluating a recursive scheme. Let us

recapi-r

tulate the results discussed at length in [1].

The basic scheme for the computation of the values u is the following one-n

dimensional recursion in the values U , n = 1,2, ... ,N , n (1) U

=

n U 1+ [A +A 1T (A)]w n- n n-1 n n n 1 + [A +A 11T (A )]w n n- n n n

The values 1T (A ) have a probabilistic interpretation. Unfortunately the

n n

evaluation of these values is far from trivial. The sequel of this paper is devoted to the development of an algorithm to compute these values.

The recursive scheme for the computation of the values 1T (A ) is given by

n n

(7)

variable x. (2) 7T (x) n

= {

O. n

=

1 and x ~ 0 F (7T l(x).7T l(x+A 1).x) • n n- n- n- n

>

1 and x ~ 0 .

where the function F implicitly is given by the following relations. n

For n = 2.3 •...• N and x ~ O. 7T (x) is given by. n

(3) 7T (x)

n

A

A

= An-l 'i'n-l (x) +

(1 -

An-I)

~

n-l (x)

n-l n-l

where. for n

=

2.3 •...• N and x ~ O. 'i' l(x) is given by.

n-(4) 'i'n_l (x) = 1 -

r

(x + A 7T (x»

n-l n-2 n-l

where. for n

=

2 and x ~ O. ~ (x) is given by. n-l

(5) ~n_l(x)

=

0

and where. for n

=

3.4 •...• N and x ~ O. ~ l(x) is given by.

n-In Relation (4)

r

denotes the Laplace-Stieltjes transform of G • i.e.

n n

00

(7) e

-ax

d G (x)

(8)

3. An enumeration algorithm to evaluate the values ~ (A )

n n

In this section we will develop an algorithm to implement the recursion, given in Section 2, efficiently. We will confine ourselves to the formula-tion in terms of Relaformula-tion (2). In Secformula-tion 4 it will be shown how the

explicit evaluation of Relations (3) through (6) can be implemented in case the service times are distributed according to a phase-type or a discrete distribution.

The algorithm is based on a transformation of the real recursion-variable x.

This transformation is followed by a two-dimensional enumeration technique. It is interesting to note on forehand that we have used the same trans for-mation technique in an algorithm for the evaluation of the mean value scheme

for closed mul t ichain queue ing networks, confer [2]. Now, the analys is is more complex.

Let us have a closer look at the values ~ (A ), n = 1,2, ... ,N, for which

n n

we have to compute the recursion defined by Relation (2). It is not difficult to see that in the evaluation of the recursion scheme, all values x

E

m

for

R

which *n(x) has to be computed, can be decomposed as x

=

I

krA;, where, r=l

for r

=

1,2, ...,R, k E {O,l, ... ,K }. This has been observed by Veran [4],

r r

who based his algorithm on this decomposition also. We will follow another line to come up with an elegant algorithm.

It seems a natural thing to introduce a set V c 'U,R as

(9)

as (9) ljJ(k) = R

I

r=1 k A* r r

The recursion in Relation (2) now may be transformed into a two-dimensional recursion in a vector-variable k and an integer variable n. For k E V we define p (k) as

n

(10) P (k)

n 1Tn(ljJ (k» .

The recursion now becomes

(11) P (k) n

= {

0, n = 1 and k E V ; n-1 F (p 1(k),p 1(k+e ),ljJ(k» n n- n- r n = 2,3, ... ,N , k

E

V ,

where en denotes the rth unit-vector with r such that terminal n belongs to

r

n-1

group r. Note that k + e not necessarily is an element of V, but this

r

will appear to be of no importance later on.

It will be clear that the evaluation of the values 1T (A ) is equivalent with

n n

the evaluation of the values p (en), as p (en) = 1T (A ) by definition if

n r n r n n

terminal n belongs to group r. Thus we can restrict ourselves to an

evalua-n

~ tion of the values p (e ). In order to do so we will discuss an enumeration n r of the set V.

{

1 , r = R (12) X = r R

n

(K.+1), r = 0,1, ... ,R-1

,

i=r+1 1

and the map (j) V -+ {O, 1, ... 'X

o -

1} by (13) R (j)(k) =

I

r=1 k X r r

(10)

The enumeration of V based on a linear enumeration of the set {O,l, ... ,X O-l}

n

will be the basis of algorithm"to evaluate the values p (e ). However, before

n r

we can state the algorithm some preliminary work has to be done.

First we will show that the map ~ is a one-to-one map. The proof will give an algorithm to find the inverse mapping

~-1

of

~

as a side-result.

Lemma 1.

The map ~ : V -+ {1,2, ,X

O- 1} is one-to-one.

Proof. Let m E {1,2, ,X

o

-

1}. Define k E 'D,R by the following recursion,

k r = entier( [m -r-1

L

i=1 k.

x.

]/X ) , 1 1 r r=2,3, ... ,R.

follows from the observation that the number of elements in the set V equals One may verify that k

E V

and that ~(k)

=

m. That the map ~ is one-to-one

the number of elements in the set {1, 2, . . . , X

o

-

1}.

Next we will give a lemma which answers the question for which vectors k

E V

we have to evaluate p (k) at level n in the two-dimensional recursion.

n

Lemma 2.

At level n, n = 1,2, ...,N , k E V e V defined by

n

P (k) has to be evaluated for all vectors

n

(14) V = {k E V

I

k. = 0 ,

n 1 O~kr ~Nr -n+1

where r is such that terminal n belongs to group r, i.e. N 1

<

n ~ N •

(11)

Proof. The lemma will be proved by induction. First the notation W + e is r introduced. If WC 'O.R and e is the r th unit-vector, 1 :E;; r :E;; R, then

r

W+ e = {k E 'O.R k - e E W} •

r r

Observe that to find out for which vectors k E V P (k) has to be evaluated, n

we have to analyse the levels n,n + 1, ... ,N as the scheme is recursive in the variable n. From Relation (11) it follows that we need p l(k) and

n-n-1

p 1(k + e ) to evaluate p (k) at level n. So, if V is the set of vectors

n- r n n

n-1

k for which p (k) has to be evaluated, then V U V + e C V l'

Further-n n n r

n-n-1

more p l(e ) has to be evaluated at level n - 1. As a conclusion we have

n- r V

=

{en-1} U V n-1 r n U n-1 V + e n r

The lemma now can be proved by induction and the observation that

The result stated in Lemma 2 is very interesting as we will show in the next

lemma. It will appear that the sets V , n

=

1,2, . . . , N, correspond to ele-n

mentary subsets of the set 1,2, . . .,X

O- 1 , which make a straightforward enumeration possible.

Lemma 3.

(15) (j)(V)

=

{1,2, . . . ,(N -n+2)X - 1},

n r r n = 1,2, ... ,N,

where r is such that terminal n belongs to group r, i.e. N

<

n :E;; N .

(12)

Proof. First we note that the number of elements in the set V equals the n

number of elements in the set {1.2 •...• (N -n+2)X -1}. This follows from

r r

the definitions of X and V .

r n

Furthermore, the minimal ~-value in V

n is for ~ = eR, ~(eR) = 1. The maximal

~-value in V is obtained by setting k to k. where

n

k

=

(0 , . . . ,0 , Nr - n + 1 , Kr+ 1 ' . . . ,K R)

which corresponds with ~(k) = (N - n + 2) X - 1, as one may verify as follows,

r r R ~(k) = (N -n+1)X +

I

K. X. = r r i=r+1 1. 1. R = (N - n + 1)X +

I

(x. 1 - x.) = r r i=r+1 1.- 1. = (N - n +1) X + X - X R • r r r

Because the map ~ is one-to-one ~(V ) will cover the set n

{1,2, ... , (N - n+ 2)X - 1} in a one-to-one correspondance.

r r

The Lemma's 1, 2 and 3 give the framework for an enumeration algorithm. For

n = 1.2 •... ,N the algorithm is based on an enumeration of the set ~(V ). The n

recursion in the vector variable k. defined in Relation (11), will be trans-formed into a recursion in an integer variable m in the following way. For n = 1,2, ... ,N and m E ~(V) b (m) is defined as

n n

(16) b (m)

(13)

The recursion defined by Relation (11) transforms into (17) b (m)

=

n 0, n = 1 and m E lP(V1) -1 F (b 1 (m) , b 1 (m+X ),1j!lP (m», n n- n- r n

>

1, m E lP(V )n

and r such that N 1

<

n - 1 :>;; N

r- r

This two-dimensional recursive scheme may be transformed into an algorithm in a straightforward way. The evaluation of the value TI (A ) corresponds

n n with the evaluation of bn(X

r), if Nr_1

<

n:>;; Nr . In Figure 1 we have pictured the algorithm in pseudo-pascal.

The algorithm of Figure 1 is a rude implementation of the scheme. We will close this section with some remarks on the complexity of the scheme and will indicate how to reduce storage requirements. A second version of the algorithm, closer to a real implementation, will be given.

The complexity of the algorithm can be expressed in the number of evaluations of b (m). This number of evaluations, say E, satisfies the following relations

n (18) and R E =

I

r=l K r

I

i=l (i+ l)X - 1 r (19) R

n

r=l (K + 1) - 1 :>;; E :>;; N r R

n

r=l (K + 1) r

where Relation (18) follows from the numbers of elements in the sets lP(V ),

n

(14)

n := 0; for r = 1,2, ... ,R do for k = 1,2, ... ,K do r begin if r

=

1 and k

=

1 then begin n := n + 1; for m = 1,2, ... ,X O-1 do b (m) = O· n ' 1T (A )

=

b (X ) n n n r end; if r

>

1 or k

>

1 then begin n := n + 1; for m

=

1,2, . . . , X

o -

1 do -1 if k

=

1 then b (m)

=

F (b (m),b (m+X 1),1jJ<.p (m»; n n n n

r->

b (m) -1 if k 1 then

=

F (b (m), b (m+X ),1jJ<.p (m) ) ; n n n n r 1T (A )

.-

b (X ) n n n r end end.

(15)

We now are able to give an impression of the merits of the complicated

al-gorithm. A straightforward implementation of the original recursion scheme of Section 2 is equivalent with our algorithm where no use has been made of the special structure. This implies that one has N terminal groups of size

1. The complexity then becomes E = 2N+1 - 3 evaluations of b (m).

Parti-n

tioning the N terminals in groups with the same characteristics will give a considerable gain as one may verify from Relations (18) or (19). For example

in a system with 3 groups of 7 terminals each one has 2043 instead of approx-imately 4.200.000 evaluations of b (m).

n

With respect to the storage requirements we note the following. Using the nice structure of the enumeration of the set ~(V ), n = 1,2, ...,N, it is

n

sufficient to introduce one array b [1 : X

o

-

1] to store the values bn(m) at each level. It will be convenient to introduce an array a[1 X

o

-

1] with

the mth e ement1 conta~n~ng. . a m[ ]

=

~ 0 ~-1()m. No et th ta Lemma l 'g1ves the

R

algorithm to fill the array a. The storage requirements are O(

n

(K +1» r=1 r

An essential problem, which has been left open so far, is the evaluation of

b (m) by means of the Relations (3) through (6). The next section is devoted

n

to this problem. This section we close with a second algorithm, pictured in Figure 2.

(16)

evaluate X[O],X[l], ... ,X[R];

evaluate a[O],a[l], ... ,a[XO] - 1]; n := 0; for r = 1,2, ... ,R do for k = 1,2, ... ,K do r begin if r

=

1 and k

=

1 then begin n := n + 1; for m

=

1,2, ... ,X[0] - 1 do p[m]

=

0; 1T (:\ ) . - p[X[r]] n r end; if r

>

1 or k

>

1 then begin n := n + 1; for m

=

1,2, ... , (K[r] - K+2)X[r] - 1 do begin pm := p[m]; am := arm]; if k = 1 then pmp := p[m+X 1] else pmp .- p[m+X ]; r- r pem] .-end; F (pm,pmp,am) n 1T (A ) .- p[X[r]] n r end end.

(17)

4. Remarks on the evaluation of F n

Let us consider the evaluation of F using the Relations (3) through (6).

n

The crucial step in this evaluation is the computation of

'I' (X)

=

1 -

r

(x+ A 11T (x». For general service time distributions this

n n n- n

can be quite a complicated computation. In this section we will show how to compute 'I' (x) efficiently for two classes of distribution functions.

n

The first class is that of the phase-type distributions. We will show that the evaluation of 'I' (x) reduces to solving a linear system of finite rank.

n

The second class is that of the discrete distributions. The evaluation of

'I' (x) then reduces to a summation. n

Case 1: Phase-type distributions

We introduce the phase-type distribution in the following manner. A phase-type distribution can be described as the distribution of the sojourn-time X in a simple Markovian network with the following structure:

N number of nodes in the network

~n the time spent in node n is negative exponentially

distri-buted with parameter ~ , n = 1,2, ...,N n

Pmn probability that after a visit to node m a visit to node n

is made

a probability that a sojourn in the network starts at node n.

n

The matrix of transition probabilities Pmn is such that the sojourn time is finite with probability one. Note that sufficient conditions for this demand

N

for example depend on the probabilities 1 -

I

P of leaving the network

(18)

after a visit to node m, m = 1,2, ... ,N, and on the structure of the matrix. The nodes represent the phases in the phase-type distribution.

We are interested in the Laplace-Stieltjes transform of the distribution-function G(t)

=

P(X ~ t). We will show that the function-values of this transform can be evaluated as solutions of linear systems of size N.

Let X denote the time spent in the network, given that the sojourn starts m

at node m, then it easily follows that

N G(t)

=

L

m=1

a P(X ~ t) .

m m

Conditioning on the time spent in node m and the jump made after the sojourn in node m we find, for m = 1,2, .•. ,N , with G (t) = lP(X ~ t) ,

m m G (t) m t

f

o

-ll x G (t - x)d (1 - e m ) n

With

r

being the Laplace-Stieltjes transform of G, and

r

of G , we find,

m m for m = 1,2, ... , N , (ll +crH (cr) m m N

I

n=1 pmn) IIm + N

L

n=1 P II

r

(cr) mn m n

and, after having solved this linear system,

N

r(cr) =

L

m=1

a

r

(cr)

(19)

Numerically this is very attractive, especially if N is not too large. The class of phase-type distributions is very important as every distribution can be approximated by a phase-type distribution. For more detailed infor-mation on this sUbject and the phase-type distribution in general, we refer to the monograph of Neuts [3].

Case 2: Discrete distributions

Discrete distributions are defined by a finite or countable set of values and a probability measure on this set. A service time is a draw from the set of values. We introduce the following notations:

N number of values (N ~ 00) w

n

th

the n value in the set of values, n=1,2, ... ,N qn probability that the service time has length w

n' n

=

1,2, ... ,N .

N

I f

I

qnwn

<

00 then the service time has a finite mean. Let us assume that n=1

this is the case. One may verify that for the Laplace-Stieltjes transform

r

of the service time distribution the following holds,

N r(o)

=

I

n=1 -w 0 q e n n

Deterministic service times are a special type of discrete distribution with N = 1.

(20)

5. Conclusion

We have developed an elegant and efficient algorithm for the evaluation of performance measures in a CP-terminal system. For two classes of distribu-tion funcdistribu-tions we have elaborated on the evaluadistribu-tion of a particular step in the algorithm.

6. References

[1] J. van Doremalen, A mean value analysis of a closed CP-terminal system with pre-emptive resume priorities and general service time dis-tributions, Eindhoven University of Technology, Dept. of Math. and Compo Sci., Memorandum COSOR 84-06, Eindhoven 1984.

[2] J. van Doremalen, A note on the evaluation of the mean value scheme for closed multichain queueing networks, Eindhoven University of

Technology, Dept. of Math. and Compo Sci., Memorandum COSOR 84-04, Eindhoven 1984.

[3] M. Neuts, Matrix geometric solutions in stochastic models, an algorith-mic approach. John Hopkins University Press, Baltimore 1981.

[4] M. Veran, Etude d'une file d'attente avec priorites et sources finies. in: Proceedings of the International Seminar on Modelling and Performance Evaluation Methodology, Volume III: 287-307, I.N.R.I.A. 1983.

Referenties

GERELATEERDE DOCUMENTEN

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

In het eerste halfjaar van 1978 nam het aantal verkeersdoden onder bestuurders van personenauto's t.o.V. Het aantal overleden passagiers van per- sonenauto's was

Zowel in het bQstemmingsplan Westelijke Randweg Sittard- M iddenweg (M-WRS) als in het bestemmings- plan Middengebied wordt slec h ts gesproken over verkeer. Dat

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

Duidelijke verschillen in rupsen- druk op spruitkool (uitgedrukt in rups-equi- valenten per plant) door mosterd- en kla- verstroken.. De spruitkoolteelt wordt geplaagd door een

zijn geologische waarnemingen nu voor iedere Nederlan- der toegankelijk zijn in een prima leesbaar boek, kan dat zeker bijdragen aan een beter begrip van de wijze waarop

Summarizing we can say that in MML item calibration in complete testing designs is justified as long as we are sampling from one population there is more or

Electrochemical and Quantum Chemical Investigation of Some Azine and Thiazine Dyes as Potential Corrosion Inhibitors for Mild Steel in Hydrochloric Acid