A Finite-Source Queue with Different Customers

4 downloads 0 Views 635KB Size Report
Categories and SubJect Descriptors: D.4.1[Operating Systems]: Process ... 1. Introduction. Queuing network models have been applied to the analysis of ... syste m, which consists of a central processor and peripherals plus the jobs that they.
A Finite-Source Queue with Different Customers HISAO KAMEDA

The Universityof Electro-Commumcations, Chofu, Tokyo, Japan A finite-source queuing model (sometimes called the finite-population, machine-interference, or machine-repairman model), which has often been used in analyzing time-sharing systems and multiprogrammed computer systems, is invesugated. The model studied here has two service staUons, a processor (single server) and peripherals (infinite server), and a finite number of customers (or jobs) that have a distract service rate at the processor. The model is in eqmhbnum. It is shown that the utilization factor of the processor can be obtained in an analyuc form and ts independent of various scheduling disciphnes employed at the processor, such as FCFS, generahzed processor sharing, preempUve (resume) and nonpreemptwe priority disciphnes, under some condiaon. Other relevant propemes of this model are also shown. The range within which these properties hold is discussed, and some examples are given. Examples of appficatlon to multiprogrammmg and tune-sharing systems are given; in particular, It Is shown that the often used dynamic dispatching pohcy (which gwes the higher preempuve priority to the more I/O oriented job) is optimal within the framework of this multiprogramming model. ~STRACT

Categories and SubJect Descriptors: D.4.1[Operating Systems]: ProcessManagement--multiprocessing/ multiprogrammin~,scheduhn~,D.4.8. [Operating Systems]: Performance--modelingandprediction, queuing

theory General Terms: Performance, Theory Additional Key Words and Phrases: Finite-source queue, finite population, machine servicing, machine repairman, machine interference, preemptive priority

1. Introduction Q u e u i n g n e t w o r k models have b e e n applied to the analysis o f time-sharing systems a n d m u l t i p r o g r a m m m e d c o m p u t e r systems. A m o n g these models we have a simple one m o d e l e d in the following way: W e c a n m o d e l a time-sharing system as the collection o f a c o m p u t e r a n d terminals plus the j o b s that t h e y process [10, 14]. E a c h j o b is associated with a terminal at which it suffers n o q u e u i n g delay. Queues o f j o b s m a y occur only at the computer. W e can m o d e l a m u l t i p r o g r a m m e d c o m p u t e r syste m, which consists o f a central processor a n d peripherals plus the j o b s that they process, in a similar w a y if we c a n neglect q u e u i n g delays at the peripherals [2, 11 ]. T o analyze these two kinds o f systems, we often use a f'mite-source q u e u i n g m o d e l which is sometimes called a "f'mite-population m o d e l " [ 1 % "machine-servicing m o d e l " [6], "machine-interference m o d e l " [5], or " m a c h i n e - r e p a i r m a n m o d e l . " This is a closed network o f queues which consists o f two service stations: one is a single server ("processor") a n d the other consists o f multiple servers ("peripherals") (see Figure 1). T h e n u m b e r o f servers at the latter is greater t h a n or equal to the total This research was supported in part by Grant-m-Aid for Scientific Research of the Ministry of Education, Science and Culture of Japan No. 468012, 1979. Author's address: Department of Computer Science, The University of Electro-Communications, 1-5-1 Chofugaoka, Chofu-shi, Tokyo 182, Japan. Permission to copy without fee all or part of this material is granted prowded that the copies are not made or distributed for direct commeroal advantage, the ACM copyright notice and the title of the pubhcation and its date appear, and notice is given that copying is by permission of the Assocmtion for Computing Machinery To copy otherwise, or to repubhsh, requires a fee and/or specific permission. © 1982ACM 0004-5411/82/0400-0478 $00.75 Journal of the A~oc~uon for Computing Machinery, VoL 29, No 2, Aprd 1982, pp 478-491

479

Fin~e-Source Queue with Different Customers N

jobs (customers)

Processor

Peripherals (Finite-source)

FIG. !

