On the analysis of a symmetric polling system with single-message buffers

On the analysis of a symmetric polling system with single-message buffers

149 On the Analysis of a Symmetric Polling System with Single-Message Buffers Hideaki Takagi IBM Japan Science Institute, No. 36 Kowa Building, 5-19,...

473KB Sizes 0 Downloads 16 Views

149

On the Analysis of a Symmetric Polling System with Single-Message Buffers Hideaki Takagi IBM Japan Science Institute, No. 36 Kowa Building, 5-19, Sanban-cho, Chiyoda-ku, Tokyo 102. Japan Received 13 June 1984 Revised 1 February 1985

A performance analysis is provided for a polling system consisting of statistically identical stations with single-message buffers and Poisson arrival streams. Switchover and message service times are assumed to be generally distributed. Some errors in the past analysis are pointed out. We express such performance measures as the mean polling cycle time, the mean message response time, and the mean number of messages at an arbitrary time in terms of the mean number of massages served in a polling cycle. Our mean message response time reduces to that for an FCFS M / G / 1 / / N queue (machine interference model) in the limit of zero switchover time.

Keywords: Performance Analysis, Polling, Token Passing, Local Area Networks, Machine Repair Model, Markov Process, Cyclic Service, Finite-Population Queue, Multiqueue

1. Introduction

Cyclic service discipline in a multiple-queue, single-server system may find a number of examples in computer and communication systems: e.g., cyclic scan of external interrrupts (in operating systems), polling (in multi-drop telecommunication systems) and token-passing (in local-area computer networks). Here, each station is polled, i.e., inspected if there is a message to serve, in a fixed cyclic order with a generally nonzero time to switch from one station to another. In this paper, we focus on the case where each station has a buffer for a single message only; i.e., those messages which arrive at a station to find the buffer full are lost. Further, we assume an independent Poisson arrival at each station. Thus, our system can also be thought of as one in which each station takes an exponentially distributed time to generate a new message only after a previous message has completed service. Yet another view is provided by comparing our system to a machine repair system in which a repairman walks from machine to machine in an ordered fashion fixing broken machines. Here, the message arrival and its service correspond to the machine stoppage and its repair, respectively. Note that our system would be an M/G/1//N queuing system (a finite input source model, or a machine interference model; see, for example, [10]) if service were given in FCFS order with zero switchover times. This paper provides an analysis for a polling system consisting of statistically identical stations where the switchover and message service times are generally distributed. Our major performance measure is the Hideaki Takagi received his B.S. and M.S. degrees in Physics from the University of Tokyo in 1972 and 1974, respectively. In 1974 he joined IBM Japan as a Systems Engineer. From 1979 to 1983, he was with University of California, Los Angeles, supported by the IBM Japan Overseas Scholarship Program and the Defense Advanced Research Projects Agency contract. He received his Ph.D. degree in Computer Science in 1983. Since July 1983, he has been with IBM Japan Science Institute where he is currently Manager of Communication Networks group. His research interest includes probability theory, queueing theory and stochastic processes as applied to computer communication networks. He is a member of IEEE, ACM, ORSA and IPSJ (Information Processing Society of Japan). He is a Managing Editor of Performance Evaluation.

North-Holland Performance Evaluation 5 (1985) 149-157 0166-5316/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland)

H. Takagi / On the analysis of a symmetric polling system with single-message buffers

150

mean message response time (the average time that an arbitrary message takes from its arrival to its service completion). Below we define our system parameters and resulting performance measures. We also point out some errors in previous work. We present our new analysis for the steady-state probability at the polling instants. It is shown that the mean message response time is expressed in terms of the probability that a message is found at the polling instant.

2. Model

We consider a system of N stations (indexed as i = 1, 2 . . . . . N ) served in cyclic order by a single server. Each station, with a single-message buffer, has an independent Poisson arrival stream of messages at a rate X messages/second (identical for all stations). As mentioned above, those messages which arrive to find the buffer full are lost. A message is removed from the buffer when its service is completed. Let B(x) be the distribution function for the service time of each message (again identical for all stations). Also, let B*(s) be the LST (Laplace-Stieltjes transform) of B(x), and b be the mean message service time. The server inspects the stations in cyclic order according to the station number (station 1 is inspected after station N ) and administers service to queued messages if any. Let Ri(x ) be the distribution function for the switchover time from station i to station i + 1 mod N. Similarly, let R*(s) be the LST of Ri(x), and r i be the mean switchover time from station i to station i + 1. These are the parameters of our system. We first (in the formulation of Section 3) assume that R*(s) can be different for different stations. In Section 5, however, we assume that they are all identical; in this case, all stations are statistically identical, and we have a symmetric system. We define the mean total switchover time by N

