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.

24 Introduction Chapter 1(The trap at time 23 comes from the context-switch instruction executed by OS.) It emulatesinstructions for its client when traps occur at times 5, 14, 19, and 27.This example demonstrates the Level Principle: Each software level is just a datastructure as far as its supporting level is concerned. It also shows how a single privilegedinstruction in the compiler became two privileged instructions in OS (p and b), whichbecame four in V 2 (r, p, b, and b) and eight in V 1 . In general, the situation can be farworse. A single privileged instruction at one level might require many instructions at itssupporting level to emulate it.The virtualizing kernel can be complex, and the emulation of privileged instructionscan be slow. These drawbacks can be mitigated to some extent.Don’t try to emulate one device by another.Disallow some features, such as self-modifying channel programs. Of course, sucha design will compromise the purity of the virtual machine and will make it harderto transfer programs from bare machines to run under the virtual-machine operatingsystem.Provide some extra features so that processes won’t have to use as many privilegedinstructions. A certain amount of file support (discussed in Chapter 6) could help.This design makes it harder to transfer programs from the virtual-machine operatingsystem to a bare machine.Use special hardware to pass traps directly to the correct software level. The IBM370 has some hardware support for VM/ 370, for example.7 FURTHER READINGA number of other operating system textbooks are available. Brinch Hansen’s early text(1973) is especially good in its treatment of concurrency issues. <strong>An</strong>other early classicwas written by Madnick and Donovan (1972). The standard texts by Shaw (1974) andHabermann (1976) are full of useful details. Calingaert (1982) presents an overview of alarge number of subjects, whereas Turner (1986) shows a few essential subjects in somedepth. Excellent texts are by Deitel (1983) and by Peterson and Silberschatz (1985).Some advanced subjects can be found in a new book by Maekawa (1987). Beck’s bookon systems programming (1985) devotes an excellent chapter to operating systems.Recently, several books have appeared that cover both the theory of operating systemsand an annotated listing of a Unix-like kernel. These texts, including two by Comer(1984; 1987) and one by Tanenbaum (1987), are an excellent source of information aboutoperating systems and how to build them. Books describing the internals of particularoperating systems, such as the book on VMS by Kenah and Bate (1984), are often full offascinating detail.The distinction between mechanism and policy was championed by the Hydraoperating system (Levin et al., 1977). The Modula programming language that we use inexamples was defined by Wirth (1972). It is based on his earlier language Pascal (Jensenand Wirth, 1974). Virtual machines are discussed in a survey article by Goldberg (1974),

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

Saved successfully!

Ooh no, something went wrong!