A finite-sourcequeuing model (the fimte-populationmodel)

number of jobs (or customers) in the network. It has been assumed that all jobs are statistically identical and have exponential service-time distributions at both stations. Scherr found this to be an excellent model for the measured response time in the MIT Compatible Time Sharing System (CTSS) [14]. Actually, the mean service time of each job at the processor may vary from job to job although that of each job at the peripherals is considered nearly the same. In order to estimate the effect of this difference, we need to modify the model such that the service rate of each job at the processor is not the same. Recent queuing theory, however, helps us only partially in analyzing the model. Namely, we can obtain an analytic product-form solution for the probability of each state of the model if the scheduling discipline at the processor is of a type that includes processor sharing and preemptive resume last-come-first-served, as discussed by Baskett et al. (BCMP Theorem) [1], Kelly [9], and Noetzel [12]. Notice, however, that we cannot apply the method of product-form solutions to the model where the mean service times of the jobs at the processor are not identical if the processor employs such important scheduling disciplines as preemptive or nonpreemptive priority and first-come-firstserved [3, 9, 12]. In the following section we try to obtain a kind of analytic solution for the utilization factor of the processor in the model where the service rates of the jobs at the processor are not the same even though the processor employs more general kinds of scheduling disciplines than those that allow product-form solutions. Furthermore, we also try to derive some results relevant to it. In Section 3 we discuss the implications of these results with some examples. In this paper we call customers jobs since we have computer applications in mind, although the results of this paper may be of a more general nature.

2. The Model and Its Properties The model studied here is a closed queuing network model which has two service stations and an arbitrary but finite number N of jobs (Figure 1). The one service station consists of only one server, where jobs may suffer from queuing delays. Let us call this the "processor." The other service station has multiple servers, the number of which is greater than or equal to the total number of jobs N, where no job suffers from queuing delays. Let us call this station the "peripherals." Let #j be the service rate o f j o b j at the processor. Let A be the service rate of any job at any one of the peripherals. We consider that the model is in equilibrium, has the Markov property, and is ergodic, so that it has a unique equilibrium status. Under these assumptions

480

HISAO KAMEDA

we obtain the balance equation for each state of the model by equating the rate at which probability "flows" into the state to the flow rate out of the state. From the set of these balance equations we obtain the probability of each state. What kind of states the model has depends on the scheduling discipline employed at the processor. Note, however, that we can classify all the states uniquely into groups according to which jobs stay at the processor and which jobs do not. The number and kinds of groups classified in this way are independent of the scheduling disciplines employed by the processor. Let us illustrate this by an example. Consider that the model has only two jobs. Let S,j denote the state that results when job j arrives at the processor while the processor is processing job i. In the model in which the processor employs the first-come-first-served scheduling discipline, state $12 is clearly distinguished from state $21. Contrariwise, in the model in which the processor employs the preemptive priority discipline and the service-time distributions are exponential, states $12 and $21 are not distinguished. Thus we can see that the kinds of states the model has depends on the scheduling disciplines employed at the processor. However, states $12 and $2~ are both classified into the same group, which is characterized by the feature that both jobs 1 and 2 stay at the processor, regardless of which scheduling discipline the processor employs. Each of these groups forms an aggregated state, and we hereafter regard these states as the states of the model. That is, each state of the model has a one-to-one correspondence with the set of jobs that stay at the processor. Consider an arbitrary set T of jobs staying at the processor. Let the state corresponding to the set T be denoted by state ST. Furthermore, let PT be the probability of the state $7, of the model. In the above example, the set of jobs in the model is (1,2}, and there are four subsets of the set: ( ) , (1}, (2}, and (1, 2}. Thus the model has four states S( ~, So~, S(2), and So,2 ), regardless of the scheduling discipline employed at the processor. While the model is in state ST, the processor processes one of the jobs in the set T, say job j, at each point of time. Let P~. be the probability (or the fraction of time) that the processor is processing job j and the model is in state ST. Then we have X

jET

= PT.

