13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

50 Time Management Chapter 2tapeprinterdiskdepartureCPUFigure 2.14 A typical queueing networkarrivalOf course, such a model is only an approximation of the reality. It always ignoressome details (in our example, we ignore long-term scheduling) and is incapable ofdescribing other details (the service distributions at different stations may depend on theclass of the process). It is, however, a useful tool for performing analyses.Mathematical methods can produce information about a queueing network, such asthe expected length of each queue, the expected response time from entry to exit, and thepercentage of time that each server is busy. These results can sometimes be foundexactly by mathematical manipulations. Little’s result, for example, says that the numberof processes in a queue is equal to the arrival rate times the average wait time for thequeue. Sometimes results can only be approximated by numerical methods. This isespecially true for distributions other than the exponential distribution, scheduling policiesother than FCFS, and complex queuing networks.Once a model has been built and results have been derived, the next step is to validatethe model by comparing its predictions against reality. This step is easy if the modeldescribes an actual situation. It is harder if it describes a hypothetical situation. Forexample, before an installation decides to buy another tape drive, the managers mightundertake an analysis of the expected improvement in throughput with that drive. First amodel would be built of the current installation, and that model would be validated.Then the model would be modified to include the new tape drive. The managers wouldhave to trust the validity of the new model in order to use its predictions.There are cases where analysis is inadequate, such as when the models become socomplex that analytic methods fail or when queuing networks do not adequately describethe situation. In these cases, simulation may be used. Simulation involves tracking alarge number of processes through a model (such as a queueing network) and collectingstatistics. Whenever a probabilistic choice must be made, such as when the next arrivalshould occur or which branch a process takes, a pseudo-random number is generatedwith the correct distribution. It is also possible to drive the simulation with traces of realsystems to match reality better. We saw the results of simulations in Figures 2.4 and 2.6,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!