Computational Algorithms for State- Dependent Queueing Networks

3 downloads 1105 Views 1MB Size Report
Exact numerical solution of a queueing network is usually only feasible if the network has a product .... networks, service rate dependent on queue length.
Computational Algorithms for StateDependent Queueing Networks CHARLES H. SAUER IBM

Queueing networks are important as performance models of computer and communication systems. Exact numerical solution of a queueing network is usually only feasible if the network has a product form solution in the sense of Jackson. Product form networks allow a rich variety of forms of statedependent behavior. However, efficient computational algorithms have not been developed for several of the allowed forms of state-dependent behavior. This paper develops the two most important computational algorithms. Convolution and Mean Value Analysis, to apply to forms of state-dependent behavior allowed in product form networks. It is demonstrated that these two algorithms are of equal generality, contrary to common belief. Categories and Subject Descriptors: C.4 [Computer Systems OrganiT.ation]: Performance of Systems--modeling techniques; D.4.8 [Operating Systems]: Performance--queueing theory General Terms: Performance Additional Key Words and Phrases: product form queueing networks, state-dependence, mixed networks, computational algorithms, convolution algorithm, mean value analysis

1. INTRODUCTION Q u e u e i n g n e t w o r k s are i m p o r t a n t as p e r f o r m a n c e m o d e l s of c o m p u t e r s y s t e m s a n d c o m m u n i c a t i o n s y s t e m s b e c a u s e p e r f o r m a n c e of t h e s e s y s t e m s is u s u a l l y p r i n c i p a l l y affected b y c o n t e n t i o n for r e s o u r c e s . F o r g e n e r a l d i s c u s s i o n s of q u e u e i n g n e t w o r k s as p e r f o r m a n c e m o d e l s , see S a u e r a n d C h a n d y [20] a n d r e c e n t special issues of A C M C o m p u t i n g S u r v e y s (vol. 10, no. 3, Sept. 1978) a n d C o m p u t e r (vol. 13, no. 4, A p r i l 1980). I n t h e fifties a n d e a r l y sixties, J a c k s o n [7] s h o w e d t h a t a c e r t a i n class of n e t w o r k s of q u e u e s h a s a p r o d u c t f o r m s o l u t i o n i n t h e s e n s e t h a t

P ( n l . . . . , riM) ffi where P(nl,...,

X l (nl ) . . . XM(nM) G(N)

riM) is t h e j o i n t q u e u e l e n g t h d i s t r i b u t i o n i n a n e t w o r k w i t h M

Author's address: IBM, Department 450, Building 984, 11400 Burnet Road, Austin, TX 78758. This paper was originally accepted for publication in Communications of the ACM. The CACM department editor responsible for the paper was Herb Schwetman. Both the editor and author kindly agreed to publish the paper in ACM Transactions on Computer Systems. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. © 1983 ACM 0734-2071/83/0200-0067$00.75 ACMTransactionson ComputerSystems,Vol. 1, No. 1, February1983,Pages67-92.

68

Charles H. Sauer

