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.

Further reading 53The quantum size should be large enough so that kernel time does not becomeexcessive. A process switch might cost about 100 microseconds, and other schedulingbookkeeping might occupy another 400 microseconds. If the quantum is 10 milliseconds,scheduling occupies about 5 percent of the time, which is a reasonable figure.Some policies are more expensive than others to implement. FCFS only requires aqueue for the ready list. FB requires a number of queues. WSN can require arbitrarilycomplex computation at every decision point. The implementer should try to balance thecost of making the decisions against the advantage that a particular strategy might yield.The complexity of the program itself is also worth minimizing. Simple programs aremore likely to be correct and are certainly easier to maintain.Many operating systems use a hybrid policy, with RR for short processes and someother method, possibly RR with a longer quantum and a lower priority, for longer ones.Space management, which we will discuss in the next chapter, affects scheduling.Processes that need a substantial amount of store are often given larger quanta so thatthey can get more work done while they are occupying main store.The recent introduction of personal computing casts a different light on timemanagement. It is not essential to keep the computer busy 100 percent of the time, evenif there is work available. It is more important to provide interactive processes with goodservice. For example, when an interactive process waits for transput, it might not beappropriate to switch to another process immediately. Instead, the scheduler might waitfor a while, letting the computer sit idle, in the hope that the interactive process will soonbecome runnable again and will not need to suffer a process switch before it can start.Similarly, an interactive process that enters a computationally intensive phase might stillbe considered interactive, and the scheduler might favor it instead of treating it as theequal of a background computational process. If all processes belong to the same user,the operating system does not have to live up to quite the same goal of fairness amongprocesses.4 FURTHER READINGThe material covered in this chapter can be treated in a much more formal fashion. Ifyou are interested in scheduling methods or in the extended area of performance modeling,analysis, and measurement, you may want to look at texts by Sauer and Chandy(1981), Lazowska and colleagues (1984), and Kleinrock (1976). Little’s result can befound in a journal article (1961). A set of articles by Denning and Stone (1980) discusseshow personal computers influence the way we look at scheduling and other aspects ofoperating systems. Shneiderman’s review article on human-computer interaction (1984)comes to the conclusion that users prefer a response time of shorter than a second formost tasks and that error rates increase as the response time becomes too long. The articleby Coffman and Kleinrock (1968) describes countermeasures to scheduling methods.CTSS, an early operating system that penalized large jobs and used a variant of FB, isdescribed by Corbato and colleagues (1962). The Utah Tenex scheduler is described inthe article by Ellison (1975).

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

Saved successfully!

Ooh no, something went wrong!