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.

Fixed partitions 692.2 OverlaysIf a process is restricted to a partition that is too small, the overlay software techniquecan help it, although the operating system won’t provide much assistance. Figure 3.5shows process A trying to cram into a small partition that starts at 20K and runs for 8K.The first 8K of A are placed at locations 20K to 28K; the last 5K are placed at 23K to28K, overlapping some of the first part.This cramming is a private affair of process A, which has created a new level ofaddress translation by using the same region of virtual store for different purposes at differenttimes. We will call this new level of virtualization the ‘‘pseudo-store.’’ A’s virtualstore has length of only 8K, but its pseudo-store has length 13K.The process divides its pseudo-store into regions called overlays. Each overlaycan fit into virtual space by itself. In fact, several overlays may be able to fit at the sametime into virtual space. The process assigns each overlay a fixed place in virtual store.This region may overlap with the region given to some other overlay. At any given timeduring execution, some overlays are present and others are in backing store. The onesthat are present do not overlap.Whenever an access is made to an area in pseudo-store, either the overlay it needsis currently in virtual store, in which case the access is performed easily, or it is not. Inthe latter case, the process undertakes the necessary transput to remove the overlay oroverlays that occupy the place where the desired one needs to reside and then to bring therequired overlay into that position.The hardware does not support overlays. Checking every reference would beunacceptably slow in software. Therefore, only procedure calls are allowed to requirenew overlays. Procedure invocation and return are therefore more expensive than they20K33K36K46Kprocess Aprocess B02028365264Kkernelproc Aprocess Bphysical main storekernel019KFigure 3.5 Overlays with partitions

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

Saved successfully!

Ooh no, something went wrong!