queues, X m ( n m ) , m = 1, . . . , M , is a factor obtained from the marginal queue length distribution of queue rn in isolation, N is the number of jobs fixed within the network, if any, and G ( N ) is a normalizing constant. Computer scientists and others have extended Jackson's result to encompass networks with heterogeneous jobs, with both open and closed routing chains, with some queueing disciplines other than first-come-first-served, with general service time distributions for some of those other disciplines, and with some state-dependent behavior [1, 4, 8, 25]. There are several kinds of state-dependent behavior allowed in product form networks, some of which have had limited application so far. One purpose of this paper is to encourage further use of networks with state-dependent behavior. We will consider three forms of state-dependent behavior. For the first two forms we assume jobs are homogeneous, though the algorithms extend to heterogeneous jobs. The first form is state-dependent routing: the probability of entering a queue of a subnetwork is dependent both on the number of jobs in the particular queue and the total number of jobs in the subnetwork. (The state-dependent routing we consider is that developed by Towsley [25]. Kobayashi and Reiser previously developed a form of state-dependent routing, unrelated to Towsley's form, which can be dealt with as if the routing were not state-dependent; see [8] for details.) The second form has the arrival rate of jobs in an open network dependent on the number of jobs currently in the open network. For the third form we must consider heterogeneous jobs. The third form has the service rate of each type of job dependent on the number of jobs of each type at the queue. (Heterogeneous jobs are usually discussed in terms of multiple "job types" or "routing chains." These are equivalent concepts.) This form does not necessarily satisfy product form, as we will show. It is very important in approximate solution of queueing networks [5, 19, 20, 21]. (If we did not consider heterogeneous jobs, then this form would be the most common form of state-dependence in product form networks, service rate dependent on queue length.) Mixtures of these forms are possible; we will generally avoid explicit consideration of mixtures to avoid additional notational complexity. This paper is based on a previous report [22]. Another form of state-dependence, where service rates explicitly depend on subnetwork populations, is also considered explicitly in the report. The following example illustrates the first form, state-dependent routing. Consider the "central server model" of Figure 1. This model has been widely used as a model of computing systems. The number of jobs in the network is fixed, corresponding to the degree of multiprogramming. The object of the model is to estimate performance measures such as utilization, throughput, mean queue length, and mean queueing time, given the degree of multiprogramming. Usually it is assumed that a job leaving the CPU selects an I/O device according to fixed probabilities. However, an operating system may attempt to assign an I/O request to a device that is lightly loaded at the time of the request. This may or may not be possible, depending on the nature of the requests and the devices. Towsley [25] considers a central server model with two devices where, for even degrees of multiprogramming, N, a job leaving the CPU goes to device i with probability ( N / 2 - n i ) / ( N - n l - n2), where n i , i = 1, 2, is the number of jobs currently at device i. For odd N, the probability of going to device i is ((N + 1)/2 - n i ) / ( N + 1 - nl - n2). (The states where these functions would result in negative ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

Computational Algorithms for State-Dependent Queueing Networks ~(

I/0'S

69

I

Figure 1.

probabilities are not feasible.) These functions can result in enormously higher throughput than fixed equal probabilities, depending on other parameters. The existence of a product form solution makes tractable the solution of networks with large numbers of queues and/or large populations, but the computational methods are nontrivial unless the normalizing constant itself is trivially obtained. The most important algorithms are the Convolution Algorithm [2] and Mean Value Analysis (MVA) [16]. Convolution has previously been developed for population-dependent arrival rates [15]. (The Local Balance Algorithm for Normalizing Constants (LBANC) [6] is also considered in the previous report [22].) Our primary purpose here is to develop both algorithms for all three forms of state-dependent behavior. In doing so, we demonstrate that both algorithms apply to the full class of product form networks. An immediate consequence of this demonstration is that Convolution and MVA are of equivalent generality, contrary to common belief. (Previously, there was relatively little doubt that Convolution could be extended to the full class of product form networks, since it is basically an efficient way of summing the unnormalized probabilities of all feasible network states to obtain the normalizing constant. However, previous versions of MVA depend, except for Little's rule [13], on equations for performance measures for queues considered individually. It was not clear that these equations could be adapted to consider characteristics such as the routing dependent on subnetwork population which we just described.) In Section 2, we develop basic notation. In Section 3, we consider the first form, state-dependent routing, in closed networks. In Section 4, we consider open networks with statedependent arrivals. In Section 5, we consider closed networks with heterogeneous jobs and queue-dependent service. Finally, in Section 6, we consider mixed networks, which are closely related to closed networks with queue-dependent service rates. 2. BASIC NOTATION We develop our basic terminology and notation here and make modifications as necessary in individual sections. Appendix 1 contains a summary of symbols used. We use "(routing) chains" in the sense of different workloads or types of jobs. For example, a computing system may handle command-oriented interactive jobs, transactions, and batch jobs. A communication network will usually have both data messages and control messages (e.g., acknowledgements). We will ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

70



Charles H. Sauer

ignore the "local classes" which allow added detail in routing descriptions, but what we say extends directly to consideration of classes as well. (For further discussion, see [6, 20, 22].) We assume homogeneous jobs (i.e., a single job type or a single routing chain) until we get to Section 5. T he following notation is used for routing that is not state-dependent. Let the probability that a job at queue i next visits queue j be po.. If the chain is an open chain (i.e., it contains a source and a sink), let the probability that a job arriving from the source goes to queue i be poi, and the probability that a job lea~ing queue i goes to the sink be pio. Let the relative throughput of queue m be rm, in the sense that if the throughput through queue i is Ri, then the throughput through queue j is R j ~- Rirj/ri. (The term "visit ratio" is sometimes used instead of "relative throughput.") T h e set of relative throughputs must satisfy M

rm = pom + ~ ripim, iffil

m ffi 1 . . . . .

M.

This set of linear equations is linearly dependent for closed chains (i.e., ones without sources and sinks, pom - - 0 ) . We can replace any one equation by rm ---- d, where d is an arbitrary positive constant, to obtain a set of M linearly independent equations which we can solve to get the relative throughputs. Let the mean service demand at queue m be Sm i (This is the value for individual visits to the queue, not the summation over several visits considered by some authors.) Th e service demand is divided by the service rate to get the service time. For example, for a processor, service demands might be measured in numbers of instructions to be executed and service rate might be measured in instructions executed per unit time. T he number of instructions would be divided by the instruction rate to obtain service time. For networks with a product form solution, the mean demand is the only characteristic of service demand which enters into the solution for the measures we will consider. Let Um = rmSm be the relative service demand. (This is also termed the "relative utilization" in the sense that if queues i and j both have constant unit service rates and queue i has utilization Ui, then queue j has utilization Uj ffi Uiu//ui.) Let the service rate (dependent on queue length) be ftm (nm), m ffi 1, . . . , M, where nm is the current queue length at queue m. (Throughout this paper we assume queue length includes jobs in service. Similarly, queueing time includes service time.) We will need to deal with a number of (sub)sets of queues. We will use script characters to designate sets, for example, we use ~¢/to be the set of queues {1. . . . , M}. We will use superscripts to indicate that variables usually defined assuming the entire network are interpreted with respect to a subnetwork. For example, we will normally u s e L m for the mean queue length of queue m. When we wish to indicate the mean queue length in the subnetwork consisting of the queues of m, we will use L~. 3. S T A T E - D E P E N D E N T ROUTING 3.1 Notation and Solution

Let there be T disjoint subnetworks of queues ~ t , t = 1. . . . . T, such that either routing to all of the queues of subnetwork ~ t is state-dependent or the routing to ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

Computational Algorithms for State-Dependent Queueing Networks

71

none of the queues of subnetwork ~ t is state-dependent. T o simplify the discussion, we assume t h a t a subnetwork t h a t has state-dependent routing is a parallel subnetwork of queues, for example, the I / O subnetwork of the central server model, such t h a t a job entering the subnetwork visits exactly one queue in the subnetwork and t h e n departs from the subnetwork. (Towsley similarly assumes t h a t the subnetworks with state-dependent routing are parallel subnetworks, b u t t h a t a p a t h through the subnetwork m a y be a string of queues and nested parallel subnetworks. Such a string m a y be replaced by a single "composite queue" [3, 25, 20], so our assumptions are as general as Towsley's. Some generalizations of these assumptions are possible, b u t characterization of the generalizations is difficult.) All jobs entering a parallel subnetwork enter after departing from the same queue outside the subnetwork, for example, the C P U queue in the central server model. All jobs leaving a parallel subnetwork go to the same queue outside the subnetwork, for example, the CPU queue in the central server model• As in the central server model example, the state-dependent routing is a function of the n u m b e r of jobs in the subnetwork and the numbers of jobs at each queue of the subnetwork. We define functions ~rm(n), m =- 1. . . . . M, n = 0, • . . , N - 1, and 7t(n), t = 1. . . . , T, n ffi 1. . . . . N as follows. For subnetwork Jet with state-dependent routing, there exists some queue i not in the subnetwork such t h a t for each queue rn in the subnetwork the probability t h a t a job leaving queue i goes to queue rn i s p i m C r m ( n m ) / T t ( n + 1) when there are already nm jobs at queue m and n jobs in the subnetwork. F r o m the previous assumptions there are no other paths to queue m . A l s o , pim, ~rm(nm), a n d y t ( n + 1) must be such t h a t the probabilities of leaving queue i are nonnegative and sum to one for each feasible state. Towsley shows t h a t linear functions for ~rm(nm) a n d 7 t ( n + 1) are sufficient for describing all allowable state-dependent routing mechanisms in p r o d u c t form networks. For subnetworks without state-dependent routing, we assume ~rm(nm) a n d 7t(n + 1) are identically one for all nm and n. T h e values rm, m = 1 . . . . . M , are defined as before, but cannot be interpreted as relative throughputs for queues in subnetworks with state-dependent routing. Similarly, the values Urn, m = 1. . . . . M, are defined as before (but cannot be interpreted as relative utilizations for queues in subnetworks with state-dependent routing). Define Xm(n)

=

u n 1-Ii~-o1 ~rm(i)

1-In-1 gm(i)

,

n = 0 .....

N.

(1)

Define g t ( n ) = 1-[ Tt(i),

n = 0.....

N.

(2)

iffil

We will assume products defined over e m p t y ranges, for e x a m p l e , the above products for n = 0, are equal to one. Similarly, we assume sums over e m p t y ranges are zero. T h e product form solution t h e n becomes P(nl .....

riM) = X1 (nl) . . . X M ( n M ) / g l (n~l) . . . gT(n~T) G(N)

where nm, m = 1, . . . , M, is the n u m b e r of jobs at queue m , n~,, t = 1 . . . . .

(3) T, is

ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

72

Charles H. Sauer

the number of jobs in subnetwork sgt, and these numbers are feasible given population N and the above definitions [25]. In principle, eq. (3) is sufficient. G ( N ) will simply be the sum of the feasible numerators of eq. (3). Given the joint queue length distribution we can obtain the marginal queue length distributions by proper summations and then obtain the other measures we listed above. However, this is both computationally and numerically impractical. Efficient, numerically stable algorithms are needed for most interesting networks. 3.2 Convolution Algorithm

The oldest satisfactory algorithm and, perhaps, still the most important algorithm is the Convolution Algorithm first proposed by Buzen [2]. For networks without state-dependent routing, the Convolution Algorithm obtains the normalizing constant, G(N), from the factors X m ( n m ) , m = 1. . . . . M, in a manner similar to the convolution of discrete probability distributions. {This manner is simply a computationally and numerically appropriate summation of the feasible numerators of eq. (3).) Performance measures are then obtained from expressions involving these factors and the normalizing constant. Convolution extends directly to the state-dependent behavior we are considering. The only problem is properly adding the factor gt (n) to the algorithm. This in turn is a matter of dealing with the appropriate subsets of queues. Let X{m} = Xm, m = 1 , . . . , M. Define f (I, 0 .... ,0), X,u~.---- "~X~., X;, LX~*X~,

i = j = ~,

i = ¢,

(4)

j = ,/,,

otherwise,

where i and j are sets of queues and where the Convolution operator * is defined as follows: Let A, B, and C be vectors of length N + 1 defined for indices n = 0, . . . . N. Then the Convolution A = B * C is defined by n

A(n) = ~ B(i)C(n-

i),

n = 0.....

N.

i=O

Note that the Convolution operation is both associative and commutative, so there is considerable freedom in obtaining X , , where ~ is any subset of ~/. For networks without state-dependent routing, G = X~. Let us define G~,(n) -

X~,(n) gt(n) '

t

1. . . . .

T, n

0.....

N.

(5)

Further define

G,ui

=

I

(1, O, . . . , 0),

i = j = ¢,

Gj,

G~,

L G i * Gj,

j--C, otherwise.

Then G = G~. ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

(6)

Computational Algorithms for State-Dependent Queueing Networks

73

The marginal queue length distribution is obtained similarly. Instead of summing the feasible numerators of eq. (3), the probability of n jobs at queue m given N jobs in the network, Pm (n IN), is obtained by summing all values expressed by eq. (3) which correspond to n jobs at queue m. This summation gives us Pm(nlN) =

Xm(n) ~N-n (X~at-m(i - n ) / g t ( i ) ) G ~ a - . ~ , ( N - i) , G(N)

(7)

m = 1 , . . . , M, m in ~/t, n = 0 , . . . , N. (This is a straightforward extension of the summation for the cases without state-dependent routing. For discussion of those cases, see Buzen [2] and Sauer and Chandy [20].) For queues in networks without state-dependent routing, throughput is given by R m ( N ) = rm

G ( N - 1) , G(N)

(8)

m = 1 . . . . , M.

For queues in subnetworks with state-dependent routing, we use N gin(n) Rm(N) = ~l--~ Pm(nlN).

(9)

Mean queue length can be obtained from the distribution in the usual way, N

Lm(N) = ~ n P , , ( n ] N ) ,

m = 1. . . . . M,

(10)

rt~l

and then mean queueing time can be obtained from Little's Rule [13], that is, Lm(N) Qm(N) = Rm(N) '

m

I . . . . . M.

(ii)

Utilization may be obtained from throughput, for some queues, or from the queue length distribution. For example, for a single server queue without queuedependent rates, that is, gm(n) = gm, n = I . . . . , N,

Urn(N) = Rm(N) Sm. gm

For a general single server queue

Urn(N) = 1 - Pm(OIN).

Appendix 2 gives a numerical example based on the central server model of Figure 1. As discussed in Appendix 2, the ratio o f C P U throughputs in this network with state-dependent routing a n d without state-dependent routing can be m a d e arbitrarily large. A fundamental problem with the Convolution Algorithm is that the normalizing constant, G (N), may have a value outside of floating point range even though the network parameters and performance measures have values well within floating point range. This problem can usually, but not always, be eliminated by appropriate choice of the constant d in determining the relative throughputs [6, 11, 17, 20]. In addition to this problem, Convolution has a problem with numerical instability for G (N) near the lower limit (in magnitude) of floating point range. It is for these reasons that MVA is interesting. A C M Transactions on C o m p u t e r Systems, Vol. 1, No. 1, F e b r u a r y 1983.

74



Charles H. Sauer

3.3 Mean Value Analysis

Next to Convolution, the most important algorithm is the Mean Value Analysis of Reiser and Lavenberg [16, 18]. Mean Value Analysis (MVA) avoids the use of normalizing constants and the numerical problems associated with them. This is done by use of recursive relationships between mean queueing times in the given network and performance measures in the corresponding network with one job removed. For example, for a single server fixed rate queue, Qm(N) =Sm (1 + Lm(N - 1)) #m and for an "Infinite Server" (IS) queue, that is, #re(n) = n#m(1), n -- 2, . . . , N, Qm(N) ----

8m /~m(1) "

Little's Rule can then be applied to obtain throughputs, that is, Rm(N) = ~ 1

N (ri/rm)Qi(N)

and mean queue lengths, that is, Lm(N) = Rm(N)Qm(N). Starting with Lm (0) -- 0 we get an algorithm which is of comparable complexity to Convolution and which avoids the numerical problems of normalizing constants. For networks without state-dependence other than IS queues, MVA is the algorithm of choice. For networks with other state-dependence, we can extend MVA, but it does not live up to its name, that is, values other than means get involved. For closed networks the only other values involved are marginal queue length distributions. Incorporation of marginal queue length distributions leads to trade-offs between excessive computational complexity and numerical instability, as we shall see. (The development of MVA for open networks with population-dependent arrival rates in Section 4 also requires normalizing constants.) Except for use of Little's rule to obtain throughputs, the ordinary MVA equations (e.g. the ones above) explicitly consider a single queue at a time. It is necessary to modify MVA to consider the interdependence of queues involved in the state-dependent routing we are considering. In analogy to "Norton's Theorem" for queueing networks [3, 20, 25], we can consider the subnetworks in isolation, and construct a new network of "composite" queues representing the subnetworks. The solution of this new network can be interpreted to provide a solution of the original network. MVA can be developed to consider the subnetworks in isolation and to consider the network of composite queues. We first develop MVA for the subnetworks, then develop MVA for a network of composite queues representing the subnetworks, and then obtain results for the original network. The following equations apply to all T subnetworks and all M queues. These equations are the same as the usual MVA equations [16, 18] except for the statedependent routing variables. We assume that queue m is in subnetwork Jlt, which we will also refer to as subnetwork ~. A C M Transactions on C o m p u t e r Systems, Vo]. 1, No. 1, F e b r u a r y 1983.

Computational Algorithms for State-Dependent Queueing Networks



75

W h e n dealing with subnetwork tilt, it is useful to assume t h a t there is an artificial queue, queue a, outside of the subnetwork which serves as the e n t r y / exit queue in the sense of the parallel subnetwork definition. This queue is assumed to have negligible service time. A job leaving queue m within the subnetwork goes to queue a and t h e n instantaneously goes to a queue within the subnetwork. We assume t h a t p ~ = pim where queue i is the actual entry queue for the subnetwork in the original network. When it is possible in the original network for jobs at queue i to go to queues other t h a n those of subnetwork ~ t , t h e n when dealing with subnetwork JfCt by itself it is necessary to redefine Tt so t h a t the probabilities for jobs leaving queue a sum to one. For this reason we will refer to 77" when dealing with subnetwork ~. Corresponding redefinition of Tt is necessary when considering subnetworks of the given subnetwork. These steps will be illustrated in our numerical example. In addition to the functions previously introduced, we define an auxiliary function to help develop the algorithm. Define Ram

N- 1

~ • f~m(N)= T?(N) ,=o

~ r m ( n ) P ~ ( n l N - 1).

(12)

This function gives the fraction of subnetwork throughput t h a t goes through queue m when there are N jobs in the subnetwork. Instead of using eq. (9) for throughput, having this function we can use R ~ ( N ) -- f ~ ( N )

1)

rmG(N-

(13)

p~mG(N)

From eqs. (7) and (13), P7. (n I N) =

Xm(n)(X,,,-m(N - n ) / g t ( N ) ) GIn(N) G m ( N - 1)

Xm(n)

Xm(n-

1)77"(N)

Gm(N)

(14)

Xm(n - 1 ) ( X , , , - m ( N - 1 - (n - 1 ) ) / g t ( N - 1)) Gm(Np ~ S r , , m , , ( n - 1)

~m(n)~r(N)~(N)

1)

R ~ ( N ) P ~ ( n - 1 I N - 1),

,

n>0,

N>0,

n>0, N>0.

From this distribution the m e a n queue length is N

L ~ ( N ) = Y. n P Y ~ ( n l N )

n=l

(15)

p,~Sm N n~rm(n- 1) PT.,(n - 1 I N - 1). 7 ? ( N ) f ~ ( N ) R ' ~ ( N ) n=,z~ #re(n)

Applying Little's Rule, Q'~(N) =

N po~nSm Y~ y r ( N ) f'~ (N) .=1

nTrm ( n

~m(n)

1)

P~,(n - 1 I N - 1).

(16)

In a subnetwork without state-dependent routing, for a single server queue ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

76



Charles H Sauer

without queue-dependent rates, t h a t is, #~(n) = #~, n = 1, . . . , N, eq. (16) simplifies to

Q~(N) = --S" (1 + L ~ ( N - 1)).

(17)

For IS queues, eq. (16) simplifies to S~

QT~(N) #m(1)'

(18)

as we could have directly obtained by the observation t h a t jobs never wait for service at such queues. T h e m e a n time between departures from queue rn can be expressed as

i~1fT.(N) QT~(N). f'~(N) Applying Little's Rule to this quantity, we get the throughput as N

RY,(N) --- ~,li M, (fi'~(N)/fT~(N)Qi~

"~(N ) "

(19)

Little's Rule can then be used to obtain mean queue lengths: LT, (N) = R 7, (N) QTn(N).

(20)

T h e recursion suggested b y these equations requires one more equation, for P ~ ( O J N ) (except for queues where eq. (17) or eq. (18) applies). T h e obvious equation, N

Pro(O IN) -- 1 - ~ P ~ ( n l N ) ,

(21)

n=l

is numerically unstable as P~(01 N) tends to zero [6]. An alternative is to extend the approach suggested by Reiser [18]. Applying eq. (7) for queue length zero, we have P~(0IN) =

X., (0)(X,,~-,n(N) /gt(N) ) G.(N) G , ~ ( N - 1) X,~-m(N) G,~(N) X , ~ - m ( N - 1)yT~(N) X m ( O ) ( X . _ m ( N - 1 ) / g t ( N - 1)) G . ( N - 1) ,

--'Y'~-m(N) R'~(N) PT~(OIN-1), .y'~(N) R'~-m(N)

(22) N > O, N>O,

where Ri(N) =paiRi(N)/riff(N), i in i. In addition to the previous starting values, L~,(0) = 0, we also use P ~ ( 0 [ 0) = 1. Determining R ' - ' ( N ) may, in turn, require the solution of the subnetwork with additional queues removed. In the case of a subnetwork with no IS queues, one must consider a total of 2 M' - 1 subnetworks of Jr/It where there are Mt queues ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

Computational Algorithms for State-Dependent Queueing Networks



77

in subnetwork ~'t (only the e m p t y subnetwork is avoided). If eq. (21) is used, the computational complexity is roughtly the same as for Convolution, but numerical stability m a y be m u c h worse. If eq. (22) is used, the computational complexity is m u c h worse t h a n for Convolution, but numerical stability m a y be much better. Let us now consider a (new, but related) network Jg' of T (composite) queues (representing the subnetworks) where we assume there is no state-dependence other t h a n queue-dependent service rates. Let queue t, t -- 1, . . . , T, have relative throughput r~ where r~ ffi

~, iin,~gt

ri

~,

(23)

pij.

j n o t in ~ t

Let St = 1 and let #~(n) = R~'(n),

n = 1, . . . ,

N.

(24)

We can now apply eqs. (13) through (22) to this new network if we replace the state-dependent routing values ( f, ~r, T, and g) by one! The performance measures of this new network m a y be of interest in their own right. For example, R~ (N) m a y be interpreted as the throughput through subnetwork J/t, L~ (N) m a y be interpreted as the mean population of subnetwork J/t, and Q~ (N) m a y be interpreted as the m e a n time spent in subnetwork -///t. The performance measures in this new network can be interpreted as measures of our original network. Especially interesting are the throughputs, t h a t is, Rm(N) = rmR'(N),

and the queue length distributions. Theorems 6.1 and 6.2 of Sauer and C h a n d y [20] extend to this context, and we have N

P m ( n l N ) = ~ P t,( ~•I N ) P m.a, (n I ~), •

m in./gt,

(25)

i=n

and N

L m ( N ) = Y,

pI



t(tlN)L~'(i),

m inJ/t.

(26)

m inst.

(27)

iffil

Similarly N

R m ( N ) = ~ P t '( i I N ) R m~' (t), " iffil

M e a n queueing times can be obtained from Little's Rule and utilizations can be obtained as with Convolution. Appendix 2 gives a numerical example. Even in networks without state-dependent routing, the partitioning of networks into subnetworks is useful to reduce the computational expense of using eq. (22). Even if the number of subnetworks considered for eq. (22) is roughly the same, the subnetworks m a y be m u c h less expensive to solve using this partitioning. 4. OPEN NETWORKS WITH POPULATION-DEPENDENT ARRIVAL RATES

In this section we consider open networks. We continue to assume jobs are homogeneous, t h a t is, there is a single open chain. We will not allow the stateA C M T r a n s a c t i o n s on C o m p u t e r Systems, Vol. 1, No. 1, F e b r u a r y 1983.

78



Charles H. Sauer

dependent routing of Section 3. We make the exclusion to avoid additional complexity; what we say here extends to state-dependent routing. Let the arrival rate be X(n) when there are n jobs currently in the network, n ffi 0 . . . . . oo. Define n--1

A ( n ) =- H X(i),

n =- 0 , . . . , oo.

i=O

The product form solution then becomes [1] P ( n l , . . . , nM)

~-

A (n)X1 (nl) . . . XM(nM) H

(28)

This equation and all of the following assume the network is stable. We will give conditions for stability shortly. H is defined by ¢o

H=

~ A(n)G(n), n~O

where G (n) is as obtained by Convolution. With MVA, G (n) can be obtained from 1 G(n)

Hi%l R ( n ) '

(29)

where R (n) is as defined by eq. (22). Though this use of normalizing constants certainly makes MVA far removed from "mean" values, MVA remains numerically attractive in this context. While Convolution is vulnerable to values outside of floating point range in most of its equations, MVA is only so vulnerable in the equations of this section. Lam's adaptive scaling approach [11] becomes very practical in regard to the equations of this section. (In architectures/languages which do not support inexpensive detection of and recovery from overflow and underflow, rigorous implementation of Lam's approach may be impractical for Convolution.) The marginal distribution for number of jobs in the network is simply P(n) =

A(n)G(n)

H

,

n = 0, . . . , oo.

(30)

Corresponding to eqs. (25), (26), and (27), for individual queues the marginal queue length distribution is given by ¢0

Pro(i) = ~ P ( n ) P m ( i ] n ) ,

i --- 0 . . . . . 0%

(31)

n~O

the mean queue length is given by co

Lm--- ~ P ( n ) L m ( n ) ,

(32)

n=0

and the throughput is given by co

Rm = ~ P ( n ) R m ( n ) .

(33)

n=0

Though sufficient in principle, these equations are not computationaUy useful. A C M T r a n s a c t i o n s o n C o m p u t e r Systems, Vol. 1, No. 1, F e b r u a r y 1983.

Computational Algorithms for State-Dependent Queueing Networks

79

F o r numerical solution to be practical, the network m u s t h a v e limited populationd e p e n d e n t arrival rates, t h a t is, there exists some finite value a ~ 0 such t h a t X(n) = ?t(a) for n _ a. I t is useful to consider t h r e e s e p a r a t e cases: (1) constant arrival rates, t h a t is, a --- 0, (2) limited population open networks, t h a t is, k ( a ) = 0, a n d (3) unlimited population open networks, t h a t is, h ( a ) > 0. I f arrival r a t e s are constant, t h a t is, h(n) = X, n = 0, . . . , ce, t h e n it is well k n o w n [7] t h a t we can examine each queue in isolation with arrival r a t e hrm to obtain p e r f o r m a n c e m e a s u r e s for t h a t queue, provided no queue is saturated. (Assuming all queues are either IS or limited queue-dependent, t h a t is, the service r a t e s are constant for queue lengths a b o v e s o m e finite limit, t h e n simple equations are available for p e r f o r m a n c e measures. T h e mixed n e t w o r k equations of Section 6 reduce to these equations w h e n the closed chains are empty.) M a n y network m e a s u r e s can t h e n be obtained directly f r o m the individual queue measures. F o r o t h e r m e a s u r e s we can d e t e r m i n e H -1 ffi PI(0) . . . PM(O), where Pm(O) is the probability queue m is empty, and t h e n use eq. (28). (These constant arrival r a t e results extend to networks with certain p o p u l a t i o n - d e p e n d e n t s u b n e t w o r k s b y replacing the s u b n e t w o r k s b y queues representing those subnetworks, as in Section 3.3. T h e s u b n e t w o r k s m u s t be such t h a t the queues representing t h e m h a v e limited q u e u e - d e p e n d e n t service rates.) W e will use constant arrival r a t e results in s o m e of the s t a t e - d e p e n d e n t arrival, unlimited population equations. F o r the second case, namely, X(a) = 0, we can t r a n s f o r m the given n e t w o r k into a corresponding closed n e t w o r k with an a d d e d queue, queue 0, replacing the source and sink. I f we let r0 ffi So = 1, ~ ( n ) = h(a - n), n = 1. . . . . a, atid N --- a, t h e n the two networks will h a v e the s a m e p e r f o r m a n c e m e a s u r e s for queues 1 t h r o u g h M. F o r the third case, namely, k ( a ) > 0, a > 0, we assume t h a t all queues except IS queues are limited queue dependent. T h e n e t w o r k is stable if and only if for all limited q u e u e - d p e n d e n t queues k(a)Um/gm (bm) < 1, where gm(n) ffi gm (bm) for n ~-- bin. T h e n we can obtain H b y oo

H ffi ~ A(n)G(n) n~O

°1

a--1

= 2 A(n)G(n) + -A(a) n~O

(h(a)) a ,=0

a--1 A(a) ( = Y A(n)G(n) + ~ ,

.-o

(h(a)) a

(h(a))"G(n)- Y. (h(a))"G(n))

)

(34)

,=o

1 a--1 ) - Y. (h(a))"G(n)) P(01h--)~(a)) . = 0

where P (0 I)~ --- k ( a ) ) is the probability the corresponding n e t w o r k with c o n s t a n t arrival r a t e h ( a ) is empty. Similarly, eq. (31) can be rewritten

Pm(i) ~-~A(n)G(n)Pm(i]n) + (^tapjA(a) ~-~~~Pm(ilkfh(a)) - ~-~ ~ ~ (k(a))nG(n)Pm(iln)) ) nffii