R = Y'~ r i .

(1)

i=1

3. Performance measures

We define a polling cycle as the time interval beginning at the polling instant of station 1 and ending with the completion of the switchover from station N to station 1. However, if we consider the buffer occupation states at all stations as the system state, the start of each polling cycle (i.e., the instant when station 1 is polled) is not a regeneration point of the system state. Time instants when station 1 is polled and all buffers are empty are regeneration points [5]. We call the time interval between two such successive regeneration points a regenerative cycle. See, for example, [4] for a discussion of regenerative processes. Let M be the number of polling cycles in a regenerative cycle, and C,,,, m = 1 . . . . . M, be the duration of the m th polling cycle in a regenerative cycle. The mean (polling) cycle time E[C] is defined by

e[cl-

e[Ml

(2)

where E[X] denotes the expectation of a random variable X. Similarly, the mean number of messages served in a polling cycle, E[Q], is defined by

e[Ql

e[Ml

where Q,,, is the number of messages served in the m t h

(3) polling cylce of a regenerative cycle. E[Q] is

H. Takagi / On the analysis of a symmetric polling system with single-message buffers

151

related to a, the probability that a message is found at the polling instant as follows: E [number of messages served in a regenerative cycle] E [number of stations polled in a regenerative cylce]

a

E[m~-_lQ]mE[Q] -

Ue[Ml

U

(4)

We now proceed to derive the relationship between E[C] and E[Q]. Note that Cm consists of the sum of the switchover times in the ruth polling cycle (which we denote by Rm) and the sum of message service times in the same cycle (which we denote by Bin). Thus we have

E[m~=lfm]=g[m~=l(Rmq-nm)] =E[m~=lR+E[m~=l m] gmJ.

(5)

However, R1, R 2.... are random variables with common mean E[R1] = R. Also, M is what is known as a stopping time for R1, R 2. . . . . with E[M] < o0. It follows from Wald's lemma (see [4]) that

E

1R,, =

E[Mle[R,I = RE[MI.

(6)

By definition, we must have

Using (6) and (7) in (5), we have

E[,~=, C,,]= RE[ M] + bE[Q]E[ M].

(8)

Thus, from (2) we get

E[C] = R + bE[Q] = R + bNa.

(9)

An interesting performance measure for our system is the mean message response time for messages which are not lost upon arrival, which we denote by E[T]. We now express E[T] in terms of E[Q]. Note that the buffer state of each station alternates between the ' e m p t y ' state of mean duration 1/X and the 'full' state of mean duration E[T]. Thus, the rate of the messages served in the whole system, i.e., the throughput of the system (denoted by ,/), is given by

"t = N / ( E[T] + 1/~.).

(10)

On the other hand, the throughput must be equal to the mean number of messages served per unit time:

Thus we have 1

E[T] = N b - h

NR E[Q]"

(12)

H. Takagi / On the analysis of a symmetric polling system with single-message buffers

152

Another interesting performance measure is the probability of message loss, Pt., where we say that messages arriving at nonempty stations are lost. Due to the Poisson arrival process, this loss probability is equal to the long-run average fraction of time that the buffer of a station is full:

P, = E [ T ] / ( E [ T ] + 1/2~).

(13)

Thus the throughput and loss probability are related by y = ;kN(l - PL)

(14)

which implies that the throughput 7 is the fraction 1 - Pt. of the total message arrival rate )iN. From Little's result applied to those messages which are not lost upon arrival, the number of messages, N, in the system at an arbitrary time has a mean value, E [ N ] , given by E [ N ] = y E [ T ] = UPs.

(15)

or, more explicitly, N(1/2t) E [ T ] + 1/2t

E[N] = N

(16)

where the second term on the right-hand side of this equation represents the mean number of empty stations. The result Pt. = E [ I V ] / N is expected from the Poisson arrival property at each station. Note that, in the limit of zero switchover time (i.e., R*,(s)---, 1), E[T] should be identical to the mean response time for the corresponding FCFS M / G / 1 / / N queue (machine repairman model) given in [10] (cited as L. Tak~tcs' solution [12]):

1

1

This claim comes from the following reasoning. First, for both cyclic and FCFS service systems, we have the same arrival process (namely, the pseudo-Poisson arrival such that the state-dependent arrival rate is ( N - i)?t when i stations are nonempty). Although the service disciplines with which the server selects a station to serve are different, the statistical characteristic of the message service time does not depend on the selected station. Thus, the behavior of the unfinished work in both systems should be statistically identical. It follows from Little's result that the mean message response times are the same for both systems.

4. Survey of previous work We now give a short survey of related previous work. Mack, Murphy and Webb [7] considered a system (in the context of the machine repairman model) with constant switchover times (r, for station i) and a constant message service time (b). They obtained an expression for the mean number of messages served in a polling cycle as N-1

E[Q] =

n=O

n

N n= 1

,-I r/

(18)

.,;=0

where R is defined by (1). They also showed the relation in (9). Later, Scholl and Potier [11] used (12) to obtain the mean message response time. Note that, in the limit of zero switchover times (i.e., R --* 0), (12) with (18) reduces to (17) with B*(s) = e-'t'. For the same model, Kaye [6] found the distribution for the message waiting time. (His expression for the mean waiting time has a form different from what can be

H. Takagi / On the analysis of a symmetric polling system with single-message buffers

15 3

obtained from (12) with (18) minus b. But they can be shown to be identical.) Mack [8] considered a case where the switchover times are again constant (but they can be unequal among stations) and the message service times (machine repair times in his context) are variable (but the distribution must be identical for all stations). He derived a system of 2 x 1 linear equations to find E[C]. Although he did not derive the mean response time, we believe that it could be obtained by combining his E[C] with our equations (9) and (12). Bharucha-Reid [1] (which is based on [9] according to personal communication) independently dealt with the case of constant switchover times (6 for station i) and generally distributed message service times (B*(s) for all stations), and showed N-I

E[Q]

n

n=O

=

N

n-1

(19)

Vt

(This reduces to (18) when B*(s)= e ,i,.) Hashida and Kawashima [3] derived a similar expression for the mean number of messages served in an intervisit time (defined as the time interval beginning with the start of the switchover from station 1 to station 2 and ending with completion of the switchover from station N to station 1). We should note, however, that if we calculate the mean message response time with (12) and (19) and take the limit of zero switchover time (i.e., R ~ 0), we do not get the limiting form in (17). Thus, the analyses in [1] and [3] are wrong. The error comes from their using B*(X) as the probability of no arrivals during each message service time in evaluating the probability of buffer occupancy which the last N inspections have encountered. However, for example, if we find a message at station N - 1 and no message at station N, the service time at station N - 1 must have been "smaller" than B*(s) would imply. Thus we cannot use B*(X) separately for each service time. This error has also been pointed out by Coffman and Gilbert [2]. Wu and Chen [14] consider a slightly different model where each message consists of a geometrically distributed number of characters, and the server switches from one station to the hext. serving exactly one character (if any) for each visit to a station (they call this a round-robin scheduling of services). The switchover times and character service time are assumed to be constant. Their treatment is approximate. Our conclusion in this brief survey of previous work concerning the analysis of polling systems with single message buffers is that the mean message response time in the case of general R*(s) and B*(s) has not previously been available. In the next section, we consider a symmetric case where general distributions R*(s) and B*(s) are identical for all stations. Our model and Mack's model in [8] are complementary in the sense that ours can handle variable switchover times (Mack's cannot) but that ours cannot be applied to asymmetric systems (Mack's can in some cases). Our analysis takes into account the conditional distribution of service times and switchover times. We evaluate c~ from which all performance measures in Section 3 can be calculated numerically. Recently, Tobagi and Fine [13] showed an application of Kaye's analysis [6] to the performance evaluation of some local area networks (which uses explicitly or implicitly token passing schemes for medium access control). Our contribution in this paper extends the application to the cases of variable switchover times and message length.

5. The steady-state probability at polling instants We begin our analysis by defining the state of station i, denoted by t,i, as vi=

0 1

if the buffer at station i is full, if the buffer at station i is empty; i = 1 , 2 , . . . , N .

(20)

H. Takagi / On the analysis o f a s y m m e t r i c polling system with single-message buffers

154

Obviously the system state (v~, v2 . . . . . UN) at each polling instant forms a M a r k o v chain. Let p i ( v ~ , v 2 . . . . . VN) be the probability that the state of station j is v j ( j = 1, 2 . . . . . N ) at the instant when station i is polled. We will express p , + l ( v l , v 2 . . . . . ON) in terms of p i ( v l , v z . . . . . VN) and the possible events occurring between the polling instants for stations i and i + 1. Since all stations are statistically identical, let us focus on station i = 1 below. Since the duration of the interval between the polling instants for stations 1 and 2 is equal to a switchover time when v~ = 1 (no message found), and equal to a switchover time plus a message service time when v~ = 0 (a message found), we have the following steady-state probability transition transform equation: N

E E - . E p 2 ( ~ , , ~ ..... ~ ) FI (z,) '~' UI

U,

t'~

=EE

j=l

"'" EP,(1,

v2 . . . . . VN) N

× f ( 1 - e-x' + z,e-~') FI (a- e-~ + z,e-~')"dR(x) j-

+EE

-

2

Ep~(o, ~_~..... vN) N

× f f (1-e-X' +z,e-X" ) I-I [1--e-X"~+"+z,e-~"~+"l"'dR(x)d.(y)

(21)

j=2

where (z~, z 2 . . . . . z N) are transform variables. The summation with respect to q covers vj = 0 and 1 for all j. The range of integrals is always from 0 to oz. We define the joint generating function for p ~ ( v , , v 2 . . . . . VN) by N

"'" E P l ( / ) I ' V2. . . . . UN) I-'I (Zj)"*,

F ( v , ; z 2, z 3 . . . . . Z x ) & E Z v,

v3

Vv

V, = 0, 1.

(22)

j= 2

Then the right-hand side of (21) can be written as F(1;1-e

-x" + zze-X", . . . ) d R ( x )

+(z,- 1)fe a-"F(1;1+

ffF(o:a - e - a " + "

e-~" +

z2e-X~,...)dR(x)

+ z2e - x'-'+-'''. . . . ) d R ( x ) d B ( y )

+(z, - a)f f e-X'r(o;1-e-X"+" +z2e ~,x+, . . . .

)dR(x)dB(y).

(23)

In order to express the left-hand side of (21) in terms of F, we note from the s y m m e t r y a m o n g stations that pz(v,,

(24)

v 2 . . . . . ON) = p l ( v Z . . . . . VN, Vl)

for all values of (v 1, v 2. . . . . vN). Thus the left-hand side of (21) may be expressed as r ( 0 ; z 3 . . . . . z N, z , ) + z 2 r ( 1 ; z

(25)

3 . . . . . z N, z l ) .

We further introduce a function f ( v 1, v2 . . . . . o N) by N

r ( v ~ ;z 2 . . . . . ZN) = E t,,_

"'" Ef( v ,~

UI' V2 . . . . . UN) 1 7 ( Zi -- 1)"', j =2

O, = 0, 1.

(26)

H. Takagi / On the analysis of a symmetric polling system with single-message buffers

15 5

Substituting this expression into (23) and (25), and equating the coefficients of H ( z ~ - 1)% we obtain a system of linear equations for f ( v 1, v z . . . . . VN ): f ( 1 , 0, V3 . . . . . V N ) R *

X

VJ

= f ( 0 , v3 . . . . . vs., O) + f ( 1 , v 3 . . . . . v N, 0),

[(

f ( 1 , 0 , v3. . . . . v N ) R *

=/(0,

X 1+ ~Vj

v 3 . . . . . v N, 1 ) + f ( 1 ,

[(

f ( 1 , 1 , v3 . . . . . v N ) R *

= f ( 1 , v 3 . . . . . v N, 0), f(1,

1,U 3 .....

(27a)

J=3

v, . . . . . v N, 1),

(27b)

)t 1 + Y'. v,

[(

j=3

(27c)

UN)R* ~k 2"4- E UI

+ f ( O , 1, v 3 . . . . . V N ) R *

= f ( 1 , v3 . . . . .

/QN'

j=3

[(

X 2 + Y'~ VJ

[(

B* X 1 + Z

j=3

v,

j=3

v 3, v 4 . . . . . v s = 0, 1.

1);

(27d)

One of the equations in (27a-d) is redundant (namely, the case of v 3 = ... = v:v = 0 in (27a)). F r o m the normalization condition F ( 0 ; 1 . . . . . 1) + F(1 ;1 . . . . . 1) = 1,

(28)

f ( 0 , 0 . . . . . "0) + f ( 1 , 0 . . . . . 0) = 1.

(29)

we have The probability that a message is found at the polling instant is given by a = f ( 0 , 0 . . . . . 0) = F ( 0 ; 1 . . . . . 1) =~7~ "'" Y ' . p , ( O , v 2 . . . . . v N). u2

(30)

t, \

We have so far been unable to find an analytical solution to the above system of equations for a general value of N. So the solution can be obtained only numerically. For the cases of N = 2 and 3, however, we have analytical solutions which give f(O, 0)-

1 - r 2 + b l r 2 - r2bl 1 - r 2 + r2b 1 '

f ( O , O, O) = 1 -

(31a)

1"3 + b 2 r ~ - [ r 2 ( 1 - b ' ) + r ? b ' ] ( b 2 r 2 + b ' [ r ' ( 1 - r 3 ) + b ' ( r ' r 3 - r ~ ) ] } " 1-

r 3 + b 2 r 3 - r 2 ( 1 - b l ) { b2r22 + b 1 [ r , ( 1 -

"

r_~) + b 2 ( r , r , - r~ )] }

(31b)

H. Takagi / On the analysis of a symmetric polling system with single-message buffers

156

10 9 r=l.0

8 7

r=0.5

6

E ITI r=0.1

5 4

r = 0.05

3

FCFS i/G/1//r

2

N

N=5 b =1.0

1

0 0

2

4

ANb

6

8

10

Fig. 1. Mean message response time (constant switchover time and exponentially distributed service time).

where we have used convention

r~=R*(j?~)

andb~=B*(jX)

for j = l, 2, 3.

(32)

If we use (31a) or (31b) with R*(s)= e -~" (constant switchover time) for (12) with (4), and take the limit r ~ 0, then we recover (17). In Fig. 1, we plot E[T] for some cases; we see that, as r ~ 0, the mean response time approaches that of the corresponding FCFS M / G / 1 / / N model given by (17).

Acknowledgement The author is very grateful to Drs. Daniel P. Heyman, Edward G. Coffman, Jr., Richard Gail, Luis F.M. de Moraes, Leonard Kleinrock, and Konosuke Kawashima for their constructive comments on the first version of the manuscript.

References [1] A.T. Bharucha-Reid, Elements of the Theory of Markov Processes and Their Applications, Section 9.4D, McGraw-Hill Book Company, 1960. [2] E.G. Coffman, Jr. and E.N. Gilbert, "A continuous polling system with constant service times", Preprint, 1984. Submitted to IEEE Transactions on Information Theory. [3] O. Hashida and K. Kawashima, "Analysis of a polling system with single user at each terminal", Review of the Electrical Communication Laboratories, Vol. 29, Nos. 3-4, pp. 245-253, March-April 1981.

[4] D.P. Heyman and M.J. Sobel, Stochastic Models in Operations Research, Volume I: Stochastic Processes and Operating Characteristics, Chapter 6, McGraw-Hill Book Company, 1982. [5] The choice of these regenerative points and the following discussion until equation (8) was suggested by D.P. Heyman through personal communication (his letter dated March 2, 1984). [6] A.R. Kaye, "Analysis of a distributed control loop for data transmission", Proceedings of the Symposium on Computer-Communications Networks and Teletraffic, pp. 47-58, Polytechnic Institute of Brooklyn, April 4-6, 1972.

H. Takagi / On the analysis of a symmetric polling system with single-message buffers [7] C. Mack, T. Murphy and N.L. Webb, "The efficiency of N machines uni-directionally patrolled by one operative when walking time and repair times are constants", Journal of the Royal Statistical Society, Ser. B, Vol. 19, No. 1, pp. 166-172, 1957. [8] C. Mack, "The efficiency of N machines uni-directionally patrolled by one operative when walking time is constant and repair times are variable", Journal of the Royal Statistical Society, Ser. B, Vol. 19, No. 1, pp. 173-178, 1957. [9] J.Th. Runnenburg, "Machines served by a patrolling operator", Math. Centrum, Amsterdam Statist. Afdeling Rep., $221 (VP13), 1957. [10] T.L. Saaty, Elements of Queueing Theory with Applications, Section 14-6, McGraw-Hill Book Company, 1961.

157

[11] M. O'Scholl and D. Potier, "Finite and infinite source models for communication systems under polling", IRIA Rapport de Recherche, No. 308, May 1978. [12] L. Tak~cs, Introduction to the Theory of Queues, Chapter 5, Oxford University Press, 1962. [13] F.A. Tobagi and M. Fine, "Performance of unidirectional broadcast local area networks: Expressnet and Fasnet", IEEE Journal on Selected Areas in Communications, Vol. SAC-l, No. 5, pp. 913-926, November 1983. [14] R.M. Wu and Yen-Bin Chen, "Analysis of a loop transmission system with round-robin scheduling of services", IBM Journal of Research and Development, Vol. 19, No. 5, pp. 486-493, September 1975.