Please work out the problem. Thank you. On a simple paging system with 224bytes
ID: 3866311 • Letter: P
Question
Please work out the problem. Thank you.
On a simple paging system with 224bytes of physical memory, 256 pages of logical address space, and a page size of 210bytes,
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
Answer for the given Question:
Given Data as given problem statement.
224bytes of physical memory, i think it is 2^24
256 pages of logical address space = 256 = 2^8,
page size of 210bytes, i think it is = 2^10
a.how many bits are in a logical address?
Page size 2^10 bytes
So, Total logical address space = 2^8 * 2^ 10 = 2^18
So total 18 bit's are needed.
b.how many bytes are in a page frame?
It is same as Page size i.e 2^10
c.how many bits in the physical address specify the page frame?
The number of frames in main memory is (2^24 bytes of main memory)/(2^10 bytes/frame) = 2^14 frames. So 14 bits is needed to specify the frame.
d.how many entries are in the page table (how long is the page table)?
There is one entry for each page in the logical address space. Therefore there are 2^10 entries.
e.how many bits are needed to store all entry in the page table (how wide is the page table)?
In addition to the valid/invalid bit, 14 bits are needed to specify the frame location in main memory, for a total of 15 bits.