next up previous
Up: No Title Previous: Extension to Multiple Servers

CPU vs. I/O Activity

Assume then that we have established some acceptable average number of processes in the system, call it n. In a steady-state, there are always exactly n processes in the system--equivalently, as soon as one process completes, another one arrives to replace it. Since we are looking at average behavior, we can assume that these n processes are all ``average'' processes and thus also indistinguishable. We can then turn our attention to some more careful analysis/dimensioning of our system. As we have seen, each process alternates between CPU bursts and I/O bursts; since our n processes are ``eternal,'' each will be in an infinite cycle between CPU and I/O bursts. Assuming some knowledge about our CPU and I/O servers and about the characteristic CPU and I/O bursts of our ``average'' processes, we can then analyze the CPU vs. I/O behavior of our system and draw conclusions as to CPU and I/O device use.

For illustration, suppose that we have n=4, 1 CPU server, and 2 I/O servers; further assume that the service rate of the CPU is tex2html_wrap_inline163 processes per unit time, while the service rate of each of the two I/O servers is tex2html_wrap_inline159 processes per unit time. (These tex2html_wrap_inline163 and tex2html_wrap_inline159 are unrelated to those used in the previous section.) Since we have 4 processes, our system can be in one of 5 states: (a) all 4 processes are in CPU burst; (b) 3 processes are in CPU burst, 1 is in I/O burst; (c) 2 processes are in CPU burst, 2 in I/O burst; (d) 1 process is in CPU burst, 3 processes are in I/O burst; and (e) all 4 processes are in I/O burst. (We need no more states, because the processes are indistinguishable and because the two I/O devices are identical.) Naturally, since we only have one CPU server and two I/O servers, processes will often be waiting for a server of one or the other kind. As before, we can observe such a system on a time scale small enough that, between any two observations, at most one event (CPU burst completion or I/O burst completion) can have taken place. However, the completion rates are doubled when both I/O processors are active; hence the state diagram looks as follows.

As before, we can assign a probability to each state; let us denote these probabilities by tex2html_wrap_inline365 , tex2html_wrap_inline367 , tex2html_wrap_inline369 , tex2html_wrap_inline371 , and tex2html_wrap_inline373 . (Naturally, the system must be in one of these 5 states, so that we have tex2html_wrap_inline375 .) \ We can write one equation for each state, as before, by assuming steady-state conditions and writing that the net flow into a state equals the net flow out of that state. As a result, we get 5 simple linear equations in 5 unknowns; the algebra gets messy, but the principle remains simple. In our system, letting tex2html_wrap_inline207 and tex2html_wrap_inline379 , we get

eqnarray126

From these data, we can compute a number of useful quantities. For instance, the probability of having all three devices busy is just tex2html_wrap_inline381 ; the average number of processes waiting for CPU service is tex2html_wrap_inline383 ; the average number of processes waiting for I/O service is tex2html_wrap_inline385 ; the percentage of time spent waiting for a server (which is also the percentage of processes waiting at any given time) is tex2html_wrap_inline387 ; and so forth. Such quantities indicate whether the hardware is being well used; where potential bottlenecks are; and what the impact of additional resources would be (more or faster servers).

More complex systems, with several unequal servers, can be modelled with the same technique.


next up previous
Up: No Title Previous: Extension to Multiple Servers


Thu Feb 20 07:57:47 MST 1997