13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

32 Time Management Chapter 2Unfortunately, no policy is truly fair. <strong>An</strong>y improvements in performance for oneclass of processes is at the expense of degraded performance for some other class. Wewill therefore examine how policies treat a wide range of classes. For each policy, wewill first show its behavior for a simple set of processes:Process name Arrival time Service requiredA 0 3 B 1 5 C 3 2 D 9 5 E 12 5This set depicted in Figure 2.3.3C5161217BE03914AD05101520Figure 2.3 Processes requiring serviceThe time units are not important; if we like, we can imagine they are seconds. Weassume that the arrival time and service time required are whole numbers of whateverunit we have picked.Second, we will compare scheduling policies by simulating them for a largenumber of arrivals. Figure 2.4 shows the penalty ratio for many of the policies we willstudy as a function of time required. This figure is based on a simulation of 50,000processes. Service times were randomly drawn from an exponential distribution withβ=1.0, and arrival rates were similarly drawn from an exponential distribution withα=0.8. The saturation level was therefore ρ=0.8. Statistics were gathered on each processexcept for the first 100 to finish in order to measure the steady state, which is thebehavior of a system once initial fluctuations have disappeared. Processes were categorizedinto 100 service-time percentiles, each of which had about 500 processes. The averagepenalty ratio for each percentile is graphed in the figure. The lines in the graph havebeen smoothed slightly (simulation results are somewhat bumpy).The average service time needed by processes in each percentile is shown in Figure2.5. Figure 2.6 shows the missed time for each percentile under the various methods.

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

Saved successfully!

Ooh no, something went wrong!