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.

Paging 85A process that wants to change the structure of its virtual store dynamically can usea variety of service calls: GetSegment(descriptor) / ReleaseSegment(segment). The first call returnsthe segment number of a newly allocated segment. The descriptor indicates thedesired size and permissions. The second call removes the given segment from thecaller’s segment table. GetStore(segment, size) / ReleaseStore(segment, size). These calls lengthenor shorten a segment. ChangeSegment(segment, permissions). This call lets the process add orremove Read, Write, and Execute permissions to or from its segment. The operatingsystem may disallow changing permissions on shared segments.6 PAGINGWe now turn to the most common storage management method in use. Paging has thesame hardware flavor as segmentation except that the problem of allocating physicalstore among different-sized segments is removed by insisting that each segment-likechunk be exactly the same length. We will call each such chunk a page. The virtualspace of a process is subdivided into as many pages as are needed, depending on itslength.We saw that segmentation supported software modularity by allowing a program’sname space to be partitioned. Paging, in constrast, partitions virtual space without regardto logical entities residing in that space. Paging is therefore transparent to the process.The fact that virtual space is subdivided into pages does not affect the way the process isprogrammed or the way it treats virtual space. Later, we will examine combinations thatincorporate the semantics of segmentation as well as the regularity of paging.Paging is a pleasant contrast to segmentation from the point of view of thestorage-manager implementer. Shuffling is eliminated because all free areas in physicalstore are one page-length long. A page may be placed in any such free area; there is noneed to treat adjacent free areas together as part of a larger free area. We will treat physicalstore as an array of bins into which pages may be placed; these bins are called pageframes:

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

Saved successfully!

Ooh no, something went wrong!