nffiO

H

(35) where

Pm (i I h

= h(a)) is the probability queue m h a s length i in the corresponding ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

80

Charles H. Sauer

network with constant arrival rate k(a). Equation (32) can be rewritten Lm

A(a) (. Lm(k = k(a)) Z A(n)V(n)L~(n) + (X(a)------~~ P - - ~ - - k - ~ )

a--1 n~l

,-1 ) Z (X(a))"V(n)Lm(n)) n~l

H (36) where L~ (~ = k(a) is the mean length in the corresponding network with constant arrival rate ~(a) and eq. (33) can be similarly rewritten R~

,-1

A(a) ( rm~(a) ,-1 ) A(n)rmG(n - 1) -~ (},(a))" \P(OIk = k(a)) - ~ (k(a))nrmG(n - 1)) n~l

n~l

H (37) Networks with population size constraints [10] can be treated very similarly. An example of a network with population size constraints would be an "open" network where the population is never allowed to fall below some minimum value, say a'. Whenever the departure of a job would cause the population to fall below a', a "trigger" mechanism causes the instantaneous arrival of a new job. Such a constraint would be incorporated in the above expressions by eliminating terms with population less than a'. (Alternately, we could conside r a corresponding mixed network with closed chain population a'.) More complex constraints are possible in networks with heterogeneous jobs, but the computational development is essentially the same. T he constraints make the feasible network population ranges subsets of the ranges that would otherwise be feasible. If the constraints make the set of feasible populations finite, then one simply takes appropriate summations over closed network results for these populations. If the set of feasible populations is infinite, then, assuming limited population-dependent arrival rates, the potentially infinite summations may be replaced by finite summations, as with eqs. (34), (35), (36), and (37). 5. CHAIN-SPECIFIC QUEUE-DEPENDENT SERVICE RATES 5.1 Notation and Solution

We now return attention to closed networks. We will assume that there is no state-dependent behavior except for queue-dependent service rates. Incorporation of the other state-dependent behavior we have considered is notationally awkward, but feasible. Let there be K closed chains. Let the network population be N -- (N1 . . . . . NK), where Nk is the population of chain k. Let the relative throughput of chain k at queue m be rk,,. Let the mean service demand for chain k jobs at queue m be S~,. (For FCFS queues, the product form solution requires that S l m = S2m = . . . = SK~.) Let the relative utilization of chain k at queue m be uk~ -- rk,,Skm. As in the single chain case, we can have the case where/~m (n) is the service rate at queue ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

Computational Algorithms for State-Dependent Queueing Networks



81

• m when there is a total of n jobs at the queue. More generally, we can allow rates d e p e n d e n t on the n u m b e r of jobs of each chain at the queue. In this case we must require t h a t jobs of all chains can be in service simultaneously. A n u m b e r of queueing disciplines can be defined which satisfy this requirement, but m a n y c o m m o n disciplines (e.g., FCFS) do not. T h e n we let/~km (n) be the service rate for chain k jobs at queue m when the population of jobs at queue m is n = (nl, . . . . nK). This case does not necessarily satisfy product form; we will give a necessary condition shortly. T h e product form solution becomes P ( n l , . . . , riM) --

