13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

92 Space Management Chapter 3the page frame that holds this pagea Boolean Present field (if false, this page is swapped out)We are ignoring fields used for page-replacement algorithms, such as a Dirty and a Usedfield for each page-table entry.Each such entry fits within one word, and a page table has at most 256 entries, sofour complete page tables can be stored within a single page frame. We will assume thatonly one page table is stored in a page frame, so a page-frame number is enough todescribe the location of a page table. Here is a formal description of the data structuresand the address translation algorithm:1 const2 BitsPerVirtualAddress = 36;3 BitsPerPhysicalAddress = 24;4 BitsPerSegmentAddress = 18;5 BitsPerVirtualPageAddress = 8;6 BitsPerOffsetAddress = 10;7 PageSize = 1024 = 2 10 ; { words per page }8 PageLimit = 256 = 2 8 ; { pages per segment }9 NumberOfPageFrames = 2 14 ; { page frames per physical store }10 SegmentLimit = 2 18 ; { segments per virtual space }11 type12 PageFrameNumber = 0 .. NumberOfPageFrames − 1;13 AccessType = (Read, Write, Execute, Stack);14 SegmentTableEntry =15 record { fits in one word }16 PageTablePointer : PageFrameNumber;17 Size : 1 .. 256; { number of pages }18 Permissions : set of AccessType;19 Present : Boolean;20 end;21 PageTableEntry =22 record { fits in one word }23 Location : PageFrameNumber;24 Present : Boolean;25 end;26 var27 DescriptorBaseRegister : SegmentTableEntry; { in hardware }

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

Saved successfully!

Ooh no, something went wrong!