Now we consider the following condition. Condition A. The flow rate of probability out of an arbitrary state, say ST, due to an arbitrary job, s a y j ( j ~ T), leaving the processor is to be ~jP#. The flow rate out of state ST due to an arbitrary job, say k (k ¢ T), leaving the peripherals is to be XPT.

We can paraphrase Condition A as follows. Consider the transition from state ST to state ST-O), that is, the transition due to jobjleaving the processor. The probability that this transition will occur in the next infinitesimal interval of time whose duration is dt is to be I~jP~.dt. The probability that the transition from state $7 to state STufk) (k ~ T) will occur in the next infinitesimally small interval of time dt is to be APT dr. Consider the case in which each job has an exponential service-time distribution with a distinct mean service time at the processor and every job has the same exponential sevice-time distribution at the peripherals. In this case Condition A is satisfied if the processor employs any of the following scheduling disciplines: first-come-first-served, preemptive or nonpreemptive priority, shortest-expectedprocessing-time-first, preemptive or nonpreemptive last-come-first-served, processor sharing, generalized processor sharing (i.e., the jobs share the capacity of the processor Remarks.

Finite-Source Queue with Different Customers

481

at specified rates), etc. This is clear if we consider the way in which we obtain the balance equations for each scheduling discipline. However, not every scheduling discipline satisfies Condition A. For example, if the processor employs the scheduling disciplines that depend on exact information on actual processing time, such as shortest- processing-time-first, Condition A may not hold in general. Condition A may hold in some cases in which the service time distributions are not exponential, as is discussed in Section 3.2. Throughout this paper we assume Condition A unless stated otherwise. Now we state the main result of this paper. THEOREM 1. The utilization factor O of the processor is independent uling discipline employed by the processor and is expressed as follows: (l-p) -1=

Y. ~

...

dl~O d 2 ~ O

d, !Hx;-a', dN~O\t=l

of the sched(2.1)

z~l

where x, =

i =

l, 2 . . . . .

N.

(2.2)

A proof of the theorem is given in Appendix A. Let us derive some properties from this theorem. Let p~ be the utilization factor of the processor for job i, that is, the fraction of time the processor is busy processing job i (Y.~ p, = p). Let T~ be the average duration of time that job i spends at the processor. Note that T, is the average response time of job i in time-sharing systems. COROLLARY 1. The value of Y,~=,p~T, is independent of the scheduling discipline employed at the processor and is expressed as follows: N

N

2 p~r, = 2 # ; q - P x-x.

t=l

t=l

(2.3)

PROOF. Let S, be the average time interval between the two adjacent departures of job i from the processor. Then & = T~ + 2C1. By definition, p~S, ~=l~Tk Then we have p,T, = i~;-~ - p,A -1. From this we obtain (2.3). Q.E.D.

