Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a byte ad dressed memory system which has the following characteristics

ID: 3837078 • Letter: C

Question

Consider a byte ad dressed memory system which has the following characteristics: The virtual address is 32 bits long. The page size is 2K bytes long. The physical address is 30 bits long. Consider the mapping from a virtual address to the corresponding physical address. Each page table entry contains a '"valid" bit, a "dirty" bit, a disk address, and a frame number (the frame number is empty if the page is not in main memory.) Assume the disk address can be represented with the same number of bits as the frame number. Assume a page fault does not occur. Take 1K = 2^10, and 1 byte = 8 bits. (i) What is the size (width in bits) of the (virtual) page number used to look up the page table? And do these bits constitute the low-order or high-order bits of the virtual address? (ii) What is the size of the page offset? And do these bits constitute the low-order or high-order bits of the virtual address? (iii) What is the size of the frame number? And do these bits constitute the low-order or high-order bits of the physical address? (iv) What is the size of the frame offset? And do these bits constitute the low-order high-order bits of the physical address? (v) How many entries are there in the page table? (vi) What is the total size (in bits) of the page table?

Explanation / Answer

Virtual address is 32 bits
Physical address is 30 bits
Page Size is 2K = 2* 210  = 211 i.e 11 bits

1. We know that Virtual address is divided into Page Number and Offset
=> 32 - 11 = 21 bits is for the page number to look up in page table.

They are the Higher Order bits => Page Number + Offset

2.
Size of page offset is the size of page = 11 bits, they rpresents the lower order bits

3. We know that Physical address is divided into Frame Number and Offset
=> 30 - 11 = 19 bits is for the frame number

They are the Higher Order bits => frame Number + Offset

4. Size of frame offset is the size of page = 11 bits, they represents the lower order bits

5. Number of entries in the opage table = 2bits to represent page number
= > 221 is the number of enteries

6. Total size is = Number of entries * page size = > 221 * 211 = 232

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote