On a simple paging system with 2^18 bytes of physical memory, 64 pages of logica
ID: 3826971 • Letter: O
Question
On a simple paging system with 2^18 bytes of physical memory, 64 pages of logical address space, and a page size of 512 bytes:
a) How many bits are in a logical address?
b) How many bytes are in a page frame?
c) How many bits in the physical address specify the page frame?
d) How many entries are in the page table (how long is the page table)?
e) How many bits are needed to store all entry in the page table (how wide is the page table)?
Assume each page table entry contains a valid/invalid bit in addition to the page frame number.
Explanation / Answer
Ans: Physical: 218, Page size: 29 and Number of Pages: 26
a) That's the page address bits plus the number of pages bits. The upper portion of an address is the page number (6 bits), and the lower portion is the offset within that address (9 bits), so the whole address size is 15 bits (1015 bytes).
b) A frame is where a page can be mapped into memory, so a frame has to be the same size as a page - 29 bytes.
c) Well, you have 18 bits of physical address, and a frame is 29 big, so that leaves 9 of the bits (18-9) for the frame's base address.
d) The page table is the full list of pages, whether mapped or unmapped - so there are 26 entries in the page table, since there are 26 pages.
e) If each page maps to an entry in the page table, and that table is a list of the addresses at which the pages are mapped in physical memory, then each address in the table must be the size of answer (9 bits) plus one bit for the valid/invalid bit, so 10 bits.