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.

Perspective 47latter figure rises linearly as the process runs and decreases exponentially as theprocess waits (whether because of short-term scheduling or other reasons). Theexponential decay depends on the current load (that is, the size of the ready list);if the load is higher, the central processing unit (cpu) usage figure decays moreslowly. Processes with higher recent cpu usage get lower priorities than thosewith lower recent cpu usage. The scheduler runs the process with the highestpriority in the ready list. If several processes have the same priority, they arescheduled in RR fashion.2.10 External priority methodsThese three methods adjust parameters on the basis of some external priority.(1) Use RR, but let the quantum depend on the external priority of the process. Thatis, allow larger quanta for processes run for a user willing to pay a premium forthis service.(2) The Worst Service Next (WSN) method is a generalization of many others.After each quantum, compute for each process how much it has suffered so far.Suffering is an arbitrarily complex figure arrived at by crediting the process forhow much it has had to wait, how many times it has been preempted, how muchits user is paying in premiums, and how urgent it is. The process is also debitedfor such items as the amount of time it has actually used and the other resourcesit has consumed (resources like space and access to secondary store). The processwith the greatest suffering is given the next quantum.(3) The user buys a response ratio guarantee. A suffering function is used that takesinto account only the difference between the guaranteed response ratio and theactual response ratio at the moment.3 PERSPECTIVEThis chapter has looked in some detail at a few scheduling policies and has given briefdescriptions of others. <strong>Operating</strong> systems seldom use any of the policies we have shownin a pure form. Short-term scheduling often merges with medium-term scheduling (inperiodic calculations of internal priorities, for example), and many operating systems usead hoc policies. These policies often have a number of tunable parameters that can beadjusted at each installation to fit its specific workload. Some sophisticated schedulerseven adjust their own parameters occasionally as the current load changes. The propersetting during the middle of the night may well be different from the setting during themiddle of the afternoon.

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

Saved successfully!

Ooh no, something went wrong!