Queueing systems with resource sharing

Queueing systems with resource sharing

Queueing Systems with Resource Sharing S. Fdida, D. Mailles, and G. Pujolle Universite’ Pierre et Marie Curie, Paris, France Analytical methods for e...

707KB Sizes 2 Downloads 167 Views

Queueing Systems with Resource Sharing S. Fdida, D. Mailles, and G. Pujolle Universite’ Pierre et Marie Curie, Paris, France

Analytical methods for evaluating the performance of computer systems primarily use queueing network systems. However, those systems must verify independence assumptions that are essential to provide product-form queueing networks. We can’t, therefore, directly represent some classical behaviors in computer systems, especially since the emergence of distributed systems (e.g., computer networks, multiprocessor architecture). Simultaneous resource possessions belong to those behaviors and can have a significant effect on system performances. In this paper, we study systems in which there is a common resource. This shared resource is modeled by an allocation queue with a limited number of servers. A customer obtains and holds one of the allocation servers for a first service time, then requests services inside a SCMP network while still keeping the server of the allocation queue busy. In a first part we find the value of the stability condition of those networks, then we introduce an approximate technique to evaluate those systems. Several practical examples are considered, and simulation is used to validate the analytical model and to test its robustness. The approximate results are compared with simulation and found to be very accurate.

INTRODUCTION

network theory constitutes an efficient method for evaluating the performance of computer systems. However, we get the exact solution only for queueing systems without dependences between the different queues. This constraint involves a severe simplification of models. In particular, we know practically nothing about systems using common resources. To have accurate distributed-system models, it is necessary to dispose of resource-type queues. As examples of such queues, we can quote the main memory of a virtual-memory computer or the limited number of buffers of a switching node in a virtual-circuit computer Queueing

Address correspondence to S. Fdida. Laboratoire MASI, Insritut de Programmation, Universitk Pierre et Marie Curie, 4, Place Jussieu. 75252 Paris Cedex 05.

The Journal of Systems and Software I, 2: 23-29 (1986) 1C:Elsevier Science Publishing Co.. Inc. 1986