Remarks. This property might correspond to the conservation law of single-server queues discussed by Kleinrock [10]. In fact, the left-hand side of eq. (2.3) is the expected value of "unfinished work," U(t), which is defined as the remaining time required to empty the processor of all jobs present at time t, assuming that no new jobs enter the processor after time t. Thus we can say that, in this model, the average unfinished work remains constant even though the rate of arrival of each job into the processor is changed by the different selection of scheduling disciplines. On the contrary, in the finite-source queuing model the mean residual life Wo (=Y,,~I p,#7 ~) at the processor depends on the arrival rate of each job, and the conservation law does not hold for the average waiting time IV, (=T, - #71) although ~p,l,g~ is conserved in infinite-source single-server queues. COROLLARY 2. Let L denote the average length of the busy period of the processor. L is independent of which scheduling discipline the processor employs and is given by L = p((l - p)NX}-k

(2.4)

PaOOF. There is always an idle period between two adjacent busy periods. During any idle period, all N jobs stay at the peripherals. Let D be the average length of

482

HISAO KAMEDA

the idle period of the processor. Then D = (NX) -1 from Condition A. Since p = L(L + 1)) -1, we have (2.4). Q.E.D. Let O(') denote the utilization factor of the processor when the jobs in the model are (l, 2 . . . . . i}. Then (l - O°)) -1 =

Y,

Y,

...

dl=0 d2=O

x~ e".

! dt=O

(2.5)

n=l

THEOREM 2. Assume there are N jobs in the model. Consider arbitrary M jobs (M < N) among them. Let them be numbered from I through M and other jobs from M + I through N. The utilization factor m2. . M of the processor for jobs 1, 2 . . . . . M is maximum if and only if jobs 1, 2 . . . . . M have a higher preemptive (resume) priority than jobs M + 1, M + 2 . . . . , N. The maximum value of p~z . M is o¢M~. This theorem can also be derived from the balance equations. A proof of this is given in Appendix B. Note that the maximum condition of p12.. M lS independent of scheduling disciplines or priority assignments among jobs 1, 2 . . . . . M and jobs M + 1, M + 2 , . . . , N . COROLLARY 3. Assume the set of jobs in the model is { 1, 2 . . . . . N} and job i has a weight factor C~for i = 1, 2, . . . , N. Consider the sum C = Y~=~C,p,. C is maximum if and only if the jobs having the higher value of C~ have the higher preemptive priority. PROOf. Let us group all the jobs into classes each o f which contains jobs having the same value of weight factor 6',. Let K be the number o f such classes (K _< N). Let these classes be numbered from l through K such that C~ > C5 if I < J, for L J = 1, 2, . . . , K, where C) denotes the weight factor o f c l a s s - / j o b s for I = 1, 2 . . . . . K. Let da = C'a - C'a+l for J = 1, 2 . . . . . K - 1, and let dk = Ck. Then d j > 0 for J = 1, 2, . . . , K. Let pl denote the utilization factor o f the processor for class-I jobs. Then C=

t

CJOJ J~l

-~

pl J=l

1

)



Thus C IS maximum if and only If ~, JI=1 pz is maximum for J = l, 2 . . . . . K. From Theorem 2, ~J=l p1 is maximum if and only if jobs of classes l, 2 . . . . . J have a higher preemptive priority than any other jobs. Thus we can see that C is maximum if and only if jobs having the higher value of weight factor C, have the higher preemptive priority. Q.E.D.

3. Examples In this section we discuss the range within which the properties derived m Section 2 hold and show some examples of their application. In Section 3.1 we treat cases in which only two jobs are in the system. In Section 3.2, we relate the cases solved by the BCMP theorem with Condition A. In Sections 3.3-3.5 we provide some concrete examples of application to multiprogramming and time-sharing systems.

3.1. SCHEDULING OF T w o Joas. If only two jobs exist in the model and the service-time distributions of each job are exponential, we can solve the balance equations directly for cases with various scheduling disciplines employed at the processor [15]. Some typical results are shown in the following. Let the two jobs be labeled l and 2. Assume that the service-time distribution of each job at each service station is exponential in (0-(3).

Finite-Source Queue with Different Customers

483

(1) Preemptive Priority. Assume job 1 has a higher preemptive priority than job 2. Let Po, P1, P2, and P12 be the probabilities o f no job, only job 1, only job 2, and both jobs 1 and 2, respectively, staying at the processor. Let hi and h2 denote the service rates for jobs 1 and 2, respectively, at the peripherals. We demonstrate a general case where hi may be different from ~2. Let r - - [t + h2~71 + h ~ i 1 + h~(~1~2) -~ + h ~ h ~ ( ~ ) - l ] -~. Then we have, P0 P1 = P2 -P12 =

Fh~i-~(1 + # ~ ) ( 1 + #~i-1) -1, F(1 + #1h71) -1, F ~ , ~ # ~ ( # ~ ~ + ~,P,?~ + l)(l + mh7l) -~, F~2#Tt(#~#~ 1 + h2#~ 1 + ~1#~ ~ + 1)(1 + #~hi'~) -1.

From these we can see that P0 is not symmetric with respect to 1 and 2. Thus Theorem 1 does not hold generally for the cases in which the service rates hi o f the jobs at the peripherals are not the same. If we let X1 -- h2 = h and let xt = # ~ - 1 and x~ = bt2h-1 as in (2.2), we have, Po el P2 P12

- [1 + Xl"1 de. X~1 ..1. 2(XlX2)-I]-l, = Po(l

+ x1) -1,

ffi Pox~l(2 + x~)(1 + xa)-~, = e o [ x ? 1 + x f ~ + 2 ( x l x 2 ) - q ( l + x~) -1.

(2) First-Come-First-Served. Assume jobs are processed at the processor on the first-come-first-served basis. Let P o , / 1 , and P2 denote the same as in (1). Let Pa~ denote the state probability o f processing job a while jobs a and b both remain at the processor, for a ffi 1, b = 2 and a = 2, b -- 1. Then we have Po = [1 + x~"x + x~"~ + 2(xlxz)-X]-x. Let E = P0(1 + xi "1 + x ~ ) -~. Then we have P1 Pu Plz Pzl

= ---

E(1 E(1 E(1 E(1

+ + + +

2x~-*)xi-1, 2xi-1)x~-~,

2 x ~ ) x [ ~, 2x~)x~ 2.

(3) Generalized Processor Sharing. Assume job 1 gets the fraction a o f the processor capacity and job 2 the fraction 13 = 1 - a, irrespective o f the order o f entry into the queue when both jobs are at the processor (0 _< a,/~ --< 1). When a --/~ -- ½, this reduces to "processor sharing." Let Po, P~, Pz, and P ~ denote the same as in (l). Then we have, Po = [1 + xi "~ + x~ 1 + 2(x~xz)-l] -1, Pt = Po[l + 3(2 + xt + xz)(l + axt +/3x~)-Xxi'l](l + xl) -~, P2 = Po[l + a(2 + Xx + x~)(1 + o/.x1 + FlX2)-Ix21](I + X2) -1, P~z = Po[X~ ~ + x~ ~ + 2(xaxz)-l](1 + ¢x.x~+ #xz) -~. These reduce to those in (1) when a = 1 and/3 = 0.

Remarks. We can see that Po (the rate of the processor being idle) is the same in all three cases (1)-(3), but that the probabilities of the other states vary from case to case. 3.2 THE CAS~ SOLVED B~ TH~ BCMP THEOREM. When the scheduling discipline employed at the processor is either processor sharing or preemptive (resume) last-

484

HISAO KAMEDA

an"

FIG. 2.

Representatton of service-time distributions by the method of stages (the probability of a zerolength service time is considered zero).

come-first-served, or when the model has the independent balance equations, the BCMP theorem can be applied to the model [1, 7]. In this case the service-time distributions at both stations are allowed not only to be exponential but also to be "Coxian" (i.e., to have rational Laplace transforms), and the utilization factor derived is the same as (2.1). Now let us consider Condition A further. Note that any Coxian distribution can be represented by a network of exponential stages o f the form shown in Figure 2, where b, denotes the probability that the job leaves after the ith stage and a, (ffil - b,) denotes the probability that the job goes to the next stage [4]. Given that the job reaches the ith stage, the service time in this stage has a negative exponential distribution with mean p71. Let P~(S) be the conditional probability that the job stays at stage i under the condition that the model is in state S. Let p(S) be the rate of the job leaving this station while the model is in state S. Then n

~(s) = Y ~,b,P.(S), where n is the number o f stages. In the case where the BCMP theorem applies, the probability o f each (free) state o f the model can be expressed as a product form. By examining its general form as given in [1], we can see that P i ( S ) is independent o f S for all i and then that #(S) is constant with respect to state S. Thus we see that Condition A holds also in this case, even though the service-time distributions are not exponential. 3.3 A MODEL FOR OPTIMAL MEMORY PARTITIONING. G h a n e m [8] has used a finite-source model to investigate the problem o f how to partition main memory among jobs in multiprogrammed virtual memory systems to maximize the utilization factor of the central processor. His conclusion (as stated in [8, Th. 8]) is the following: Let P ,, (mr, m2, .., raN) be a memory pamtion. Assume all the programs have the same degenerate S-shape lifetime function (i.e., the hfetime),(m), given the amount of memory m, is Rm ~ for 0 ~ m _< m0 and Ring for m _>mowhtle R, too,and a are posture constants). Furthermore, assume that the total size of main memory is less than or equal to Nmo. If there exist t and j such that m, # mj (m, # 0 or too) and (m~ # 0 or too), then P is not an optimal partition. [Copyright 1975 by International Business Machines Corporaaon; reprinted with permission.]

He assumes that the processor-sharing discipline is employed at the processor. We can extend his results to the case where Condition A holds (e.g., the exponential service-time distributions with first-come-first-served or priority scheduling disciplines). 3.4 MULTIPROGRAM SCHEDULING. As stated in the introduction, we can use the finite-source model to analyze multiprogramming if the service-time distribution at the peripherals can be regarded as the same for all jobs and the congestion at the peripherals is negligible. Here we regard the CPU and the I / O devices of a

Finite-Source Queue with Different Customers

485

multiprogramming system as the processor and peripherals of the model, respectively. Recently, in order to improve the throughput, many computing systems have employed a dynamic dispatching scheme which gives higher processing priorities of the CPU to I/O-bound jobs than to CPU-bound jobs. Those systems are measuring the characteristics of jobs continuously while they process them and predict the expected CPU burst length of each job on the basis of the measured characteristics of jobs, thus determining whether each job is to be characterized as I/O bound or CPU bound [13]. We can analyze this scheme using the model in the following way. Note that I/Obound jobs have larger values of x, (=mean peripheral service time/mean processor service time). Let U be the total sum of the utilization factors of the processor and the peripherals. Then,

ufE(l l

From Corollary 3, U is maximum (under Condition A) if and only if jobs with the greater value of x~ (i.e., I/O-bound jobs) have the higher preemptive priority. Thus we see that the result of this analysis supports the dynamic dispatching policy. 3.5. RESPONSE TIME Or TIME-SHARING SYSTEMS. We can regard the computer and terminals of a time-sharing system as the processor and peripherals of the model, respectively, as stated in the introduction. When #, = # for all i, the average response time T has been obtained as follows [14]: T = N ( # p ) - l - h -t

where

l-p=

k-o(N-k)!

(3.1)

If #, is not the same for all i, we can have other equations as follows. From the definition of p, and T, we have, (3.2)

T, = (#,p,)-~ - ~ - ' .

From this, or by dividing both sides of (2.3) in the previous section by p, T,

=

#F1

p-I _

X-',

(3.3)

t--1

where p is given in (2.1). Thus we see that Y~,~IT,(p,/p) is constant with respect to queue disciplines. Note that eq. (3.3) reduces to eq. (3.1) when #, -- # for all i. Furthermore, since, from (3.2), p, = #7~(T~ + X-%-',

we have N

Z #?'(T, + h-')-' = p. I=I

This shows the constraint among the response times of jobs, which is invariant with respect to queue disciplines on the computer of a time-sharing system. 4. Conclusion

In this paper we have investigated a finite-source queuing (machine-repairman, machine-interference) model (see Figure i) in which eachjob has a distinct processor burst rate. Under Condition A as described in Section 2 we have shown that the utilization factor of the processor is independent of the scheduling discipline era-

486

HISAO

KAMEDA

ployed at the processor, and that the utilization factor for an arbitrary set of jobs is maximum if and only if the set of jobs is given higher preemptive (resume) priorities than any other jobs. We have also derived some other properties of the model. We have investigated the range within which these properties hold by examining some examples, such as two-job scheduling and the case solved by the BCMP theorem. But the discussion of the range of validity is not exhaustive. We have also shown some examples of application to multiprogramming and time-shared systems, and, especially in the former, we have discussed the optimality of the dynamic dispatching policy.

Appendix A.

A Proof of Theorem 1

Let us have the following notation. Let ZN denote the set { 1, 2 . . . . . N}. Let I, denote an arbitrary subset {ix,/2, . . . , i,} of size p of the set ZN. Let Jm denote an arbitrary subset {fl, j2 . . . . . jm} of size m of the set Ip. Thus Jm C Ip C ZN. Let [9 denote the complementary set {ip+l, ip+~,..., iN} of set Ip, that is, Ip -- ZN -- Ip. Equation (2.1) is expressed as N

(1 - p)-~ ffi Z n! n--O

E

(x,~x,~ . . .

x,n) -1.

all possible subaeta {ti, t2 ..... tn} of size n of the set {1,2,.. ,N}

Then, using the above notation, we have N

(I-p)-1---- ~n! E [Ix:l. nxO

InC~ZNt ~ l n

Since we consider that the model has the Markov property and is ergodic, we can build Kolmogorov's equations and, from them, a set of balance equations for equilibrium state probabilities which has a unique solution. The form of the balance equations may depend on the scheduling discipline employed at the processor. Each of the equations shows that the flow rate of probability into a state is equal to the flow rate out of that state. From the equations we can obtain another set of balance equations with respect to states, each of which is obtained by aggregating those states in which the set of jobs staying at the processor is identical. Thus the balance equation with respect to each state must also be such that the flow rates of probability into and out of the state are equal. Since Condition A holds, these balance equations can be of a form independent of the scheduling discipline employed at the processor. Hereafter we start with this level of balance equations with respect to states. Note that this set of balance equations may not be sufficient for obtaining the probability of every state, but, as we see below, this set is sufficient for obtaining the probability P0 that all the jobs are staying at the peripherals. Suppose that there are N jobs (or customers) in the model, and let them be numbered from 1 through N. Consider an arbitrary subset I, of size p of the set of jobs ZN. Let PIp denote the probability of state $I~, that is, the probability of only and all jobs i E Ip staying together at the processor. In this case the complementary set ~ of the set Ip represents the collection of'jobs staying at the peripherals. Furthermore, consider the collection of all states S j m such that Jm C Ip for m ---0, 1. . . . . p. We regard the collection as an aggregated state denoted by Alp. This aggregated state is characterized by the feature that jobs i C ip stay together at the peripherals while jobs i E Ip may stay at either the processor or the peripherals. In Figure 3 the aggregated states A (1~ and A o,2~ are shown by the inner and outer dashed circles, respectively, when the total set of jobs is (l, 2, 3).

487

Finite-Source Queue with Different Customers 1,2

II

FIG 3 The dmgram of transmons among states (N = 3) Now we construct balance equations with respect to the probability flow rates into and out of such aggregated states. Consider an arbitrary state Sam that is included in aggregated state A~ (Jm C Ip). Note that the transitions into and out o f this state due to one of jobs t ~ I v leaving the processor or the peripherals are absorbed within the aggregated state because the aggregated state is characterized by the positions of jobs i ~ [p only. Thus the flow rate out of the aggregated state due to the transition from state S j m is only that due to the arrival of any one o f jobs i ~ [p from the peripherals and hence is (N - P)PJm, from Condition A, where the time scale is adjusted so that ?, = l and/z, -- x, for all i. The flow rate into the state Jm from the outside of the aggregated state is only that due to any one of jobs k E in leaving the processor at state Sjmutk J and hence is, from Condition A,

E xhP kjmu{h} . k~

By summing these for all Jm C I n, m = 0, 1. . . . . p, we have the balance equation with respect to aggregated state A~, p

Y

P

E (N-e)Pj

= Y

mffiO JmClp

E

E

(Al)

rn=O dmcIp k ~ p

Let us have the following notation: p

QIp = 2 Z Pdm, m=O JmClp P

(A2)

Qzy(k} = Y, ~ pkJmU{kl, m=o d~ct~, Q ~ = ~ Q}~,

where

k ~ [p,

(A3)

where

arm C In.

(A4)

~Edm

Note that QI,, is the probability of aggregated state A~p and that Q~uck~ k is the probability (or the fraction of time) the processor is processing job k while the model is in aggregated state .4x~u~m. Furthermore, Q~? is the probability that the processor is processing either of jobs t E J,~ while the model is in aggregated stateA1. Then note that

Q~

=

Olp

-

Po.

(A5)

488

HISAO KAMEDA

Thus (AI) can be written as (A6)

k uO~). (N - p) Qzp = ~_ X kQx,

kelp

By dividing both sides of (A6) by H,e~ x, we have H x ; 1. ( N - p ) Q j , H x-['= ~,, 0.1~uck~ k

(A7)

tC.k

By summing both sides of (A7) for all sets Iv of size p we have

(N-p)

~

(AS)

Qz. II x [ a = vp,

[pCZN

telp

where

vp = 2

(A9)

X Qx,,uch) I] x; -~.

IpCZN k e ~

I,e~p t'~k

Now we prove the following lemma. LEMMA

Vp = Up+,,

(AI0)

where Up = 2

Q~; [I x;'

IpCZN

(All)

telp

PROOF. Let us define V~ as follows: V;=

Y,

Q,,~+, ~ k'

~,

I'p+ICZN k'el)+l

x:- 1.

(Al2)

JeI'p+l

We can see that all the terms in V~ are distinguishable from each other, and the total number of them is (p N 1)(p + l) = N!/[(N - p - l)!p!]. We can also see that all the terms in V~ also appear in NVv,if we check on their subscripts and superscripts. The number of terms in Vp is (p)(N - p ) = N!/[(N - p - l)!p!], which is equal to the number of terms in F;,. Thus we have Vp -- V~. From (A4), (All), and (A12), we have t

v~=

2

l "p+lCZN

,e~Ib+l ,~,~+~ 1-I x; 1 = Up+l. j ~T~+ l

Since Vp = V~, we have Vp = Up+a. Q.E.D. Note that from (A5), (A8), and (A11), vp = (N - p) Up + (N - p)Po

Y~ H x?'.

(AI3)

IpC.ZN te ~p

And we have, from (AI0) and (A13),

Up+I = ( N - p)Up + (N - P)Po ~,

H xTa.

(AI4)

By multiplying both sides of (A14) by (N - p - 1)! we have (N-p-

I)!Up+,=(N-p)!Up+(N-p)!Po

E H x[q. lpc.zN ~e~

(Al5)

Finite-Source Queue with Different Customers

489

Summing both sides of (AI5) for p = 0, 1, . . . , N and UN = Q~N = 1 -- Po, we have

1 and noting that Uo -- 0

N--1

l - Po= Po E ( N - p ) !

E

p=O

H xi-'.

(A16)

IpCZN tE~p

Rewriting N - p as n in (AI6), we have N

eo Z n! E

[[ x~-~= 1.

Since p - 1 - P0, we have (2.1) from (A17). Appendix B.

(AI7)

lncZN t~.ln

n=0

Q.E.D.

A Proof o f Theorem 2

We use the same notation as in Appendix A unless otherwise specified. Thus ZM = ( 1, 2 . . . . . M ) , and ZM = ZN -- ZM = { M + 1, M + 2 . . . . , N ) , the complementary set of ZM. Note that

pa2.. U = Q ~ .

(BI)

Let Ip denote an arbitrary subset of size p of set ZM and [M denote ZM -- Ip. By replacing Ip in (A6) with Ip (3 ZM we have, since the size of set Ip U ZM is p+N-M, ( M - p)Q~puzM = Y, ~ X k Q I ~h, U ( k } O Z M .

(B2)

By dividing both sides of (B2) by [[,O-~x, we have (M - p)Ql~uzM ~M XT' = k ~

Q~putk)ugM ~ u xT'.

(B3)

t~k

Summing both sizes o f (B3) for all subsets of size p, lp C ZM, we have Y~ ( M - p ) a l , r,cz,~

ue,~ H x 7 ~ = V~, ~jy

(B4)

V~=

QIpu~h~uz~ ~ - [I x-~l. ,jy

(BS)

where

Z E~

,:z,,

-

z~k

In the same way as in the derivation of (AIO) we have M Up+l, VpM•

(B6)

~ Q~u~.~ ~MX-['.

(B7)

QI,ugM

(B8)

where

U~=

IpCZM

~r~

Note that IpUZM = QIt, UZM +

and zTu