Xl(n.1)

...

XM(nM)

G(N)

,

(38)

where nm is the population at queue re[l]. For the case of chain-independent service rates, Xm(n) --

(n!/nl! . . . . .

nK!)U~lm

. . .

U~m

Hi~/~m(i)

,

n = 0 ....

, N,

(39)

where n is the sum of the components of n and 0 is the vector of length K with all elements equal to zero. For the general case of chain-dependent service rates, it follows from the discussion in Section 5.4 of Sauer and C h a n d y [20] t h a t we must have Ukm Xm(n)

-

-

-

ftkm ( n )

Xm(n

-

eD,

n _ ek,

(40)

where k m a y be any one of the chains, e k is the vector of length K with the k t h element equal to one and all other elements equal to zero, the relationship _> is applied element by element, and Xm (0) = 1. Note t h a t X~ (n) is not well defined by eq. (40) for all possible rate functions. Where eq. (40) does not well define Xm (n) the rate function does not satisfy product form. It is easy to show t h a t X m ( n ) is well defined by eq. (40) if and only if for i = 1 , . . . , K , j = 1 , . . . , K s u c h t h a t i ~ j , n = 0 . . . . . N such t h a t n - ei -> ej and n - ej _> el, ~tm (n) -

#jm(n) ftjrn ( n

ftim (n - ej).

(41)

-- e)

For example, consider the function #kin (n) = #~m (rain(n, t))

(42)

where #' is a rate function satisfying product form, the m i n i m u m function rain is applied element by element, and t is a vector of positive integers. This function is useful in approximate solution of queueing networks with simultaneous resource possession [20, 21]. It is easy to show t h a t the rate function p satisfies eq. (42) if and only if for k -- 1, . . . , K, P n ) = ~tkm(n P ftkm( --

ej)

for all j ~ k a n d n - ej _ e k such t h a t nk > tk. T h u s the rate function of eq. (42) violates p r o d u c t form for m a n y interesting cases. In [23] an empirical comparison shows t h a t solutions based on assuming the function of eq. (42) satisfies product A C M T r a n s a c t i o n s on C o m p u t e r Systems, Vol. 1, No. 1, F e b r u a r y 1983.

82

Charles H. Sauer

form can result in significant errors. We will assume in the remaining discusison t h a t all rate functions satisfy product form. 5.2 Convolution Algorithm

T h e Convolution Algorithm is essentially the same as before. Define

X,uj

E0,

i = j = ¢,

X~,

i = (/),

f

=

X,, I . X,*X~,

E=¢, otherwise,

where Eo is a matrix with K dimensions with value one in element 0 and value zero elsewhere. T h e Convolution operator is redefined as follows: L e t A, B, and C be matrices defined for indices n = 0 . . . . . N. T h e n the Convolution A = B * C is defined b y A ( n ) = ~ B ( i ) C ( n - i),

n = 0 . . . . , N.

i=0

For networks without subnetwork state-dependence G = X , . T h e marginal queue length distribution is given b y P m ( n ] N) =

Xm(n)X.,e-m(N

n)

-

G(N)

,

n = 0, . . . , N.

(43)

(See the discussion of eq. (7).) T h r o u g h p u t is given b y G ( N - ek) G(N)

R k m ( N ) = rkm

(44)

,

and other performance measures can be obtained from these basic values. 5.3 Mean Value Analysis

Since MVA has previously been derived for the case of chain-independent service rates [16], we concentrate on the chain-dependent rate case. With multiple chains, the m e a n queueing time derivation does not depend directly on the marginal queue length distribution. First we obtain the m e a n queue length as Xm(n)X~-m(N

N

Lkm(N)

= ~

.re,

N

n)

-

n~

G (N)

G(N

Xm(n)

~" nffiekXn k X m ( n -- ek)

-- ek)

Xm(n - ek)X~-m(N

G(N)

= ~ ~nkSkmR k m ( N ) P m ( n

-

G(N

- ek)

-

n) (45)

ek[ N - ek)

n=ek ~km(n)

for N _ ek. T h e n by Little's Rule N

nk

Q ~ ( N ) = Skin n~e,/tAm(n)

Pm(n -

ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

e~ ] N - ek).

(46)

Computational Algorithms for State-Dependent Queueing Networks

83

T o keep the iteration going, we need Nk R~n(N) ffi ~Mx (rki/r,m)Q,i(N)'

(47)

and the marginal queue length distribution. Corresponding to eq. (14), for N # 0 and feasible n # 0 Pm(n I N ) =

Xm(n)X~-m(N

n)

-

G(N) Xm(n)