network. These systems are characterized by a sharing of their software and hardware resources. The processes of these systems have to cooperate. This yields strong dependences between the customers and therefore between the queues of a model. In this paper, we obtain the stability condition of systems in which there is a common resource. This one is modeled by a queue that is held as long as the customers are in the queueing system. The shared resource is represented by a first queue with a limited number of servers. These servers are emptied only when the customers leave the network, as shown in Figure 1. In a first part we obtain the stability condition for a basic model, then in the general case. Some examples are presented to illustrate the method, and some possible extensions of the previous model are derived. An important network characteristic, which apparently precludes a product-form solution, is the simultaneous resource possession [4, 5, 111. In the second part is introduced an approximate technique to evaluate a set of models in which multiple resources are held simultaneously. Simulation is used to validate the analytical model and to test its robustness. The approximate results are compared with simulation and found to be very accurate.

THE BASIC MODEL

We assume in this part that the system to be studied can be modeled by a single queue with a service time exponentially distributed with a rate u. The first queue representing the common resource is composed of C parallel independent servers exponentially distributed with a rate P. A customer, to enter the system, must have a part of the common resource; i.e., must enter a free server. Yet he has to wait in the queue of the first station. The service time of this first station can represent the time necessary to obtain the resource. It can be negligible. When the customer ends its service time, it goes to the second queue, but the server of the first 23 0164-1212/86/$3.50

S. Fdida, D. Mailles, and G. Pujolle

24 common resource

Figure 3. The general model Figure 1. The model under study.

THE GENERAL CASE

queue is blocked until the end of the service time of the second queue. To compute the stability condition of this system we can use Lavenberg’s theorem [ 81. The maximum throughput A is obtained by saturating the first queue and looking at the output of the system under some assumptions to be satisifed by the global network. The stability condition is X < A where X is the external arrival rate. Here, if we assume a saturated first queue, we know that the total number of customers in the system (global system minus the first waiting line) is C. As soon as a customer leaves the system a new one enters the server that has just become free. The maximum throughput is obtained through the closed queueing network shown in Figure 2. The flow in such a closed network is: A = VU, = kiii, where U, is the utilization of the second queue and Iii is the mean number of occupied servers of the first queue (but not blocked). Therefore, the stability condition of the system under study is:

We extend the previous result to the general queueing system with resource allocation shown in Figure 3. Using the same approach, we have to determine the maximum throughput when the first queue is assumed saturated. This involves solving the closed queueing network with C customers, shown in Figure 4. We assume that the general BCMP network verifies the assumptions of the BCMP theorem [l] extended by Kelly [6] and Schassberger [ 121. Let - ei, i = 0, . . . , N the mean number of passage through station i; - pi, i = 0, . . . , N the service rate at station i; -Ui,i = O,..., N the utilization of server i. If the queue possesses just one server, U, is a probability; nevertheless, Ui is the mean number of busy servers.

-i = the mean response time of the global closed queueing network. We have the stability condition (with e, = 1): A<%

i=O,l,

. . ..N

e,

Another possibility to determine the stability condition is to use Little’s formula on the global closed queueing network: C/A = i. This yields the following stability condition:

According to the system to be studied, it can be easier to compute i (mean value analysis, for example [lo]) than Ui, or vice versa.

EXAMPLES

where i is the response time of the closed network. A proof of the previous stability condition using generating functions is given in the thesis by Fdida [ 31. Figure 2. The closed queueing network.

A Virtual-Memory

Operating System

The first example we would like to study is a virtualmemory operating system. The main memory is shared Figure 4.

The closed queueing model.

Queueing

25

Systems with Resource Sharing

resource

allocatron

sender time

Figure 6, A link protocol

Figure 5. A virtual memory memory constraint.

operating

system

with main

by the jobs entering the systems and limited by the multiprogramming degree. Let C be this last value. The model we have to study is shown in Figure 5. The stability condition is obtained computing the mean number of active servers of the first queue using the saturated closed queueing network. If n, is the number of customers in the queue i, then we have:

round trip delay

model.

and the reception of a positive acknowledgement. If !J is the probability to have a frame in error, the resource is kept. This system may be modeled by the queueing network illustrated in Figure 6. Let p-’ be the time necessary to obtain the allowance to go to the sender queue and to be transmitted. This time is generally negligible. Let Y-’ be the transmission time we assume exponentially distributed and y-’ be the round-trip delay that we assume to have a deterministic duration. Let n,, n,, and n? be the number of customers in each station. C customers are in the closed queueing network when saturation is assumed. We have: p(h, w, n7)

n,, + n, + n, + n, = C, where G(C) is the normalizing constant depending on the number of customers C. U,, = ii,, =

where G(C) is the normalizing constant. The stability condition of this system is obtained as follows:

1 n,,G(C) no.(,

n,, + n, + nz + n, = C. The stability condition is:

X<

P

c “o,,I

n G(C)



h < &Jo.

n,, +

A Link Protocol

EXTENSIONS

We are going to evaluate a link protocol with a maximum of C outstanding frames: namely, the resource corresponding to the channel is the maximum number of frames that the source station may send without acknowledgment. The queueing network corresponds to the time elapsed between the transmission of the frame

A first extension is provided, assuming R classes of customers corresponding to R independent resources (see Figure 7). However, the R classes of customers are independent and cannot change class. Several classes of customers may be assumed to share one resource, but the total number of customers

n, +

n? =

C.

external errivals in the BCMP network

Figure 7. An extension

to K classes of customers.

BCMP network

26

S. Fdida, D. Mailles, and G. Pujolle

of these classes is limited to the number of servers of the resource-all~ation queue. Moreover, we can assume that external customers enter directly the BCMP network. They must be taken into account through new classes of customers. In this last case, it is necessary to be careful about the stability conditions of the different BCMP queues: they have to be satisfied. We can compute the stability condition when all the closed chains are satured. In this case we have:

b------y

qiJ Class s

.

BCMP network

...

-@ allocation queue I

1

Figure 9. The mixed queueing

network associated

with the

model (M). x,

,i,,*t =p,U,=%#j

=

I,...,

R,

i

where pj, U,, Cj, fi are, respectively, the rate, the utilization, the number of servers of the allocation queue of the jth class, and the total mean response time of class j customers.

of the allocation queue, given i busy servers in that queue, is equivalent to Ri. The behavior of the allocation queue is then equivalent to an M/G/C/FCFS queue with dependent service time Seq(i) computed as follows:

AN APPROXIMATE RESOLUTION METHOD

Seq(i)

resource-possession models in cases such as those depicted in the previous sections. The queueing network under study is shown in Figure 8. We define two types of classes, say S and S’. They perform a partition of the set of classes in the network. A class S customer must enter the network by the allocation queue. This class S is independent from S’, which represents the set of other classes. A customer from any class of S’ must enter the system by any queue of the BCMP network and transit to any class of S’. Let us build the mixed queueing network of Figure 9 associated with the first model. The main objective in the transformation of the network of Figure 8 to the network of Figure 9 is to derive the mean service time of the allocation queue. We then study the mixed network, given i class S customers, i = I, . . , , C, where C is the number of servers of the allocation queue. Let R, be the mean response time of class S customers through the closed chain given i class S customers, i = 1 . . 5 C. The principle of the method lies on the following assumption: the mean service time, say Seq(i),

\ Class

s

8lIocetion queue

i>C

However, we cannot solve this type of queue. To do this, we transform the allocation queue in an MfGIf l/PS queue with dependent service time S’eq(i) (see Figure 10). The PS scheduling of this equivalent single-server queue allows to simulate the parallel treatment of i customers,i = l,..., C and to robbe the distribution service time influence. Then we can compute Seq(i) given i customers in that queue: S’eq(i)

= R,/i

i = l,...,C

S’eq(C)

= R,/C

i > C

The anaiytical method imposes a restriction on the network architecture: there is only one customer class S.

EXAMPLES AND VALlDATlON To validate the analytical results obtained above, some

examples are considered in this section. As a reference, simulation models were developed for each system. The first example is given by the basic model of section 2. The allocation queue and the second queue are re-

Figure 10. Transformation

Classes u E S

of the allocation

queue.

7

‘u

Class

BCIIP network +@

i = l,...,C

network under study (M).

4-i-J

)I-

R,

Seq(i) = R,

We introduce an approximate solution for simultaneous

Figure 8. The queueing

=

..,

s

with

tl/GIC/FCFS dependant service

time

ti/GI/l/PS with dependant service

>

I

time

u--u--Sealif

2-l

Queueing Systems with Resource Sharing Perlpherels

Table 1. Comparison of the Approximate Method (A) with Simulation (S): S, = 50, S2 = 10, Stability Condition l/X > 16.62 I IX

N

D

20s

0.9742 fO.1758

A 30s

(IO-‘)

40s

+_

6.436

(IO-*)

2.364 0.2285

f

0.8799

1.624 + 0.1252

0.7877

117.5 4.716

T

I

128.7

(IO-‘)

+

2.4

0.7874 + 0.267 (10m2)

A

5.87 I!Z 0.2552

0.9735 0.8815 + 0.2194

A

R

71.03 0.51 I2 72

(IO-‘)

k

65.08 0.36

1.639

65.56

1.266 0.2575

63.40 0.81

PROCESSING IIUDULE 1

PRM, 50s

0.706 ? 0.802

A

I (IO-*)

f

0.707

(IO-‘)

+

1.269

63.46

Table 2. Comparison of the Approximate Method (A) with Simulation (S) S, = 5, S, = 20, Stability Condition: l/X > 20.0025

0.9609 fO.4205

21s

A

(IO-*)

+

20.89 2.864

*

20.32

0.9626

30s

A

440.2 59.36

Figure 12. PRll

426.7

A 50s

A

(IO-*)

(IO-‘)

+

0.4535 + 0.3221

(IO-*) I

Processor LB PB

1, 1-1,

,C

Local Bus Private Bus

A multiprocessor architecture.

I.106 k 0.1933

0.7589 k 0.1185 0.7667

I/O GB

65.9 2.37

Queueing network model of a multiprocessor.

Set of Processing Modules Set of Fictive Processing I/O Subsystem Global Bus

Modules

,%

T

,

P

65.02

(IO_‘)

f

I.125

0.5588

0.457

2.19 0.83 2.167

0.7179 0.5539 k 0.3565

40s

t

P,

by a multiprocessor architecture. The system analyzed here is shown in Figure 11 and its equivalent queueing network is shown in Figure 12. Another multiprocessor evaluation is provided in [ 91. The multiprocessor we analyze possesses C identical processors, an I/O subsystem, and a common memory. All those modules are interconnected by a global bus (GB). A processor must access directly its own private memory through its private bus (PB) or its local memory through its local bus (LB). Every access to its external memory space (composed of the common memory, the I/O subsystem memory, or the local memory modules, connected to the global bus of the other processors) needs the possession of the global bus. We assume here that access conflicts to any external memory module is equivalent to the possession of the GB. In this case, the memory interference is equivalent to the GB interference and contentions must occur only for external accesses. The scheduling of the GB must perform

FPRrl

0.7167 IA 0.55 (10-q

i,

PROCESSING MODULE C

R

N

P

Module

NC i

Local Memory Private Memory

Figure 11.

spectively of M/M/C type with mean service time S, and M/M/l type with mean service time S,. The parameters of the model (X, C, S,, S,) were varied over a wide range and results obtained through simulations compared with those obtained from the analysis. Tables 1 and 2 give the analytical, simulation, and simulation confidence intervals (within 95%) values for the utilization rate (p), the mean number of customers (N), and the mean response time (R) of the allocation queue, for two sets of parameter values. The stability condition is also obtained as described in Section 2. Throughout the range of parameter values studied, the analytical and simulation results were found strongly close (to within 10% for R in high loads). The next example studied in this section is provided

I/A

Processing LM PM

PROCESSI MODULE

44.61 0.643

I

45

(IO_‘)

f

38.20 0.5107 38.33

Ii0

S. Fdida, D. Mailles, and G. Pujolle

28 different strategies. In our case, we will assume that the GB is implemented with a round-robin algorithm. In a multiprocessor system the problem of simultaneous possession of resources by a task arises sometimes. For example, there exists an idle period while a processor is queueing for a service at the GB for communication purposes or application software transfer requirements. During this period, the processor remains idle waiting for the bus. This kind of system does not involve multiprogramming. Another aspect of multiprocessor environment is provided by the access; i.e., repartition of applicaton softwares between external and local memory modules. We are going to study this problem through our model. We say that a processor can be in one of the following states:

0) Inactive

the processor is free, waiting for a task assignment,

1) Active

the processor works in its local space (private or local memory)

2) Accessing

the processor possesses the GB and writes into (or reads from) external memory areas

4) Blocked

the processor wants to access external memory modules but the GB is busy

Some notations and assumptions are introduced: 1 The operating environment is modeled as the source tasks to execute. These process arrivals are modeled as a Poisson process with rate h.

2. All service-time distributions are exponential: p0 is the service rate of a processor, pELz the transfer rate of an information block through the GB (we assume block transfers on the GB), and ~.r,the rate of an I/ 0 operation. 3. We can take into account the loop back of a task into a processor with a fictive station equivalent to the processors queue; this equivalent queue is determined by a service rate, say p,, different from the original one. 4. We define the following routing ~ssibiIities: l P, represents the external space access probability; l PEs is the probability that an external access is an I/O operation. So (1 - PEs) represents an external memory access (except I/O memory subsystem); l The execution of a task ends with the probability P,. According to the analytical method, we have to build the closed (in this example) queueing network associated with the model of Figure 12. To simplify the computation of this network, it has been replaced by an equivalent network with tandem queues depicted in Figure 13.

eiui

PRM

FPRM

I/O

I

I

Figure 13. Equivalent network with tandem queues.

The results of this approximate analysis of multiprocessor architecture have been successfully validated with a simulation model and for a wide range of parameters values. Performance of this structure was analyzed for different kinds of applications in order to determine the optimum number of processors and the performance falls off due to the contention for shared resources. Those results are analyzed in the thesis by Fdida [ 33. They indicate that the effectiveness of a multiprocessor heavily depends on the access scheduling that is a function of the size of the local and the common memory. An example of results for a given application and a given architecture is presented here. Curves in Figure 14 and Figure 15 show utilization rate and mean response time of a processor from the simulation and the analysis. Simulation results are obtained with 95% confidence intervals. The approximations of the analytical results are, in all the cases we have studied, very accurate, so that they are covered by the confidence intervals provided by simulation.

l/jio = 0 ms

PG =41161

l/p1

=

PE5 = 1141

l/p3

=35

1 ms ms

PF

= l/61

Block transfert stze 256 bytes Global Bus (GE) throughput 5 Mbytes/s Number of Processmg Modules 4

Figure 14. Processors utilization versus mean arrival time

Traffic intensity of Processing Modules

L0.

0.51 30

40

50 60 70 Mean interarrival

80 time

90

100

Queueing

Systems with Resource

29

Sharing

280

REFERENCES

260

I. F. Baskett, K. M. Chandy, R. R. Muntz, and F. G. Palacios, Open, Closed and Mixed Networks of Queues

240 220

with

Meanresponse

200

260 (April

time of Processing Modules (ms)

180 160

I-

.,:- Analytic +

120 y~i-___

_*

Mean intersrrivnl

90

100

4.

time (msl

Figure 15. Mean response time of the (MT) versus mean arrival time.

processor

queue

5.

CONCLUSION Accurate analytical method for the evaluation of systems in which multiple resources are held simultaneously is one of the currently interesting problems in queueing network modeling of actual computer systems. In this paper we have presented a method for evaluating a system in which there is a common resource. This one is modeled by an allocation queue that is occupied as long as the customers are in the queueing network. First, we obtain the stability condition for such systems. Then we evaluate those networks using an approximation technique developed here. The method relies on the study of an associated network that gives information to compute the original system and in particular the allocation queue characteristics. Simulation is used to validate the analytical model and to test its robustness. The results are compared and found to be very accurate.

6. 1. 8.

9.

IO.

I I.

12.

of Customers,

/.

ACM

22, 248-

Decomposability

Queueing

and

Com-

(ACM Monograph Series), Academic Press, New York, 1977. S. Fdida, Etude de systtmes a partage de ressources par rtseaux de tiles d’attente. Application a I’architecture multiprocesseur SM 90, These de 3t cycle, Universite Pierre & Marie Curie (Paris 6) mars 1984. D. J. Freund and J. N. Bexfield, A New Aggregation Approximation Procedure for Solving Closed Queueing Networks with Simultaneous Resource Possession, in Proc. 1983, ACM Sig. Conf: on Measurement and Modeling of Computer Systems, Minneapolis, August 1983, pp. 2 14-224. P. A. Jacobson and E. D. Lazowska, Analyzing Queueing Networks with Simultaneous Resource Possession, Corn. ACM 25, 142-151 (Feb. 1982). F. P. Kelly, Networks of Queues with Customers of Different Types, J. Appl. Prob. 12, 542-554 (1975). L. Kleinrock, Queueing Systems (vol. I : Theory), John Wiley, New York, 1975. S. S. Lavenberg. Stability and Maximum Departure Rate of Certain Open Queueing Networks Having Capacity Constraints, IBM Research Report, RJl625, San Jose, 1975. M. Ajmone Marsan, G. Balbo, C. Conte, and F. Gregoretti. Modeling Bus Contention & Memory Interference in a Multiprocessor System, IEEE Trans. Computers C-32, 60-7 I (Jan. 1983). M. Reiser. Mean Value Analysis of Queueing Networks, a New Look at an Old Problem, IBM Research Report, RC, 7228, 1979. C. H. Sauer, Approximate Solution of Queueing Networks with Simultaneous Resource Possession, IBM J. ofDevelopment 25, (Nov. 6, 1981). R. Schassberger, The lntensitivity of Stationary Probabilities in Networks of Queues, Adv. Appl. Prob. IO, 906-912 (1978). puter

3.

t BO~"":"'.:'"':.'.':"":"":"":""~ 80 30 40 50 60 70

Classes 1975).

2. P. J. Courtois,

Slmulstion

140

100

Different

System

Applications