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.

Perspective 117processesservice callpagefaultkernelenvelopeschedulerstorage managerdisk driverclockinterruptdevicesdiskinterruptFigure 3.23 Structure of the kernelmust be swapped out to make room for the page that this process needs. It asks the diskdriver to perform this work by placing a request in the disk queue. Meanwhile, it placesthe process that suffered the page fault in a main-store wait list and lets the schedulerswitch to another process.The disk driver accepts interrupts that tell it that work has been completed. (Wediscuss device drivers in Chapter 5.) Once the disk driver has swapped out the page, itcan tell the storage manager, which might then request that a new page be swapped in.After that page has been swapped in, the storage manager can place the long-sufferingprocess back in the ready list.The envelope module shown in Figure 3.23 runs when no other manager has workto do. It performs the actual switch back to the process. If the process generates a servicecall, the envelope is the first part of the kernel to notice. The envelope can eithersatisfy the call itself (for simple requests, like returning the current time of day) or passthe request on to other parts of the kernel.We began our discussion of virtual store by invoking the Beautification Principle.Each level of hardware and software hides lower levels and introduces new structures.At the bottom, physical store is arranged as a large array of words, each with a fixednumber of bits. Address-translation hardware groups these words into pages and introducesaddress-translation tables. The paging storage manager erases page boundariesand hides the tables, providing a linear array of words whose length is independent of the

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

Saved successfully!

Ooh no, something went wrong!