- Xm(n -

Skin -

G ( N - eD

Xm(n - ek)X~-m(N - n)

G(N)

G(N - eD

ek) Rkm(N)Pm(n

#km(n)

-

ek [ N

-

(48)

ek),

where k is such t h a t n~ ~ 0 and Nk ~ 0. Corresponding to eq. (22) we also need I N ) - R~_mtN~ Rk~(N) Pm(O I N -- ek)

Pm(O

(49)

where any k s,~ch t h a t Nk > 0 m a y be used and R ~ ( N ) = Riki(N)/rki, i in i. T h e following were previously derived by Reiser and Lavenberg [16] and are included here for reference when we discuss mixed networks. For chainindependent service rates N i Q,m(N) Skm - l I N - ek)), (5o) =

i~l#--~Pm(i=

which simplifies to

Qkm(N) =

S•m #m

(1 + Lm(N - eD)

(51)

for constant service rates and Qkm(N) -- Skm/#m(1) for IS queues. T h e marginal distribution used in eq. (50) can be obtained by

P,,(n [ N)

1

#,,(n) y'k SkmR,m(N)Pm(n - 1 [ N - ek),

n > 0,

(52)

where the summation is taken over k such t h a t Nk > O. 6. MIXED NETWORKS E x c e p t as otherwise noted, we use the same assumptions and notation in this section as in Section 5. L e t there be K closed chains n u m b e r e d from I to K and one open chain n u m b e r e d 0. T h e population vectors we use thus have length K + 1, unless otherwise noted. L e t the open chain have constant arrival rate }~. (As in an open network, if a mixed network has several open chains with constant arrival rates, one can easily construct as equivalent network where" the several chains are replaced by a single aggregate chain.) We assume all queues visited by the open chain are either IS or limited queue-dependent with rates d e p e n d e n t only on total queue length such t h a t #m(n) is constant for n > bin. Define p m = ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

84

Charles H. Sauer



Define, for limited queue-dependent queues, p m = pm/ftm(bm). The network is stable if and only if for all limited queue-dependent queues Pm ~ 1. The product form solution becomes [1] ~ft0m.

P(nl . . . . . riM)

Xl(nl) . . . XM(nM)

(53)

--

G ( N 1 , . . . , NK)

where Xm(n) = (n!/no!, . .,. nK!)p . . ~mU~,m . ~Infa ftm(i)

ng UKm

(54)

Equations (53) and (54) are not directly useful because the open chain population is potentially infinite. Following Reiser and Kobayashi [15], it is possible to construct an equivalent closed network and interpret the results of that network for the mixed network. Our contributions here are to provide somewhat simpler expressions for the queue-dependent service case and to demonstrate how these equations allow MVA to be applied to mixed networks. (Reiser and Kobayashi used generating functions to develop the Convolution Algorithm for the same class of mixed networks considered here. Chandy and Saner [6, 20] developed LBANC for mixed networks where all queues are either IS or have constant rate servers. Schwetman [24] used the LBANC equations of Chandy and Sauer to develop MVA for this same class of mixed networks. Zahorjan and Wong [26] have given an intuitive development of the MVA equations for mixed networks with these same restrictions. The technical report [22] which preceded this paper was the first development of MVA with the same generality as the Convolution development of Reiser and Kobayashi. Krzesinski, Teunissen, and Kritzinger [9] subsequently developed MVA for these general networks along these same lines and showed that MVA could be used to obtain higher moments of the queue length distribution.) The basic step to obtain the equivalent closed network is to sum eq. (54) over all possible open chain populations to obtain, for the closed network (i.e., the following vectors are of length K), Xm(n) -- ( n ! / n l ! , . . . , nK!)U~lm . . . UnKKmC~m(n), IInffilftm( i) where for IS queues am(n) is simply ~m ~queues am(n)

--

~tm( bm) ~tm(bm-- 1)

for n < bm -

1,

i!n!

(55)

For limited queue-dependent

exp(pm).

1

(1

(56)

-- pro) n+l

b'n-2 (n'~- i), -i ( + i:o ~

n = 0 . . . . . N,

1

1

pm \110:n+1 nn+i ftm(j)

)

~tm(bm - l~(tlm(bm)) i-i

and 1 am(n) -- (1

-

-

Pm)n+l

(57)

for n >_ bm - 1. Reiser and Kobayashi established these results for IS and fixed rate queues. Note that although eq. (56) is not simple, it is not significantly less ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

369

CORRIGENDUM

Computational Algorithms for State-Dependent Queuing Networks [Charles H. Sauer, ACM Trans. Comput. Syst. 1, 1 (Feb. 1983), 67-92]. Charles H. Sauer [Received August 29, 1983] Communications Products Division, 11400 Burnet Road, Austin, TX 78758. Randolph D. Nelson has pointed out an error in equation 56. The correct equation is

am(n)

-

ftm(bm)bm-n-1 bin- 1

nj~n+l

ftm(J)

bm-2 (n + i)' + iffi0 ~ i!n!

1 (1 -- pro)"+1 1 pm

n+i

1 . u

l-[j--+1 gm(J)

~bm-1 llJffin+l

ftm(j)

__ ( f t m ( b m ) ) n - b m +i+ l

) .

I wish to thank Mr. Nelson for providing this correction.

ACM Transactions on Computer Systems, Vol. 1, No. 4, November 1983, Page 369.

Computational Algorithms for State-Dependent Queueing Networks

85

complex without the closed chains (n = 0), that is, it is of comparable complexity to the equations for the queue-dependent rate queue in isolation. Convolution applies directly with these definitions. The normalizing constant G will be the same as the one in eq. (53). MVA can be applied using the rate function #;,(n) = I~m(n)am(n - 1)~am(n). By appropriate summation of eq. (53) it can be seen that the open chain marginal queue length distribution is given by N {/~ + i)! Pore(n) = p~, iffi0 ~ n!i!am(i) H j f'+" " Pm(i I N), f i i + l ftm(J) n = 0, " ' " 0% (58) where P m ( i I N ) is the closed network marginal distribution obtained directly by MVA (eq. (52)), which is obtainable from eq. (43) for Convolution. (See the discussion of eq. (7).) The open chain mean queue length is given by N (i + 1)C~m(/+ 1) Pm(i I N)

Lom = Pm ~ i=O pm(i + 1)O~m(i)

(59)

for limited queue-dependent queues, which simplifies to Lom ----

Pm

(1 + Lm(N))

(60)

1 - - Pm

for constant rate queues. Of course, for IS queues Lom = pm/ttm(1). 7. SUMMARY

We have shown how the dominant computational algorithms for product form queueing networks develop for the forms of state-dependent behavior allowed in such networks. This is the first time that algorithms have been fully developed for the entire class of networks known to have a product form solution. We have also demonstrated that Mean Value Analysis is as general as Convolution, a surprising result! The results given here relate closely to two other recent developments in computational algorithms for product form networks. Lam and Lien [12] recently proposed a "tree" version of the Convolution Algorithm which obtains Xiuj in order of tree traversal, visiting subnetwork iand subnetworkj and then convolving the factors for these subsets. This is consistent with our discussion in Section 3.2 but different from usual approaches where the factors are obtained in sequential order, that is, X{1......-1}U{m}. (The sequential version can be seen as a special case of the tree version.) In general, this ordering distinction makes no difference in computational effort. However, the tree version makes feasible the solution of certain networks which previously would have been intractable. These networks are those with many closed chains and many queues where jobs in a given chain visit only a small subset of the queues. Lam and Lien solve an example network with 32 chains and 64 queues which would be unsolvable without the tree approach. Our discussion of MVA in Section 3 provides the necessary basis for developing a tree version of MVA. Neuse and Chandy [14] have extended previous approximate algorithms based on Mean Value Analysis to allow queue-dependent service rates. Before the tree algorithms, such approximate algorithms were the only hope for solving networks with many closed chains. The approach of Neuse ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

86



Charles H Bauer

and Chandy extends directly with our results to provide approximate algorithms for the general state-dependent behavior allowed by the product form. APPENDIX 1 SUMMARY OF SYMBOLS

This appendix summarizes the important symbols used in this paper, approximately in the order of introduction. Section 1

M - - n u m b e r of queues Xm--product form factors for queue m N - - n u m b e r of jobs G--normalizing constants Section 2 (assumes single chain)

(The following ignore the state-dependencies developed in subsequent sections.) po--probability job leaving queue i goes to queue j rm--relative throughput at queue m Sin--mean service demand at queue m urn--relative service demand at queue m #m--service rates at queue m J/4--set of queues of the network Lm--mean queue length at queue m in subnetwork consisting of queues of m. may be omitted if ~ = J4. Section 3 (assumes single chain)

T - - n u m b e r of subnetworks ~rm--state-dependent routing factor for queue m yr--state-dependent routing factor for subnetwork t gr--product of elements of ~/t Pm(n I N)--marginal probability of n jobs at queue m, given N jobs in the network Rm(N)--throughput at queue m given N jobs in the network Lm(N)--mean queue length given N jobs in the network Qm(N)--mean queueing time given N jobs in the network Um(N)--utilization given N jobs in the networl~ fT~(N)--fraction of throughput at queue m R ' ( N ) - - t h r o u g h p u t constant for (sub)network Section 4 (assumes single open chain)

~--external arrival rate A--product of arrival rates (k) H--normalizing constant a--limit to population dependence of arrival rate Section 5

K - - n u m b e r of closed chains No other major symbols are introduced in this section, but some symbols which previously represented vectors become matrices where the elements correspond A C M Transactions on C o m p u t e r Systems, Vol. 1. N o l, February 1983.

Computational Algorithms for State-Dependent Queueing Networks



87

to different c o m b i n a t i o n s of n u m b e r s o f j o b s in e a c h chain. S o m e s y m b o l s h a v e a n a d d e d s u b s c r i p t to indicate chain. Section 6 pm "-~ ~ Uom--relative traffic i n t e n s i t y o f o p e n c h a i n at q u e u e m

pm--traffic i n t e n s i t y o f o p e n c h a i n at q u e u e m to q u e u e d e p e n d e n c e o f service r a t e s at q u e u e m a m - - f a c t o r in t h e t r a n s l a t i o n f r o m m i x e d to closed n e t w o r k bm--limit

APPENDIX 2. NUMERICAL EXAMPLE As a n u m e r i c a l example, let us consider t h e c e n t r a l server m o d e l as d e s c r i b e d in t h e I n t r o d u c t i o n . L e t us a s s u m e t h e I / O devices are q u e u e s 1 a n d 2, t h e C P U is q u e u e 3, ~ 1 = {1, 2} a n d J/¢2 = {3}. L e t t h e degree o f m u l t i p r o g r a m m i n g , N, be 3. F r o m t h e p r e v i o u s l y given r o u t i n g p r o b a b i l i t y functions, we c a n let p31 = p32 -- 1. (p~3 = p23 = 1 a n d all o t h e r values o f p l / = 0.) F o r m = 1, 2, ~rm(nm) = 2 -- rim, n m = 0, 1, 2. F o r n = 1, 2, 3, 71(n) = 5 - n. I f we let r3 = 1, t h e n rl = r2 = 1. L e t us a s s u m e t h a t e a c h q u e u e h a s a single fixed r a t e server, t h a t m e a n service t i m e s at t h e I / O devices are 40 ms, a n d t h a t t h e m e a n service t i m e at t h e C P U is 10 ms. L e t $1 = 82 = 40, $3 = 10 a n d #1 = #2 = p3 = 1. Convolution F r o m the above, Ul

=

U2 =

40 a n d u3 = 10. W e c a n n o w d e t e r m i n e ( p r i m a r y e q u a t i o n used)

X1 = X2 = (1, 40 × 2, 1600 × 2, 64000 x 0)

(1)

--- (1, 80, 3200, 0) Xa = (1, 10, 100, 1000).

(1)

Then X{1.2} = (1, 80 + 80, 3200 + 6400 + 3200, 256000 + 256000)

(4)

= (1, 160, 12800, 512000), G{1.2) = (1, 160/4, 12800/12, 512000/24)

(5)

= (1, 40, 1066.67, 21333.33) G{1,2,3} ~- (1, 4 0 + 10, 1066.67 + 400 + 100,

(6)

21333.33 + 10666.67 + 4000 + 1000) = (1, 50, 1566.67, 37000) Thus R3(3) = 1566.67/37000 - 0.04234 j o b s / m s = 42.34 j o b s / s e c

(8)

Also,

PI(0I 3) =

1(1 × 1000 + (80/4) x 100 + (3200/12) × 10 + 0)/37000

(7)

= 0.15315 ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

88

Charles H. Sauer

P~(113) = 80((1/4) x 100 + (80/12) x 10 + (3200/24) x 1)/37000

(7)

= 0.48649 P1(213) -- 3200((1/12) x 10 + (80/24) x 1)/37000

(7)

= 0.36036 P1(313) = 0

(7)

T h e n by eq. (9) R1(3) = (1/40) x 0.84685 - 0.02117 j o b s / m s = 21.17 jobs/sec which, for this model, could be seen from Ra(3), since the I / O queues are identical. F r o m eq. (10) we can get L1(3) = L2(3) = 1.2072, so L3(3) = 0.5856. T h e n from Little's rule (eq. (11)) Q1(3) = Q2(3) - 57.02 ms and Q2(3) = 13.83 ms. W i t h o u t state-dependent routing in this model, b u t fixed equal probabilities for routing from the CPU to the I / O devices, we would have the following, assuming r~ = r2 = 0.5 and ra -- 1. (equation used) X~ = X2 = (1, 20, 400, 8000) Xa = (1, 10, 100, 1000).

(1) (1)

Then G{1.2) = (1, 20 + 20, 400 + 400 + 400, 8000 + 8000 + 8000 + 8000)

(6)

= (1, 40, 1200, 32000), G{1.2,3} = (1, 40 + 10, 1200 + 400 + 100, 32000 + 12000 + 4000 + 1000)

(6)

= (1, 50, 1700, 49000) and R3(3) = 1700/49000 = 0.03469 j o b s / m s = 34.69 jobs/sec.

(8)

T h u s the state-dependent/fLxed routing t h r o u g h p u t ratio is roughly 1.22. B y making the system sufficiently imbalanced, for example, by sufficiently increasing $1, we can make this ratio arbitrarily large. (If we let 81 go to infinity and leave the other p a r a m e t e r s fixed, t h e n in the fixed probabilities model all the jobs get " s t u c k " in queue 1 and the t h r o u g h p u t goes to zero. In the state-dependent probabilities model, only two of the three jobs will get stuck in queue 1 and the t h r o u g h p u t will go to 1/50.) Mean Value Analysis

For the example network, -/t 1'2) = ~/1. We will only obtain measures for queues 1 and 3, since queues 1 and 2 have the same measures. In obtaining the measures for queue 1 we will need T{2}(1) = 2 and T{2)(2) -- 1. 7{2}(3) is not defined because ~r2(2) = 0. It is infeasible in the original network to have 3 jobs in queue 2. This must be recognized in computing some performance measures, as we will see. Similarly, we can see t h a t we must have f~2}(1) = f~2}(2) -- 1 and f~2}(3) undefined. ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

Computational Algorithms for State-Dependent Queueing Networks

89

T h i s can be verified b y eq. (12) as necessary values are established. T h e algorithm proceeds as follows. (equation used) f~1'2}(I) = (1/4)(2 x i) = 0.5

(12)

Q~"2)(1) = (40/(4 × 0.5))(2 × 1) = 40

(16)

R~"2}(1) = 1/(40 + 40) = 1/80

(19)

L~1'2}(1) = (1/80)40 = 0.5

(20)

Q~2}(1) = (40/(2 × 1))(2 × 1) = 40

(16)

R {2}(1) = 1/40

(19)

P~l'2}(011) ffi (1/2}{1/40)/{1/40) = 0.5

(22)

P~1'2}(11 1) - (40 × 2)/(4 × 0.5) × (1/80) -- 0.5

(14)

f~1'2)(2) - (1/3)(2 × 0.5 + 1 × 0.5) = 0.5

(12)

Q~1'2}(2) = (40/(3 × 0.5))(1 x 2 × 0.5 + 2 × 1 × 0.5) = 53.333

(16)

R~"2}(2) = 2/(53.333 + 53.333) = 0.01875

(19)

L~1'2)(2) = 0.01875 x 53.333 --- 1

(20)

Q2(2) = (40/(1 x 1))(2 x 1) = 80 R(2}(2) = 2/80 - 0.025

(16) (19)

P~1'2}(012 ) -- (1/3)0.0375/0.025 × 0.5 --0.25

(22)

P~"2)(112) = (40 x 2)/(3 x 0.5) x 0.01875 × 0.5 - 0.5

(14)

P~1'2}(212) = (40 x 1)/(3 × 0.5) x 0.01875 × 0.5 = 0.25

(14)

/~1'2)(3) -- (1/2)(2 X 0.25 + 1 × 0.5) ffi 0.5

(12)

Q~"2}(3) = (40/(2 × 0.5))(1 × 2 × 0.25 + 2 x 1 × 0.5) ffi 60

(16)

R~"2}(3) = 3/(60 + 60) = 1/40

(19)

L~1'2}(3) ffi 0.025 × 60 ffi 1.5

(20)

We do not need any further values for (1, 2} to obtain utilization, t h r o u g h p u t , m e a n queue length, and m e a n queueing t i m e for the original network. We only need to c o m p u t e the marginal queue length distribution for population 3 in {1, 2} if we w a n t the marginal queue length distribution in the original network. Because ~2(2) -- 0, there cannot be 3 jobs in queue 2. T h u s Q2(2)(3) and R{2~(3) are undefined and P~"2}(013) m u s t be zero. A p r o g r a m could recognize this b y having a special value, say - 1 , to indicate an undefined value and giving this special value to 77-re(N) as appropriate. Proceeding with the o t h e r distribution values, ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

90



C h a r l e s H. S a u e r

f r o m eq. (14) P~1'2}(113) = (40 x 2 ) / ( 2 x 0.5) × 0.025 × 0.25 = 0.5 P~"2}(213) = (40 × 1 ) / ( 2 × 0.5) x 0.025 x 0.5 -- 0.5 P~1'2}(313) = (40 x 0 ) / ( 2 × 0.5) x 0.025 x 0.25 = 0 I n t h e n e t w o r k w i t h q u e u e s r e p r e s e n t i n g s u b n e t w o r k s (1, 2} a n d {3), w e h a v e r l = r~ = 2, #I(1) = 0.025, #I(2) = 0.0375, #I(3) = 0.05, a n d ~ ffi 0.1. U s i n g t h e e q u a t i o n s o f S e c t i o n 3.3 w i t h o u t t h e s t a t e - d e p e n d e n c e v a l u e s , (equation used) Q{1,2}(1) -- 1/0.025 -- 40

(16)

Q{3}(1) = 1/0.1 = 10

(17)

R(1,2}(1) -- R(a}(1) = 1/50 = 0.02

(19)

P(1,2}(011) -- ( 0 . 0 1 / 2 ) / ( 0 . 0 5 / 2 ) = 0.2

(22)

P(1,2)(111) -- 1/0.025 × 0.02 -- 0.8

(14)

L(3) (1) = 0.02 × 10 = 0.2 Q(1,2)(2) -- 1/0.025 × 0.2 + 2/0.0375 x 0.8 -- 50.667 Q{a)(2) -- 1/0.1(1 + 0.2) = 12 R{1,2}(2) = R{3} (2) -- 2/62.667 - - 0 . 0 3 1 9 1 5

(20) (16) (17) (19

P{1,2)(012) = ( 0 . 0 3 1 9 1 5 / 2 ) / ( 0 . 1 / 2 ) x 0.2 - 0 . 0 6 3 8 3 0

(22)

P(1,2}(112) --- 1/0.025 x 0.031915 x 0.2 -- 0.25532

(14)

P(1,2}(212) --- 1/0.0375 × 0.031915 x 0.8 - 0.68085

(14)

L{3)(2) ~ 0.031915 x 12 - 0.38298 Q{1,2}(3) -- 1/0.025 x 0.06383 + 2/0.0375 × 0.25532

(20) (16)

+ 3/0.05 x 0.68085 -- 57.021 Q(a)(3) - 1/0.1(1 + 0.38298) -- 13.830

(17)

R (1,2}(3) = R{3}(3) --- 3/70.851 --- 0.042342

(19)

P{~,2}(013) - (0.042342/2)/(0.1/2) x 0.063830 -- 0.027027

(22)

P(,,2}(113) = 1/0.025 X 0.042342 × 0.06380 - 0.10811

(14)

P{,,2}(213) ~ 1/0.0375 × 0.042342 × 0.25532 --- 0.28829

(14)

P{,,2)(313) -- 1/0.05 × 0.042342 × 0.68085 -- 0.57657

(14)

L , ( 3 ) ~ 0.5 x 0.10811 + 1 x 0.28829 + 1.5 x 0.57657 -- 1.2072 ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

(26)

Computational Algorithms for State-Dependent Queueing Networks

91

R1(3) = 0.0125 × 0.10811 + 0.01875 × 0.28829 + 0.025 × 0.57657 - 0.021171 L~3}(3) = 0.042342 × 13.830 -~ 0.58559

(27) (20)

T h e o b t a i n e d m e a s u r e s are t h e s a m e as w i t h C o n v o l u t i o n ; t h e r e m a i n i n g m e a s u r e s can be o b t a i n e d from t h e s e m e a s u r e s .

ACKNOWLEDGMENTS

I am grateful for the many constructive suggestions given by H. D. Schwetman and the anonymous referees. I would like also to thank S. Tucci for pointing out that the version of eq. (60) given in the technical report could be simplified to the form given here. REFERENCES 1. BASKETT, F., CHANDY, K.M., MUNTZ, a.a., AND PALACIOS, F.G. Open, closed, and mixed networks of queues with different classes of customers. J. A C M 22, 2 (April 1975), 248-260. 2. BuzEN, J.P. Queueing Network Models of Multiprogrammin 8. Ph.D. dissertation, Harvard University, Cambridge, Mass., 1971. Garland Publishing, New York, 1980. 3. CHANDY, K.M., HEP.ZOG,U, AND WOO, L.S., Parametric analysis of queuein 8 networks. I B M J. Res. Dev. 19, 1 (Jan. 1975), 43-49. 4. CHANDY,K.M., HOWARD,J.H., AND TOWSLEY,D.F. Product form and local balance in queueing networks. J. A C M 24, 2 (April 1977), 250-263. 5. CHANDY, K.M., AND SAUER, C.H. Approximate methods for analyzing queueing network models of computing systems. Comput. Surv. 10, 3 (Sept. 1978), 281-317. 6. CHANDY, K.M., AND SAUER, C.H. Computational algorithms for product form queueing networks. Commun. A C M 23, 10 (Oct. 1980), 573-583. 7. JACKSON,J.R. Jobshop-like queuein 8 systems. Manage. Sci. 10, 1 (1963), 131-142. 8. KOBAYASHI, H. System design and performance analysis using analytic models, in Current Trends in Programming Methodology. Volume III, Software Modeling and Its Impact on Performance (edited by K.M. Chandy and R.T. Yeh). Prentice-Hall, Englewood Cliffs, N.J., 1978. 9. KRZESINSKI,A., TEUNISSEN, P., AND KRITZINGER,P. Mean value analysis for queue dependent servers in mixed multiclass queueing networks. ITR 81-03-00, Univ. of Stellenbosch, South Africa, July 1981. 10. LAM, S.S. Queueing networks with population size constraints. I B M J. Res. Dev. 21, 4 (July 1977), 370-378. II. LAM, S.S., Dynamic scaling and growth behavior of queueing network normalization constants. J. A C M 29, 2 (April 1982), 492-513. 12. LAM, S.S., AND LIEN, Y.L. A tree convolution algorithm for the solution of queueing networks. Tech. Rep. TR-165, Department of Computer Sciences, Univ. of Texas at Austin, January 1981. To appear in Commun. ACM. 13. LITTLE, J.D.C. A proof of the queueing formula L = ~ W. Oper. Res. 9, 3(1961), 383-387. 14. NEUSE, D., AND CHANDY, K.M. SCAT: A heuristic algorithm for queueing models of computing systems. Performance Evaluation Review 10, 3 (Fall 1981), 59-79. 15. REISER, M., AND KOBAYASHI, H. Queueing networks with multiple closed chains: Theory and computational algorithms. I B M J. Res. Dev. 19, 3 (May 1975), 283-294. 16. REISER, M., AND LAVENBERG,S.S. Mean-value analysis of closed multichain queueing networks. J. ACM27, 2 (April 1980), 313-322. 17. REmER, M., AND SAUER, C.H. Queueing network models: Methods of solution and their program implementation, in Current Trends in Programming Methodology. Volume III, Software Modeling and Its Impact on Performance (edited by K.M. Chandy and R.T. Yeh). Prentice-Hall, Englewood Cliffs, N.J., 1978. ACM Transactions on Computer Systems, Vol. 1, No. 1, February 1983.

92

Charles H. Sauer

18. REISER,M. Mean-value analysis and convolution method for queue-dependent servers in closed queueing networks. IBM Res. Rep. RZ-1009, Zurich, Switzerland, March 1980. 19. SAUER, C.H., AND CHANDY, K.M. Approximate solution of queueing models of computer systems. Computer 13, 4 (April 1980), 25-32. 20. SAUER, C.H., AND CHANDY, K.M. Computer System Performance Modeling. Prentice-Hall, Englewood Cliffs, N.J., 1981. 21. SAUER,C.H. Approximate solution of queueing networks with simultaneous resource possession. IBM J. Res. Dev. 25, 6 (Nov. 1981), 894-903. 22. SAUER,C.H. Computational algorithms for state-dependent queueing networks. IBM Res. Rep. RC-8698, Yorktown Heights, New York, Feb. 1981. 23. SAUER, C.H. Numerical solution of some multiple chain queueing networks. Performance Evaluation Review 10, 4 (Winter 1981-1982), 47-56. 24. SCHWETMAN,H.D. Implementingthemeanvaluealgorithmforthesolutionofqueueingnetwork models. CSD-TR 355, Department of Computer Sciences, Purdue Univ., Dec. 1980. 25. TOWSLEY,D.F. Queueing network models with state-dependent routing. J. ACM 27, 2 (April 1980) 323-337. 26. ZAHORJAN,J., AND WONG, E. The solution of separable queueing network models using mean value analysis. Performance Evaluation Review 10, 3 (Fall 1981) 80-85. .

Received February 1981; revised December 1981; accepted May 1982

Suggest Documents