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.

90 Space Management Chapter 3Page table for process BVirtual page number Page frame0 2 1 absent 2 8Number of pages = 3Translation look-aside buffer (A is active)virtual page number page frame1 83 4Main Store0 1 2 3 4 5 6 7 8 9B(0) A(3) A(0) A(1)B(2)TranslationsVirtual address Physical address71 cache miss, invalid page trap14 8423 cache miss, page fault 06 76 (cache miss)6.2 Security and sharingThe same security scheme that we saw for segmentation can be applied to paging. Pagetable entries may specify permissible access independently for each virtual page.Because each page has separate permissions, different items that require different accessrestrictions, such as instructions and data, should not reside on the same page. Sharinginstructions between processes also requires that data be separated, or else some datamay be inadvertently shared, a situation that could confuse both processes. However,because the process does not involve itself in the concept of pages, separating instructionsfrom data on separate pages is not natural to the process. Still, compilers andassemblers can distinguish instructions from data and can pass this information on to thelinker. The linker, in turn, can segregate regions that require separate access restrictionsand can make sure that each starts on a new page. (This practice increases the amount of

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

Saved successfully!

Ooh no, something went wrong!