A certain computer system has the segmented paging architecture for vi...
Given information:
- Virtual address space size: 216 bytes
- Physical address space size: 216 bytes
- Virtual address space is divided into 8 non-overlapping equal size segments
- Memory management unit (MMU) has a hardware segment table
- Each entry in the segment table contains the physical address of the page table for the segment
- Page table is stored in main memory
- Each page table entry has 2 bytes
- Each page table entry contains: 1 valid bit, 3 bits for page protection, and 1 dirty bit
- Page size: 512 bytes
To find: Number of bits available in a page table entry for storing the aging information for the page.
Solution:
Step 1: Calculate the size of each segment
Since the virtual address space is divided into 8 equal size segments, each segment will have a size of 216 / 8 = 213 bytes.
Step 2: Calculate the number of pages in each segment
Page size is given as 512 bytes. So, each segment will have 213 / 512 = 211 pages.
Step 3: Calculate the number of bits required to address each page in a segment
Since each segment has 211 pages, we need log2(211) bits to address each page in a segment. Assuming integer division, log2(211) = 11 bits.
Step 4: Calculate the number of bits used by the page table entry
Each page table entry is 2 bytes in size. Since 1 bit is used for the valid bit, 3 bits are used for page protection, and 1 bit is used for the dirty bit, the remaining bits can be used for storing the aging information.
Total bits used by a page table entry = 2 bytes * 8 bits per byte = 16 bits
Bits used for valid bit + bits used for page protection + bits used for dirty bit = 1 + 3 + 1 = 5 bits
Bits available for aging information = Total bits used by a page table entry - Bits used for valid, page protection, and dirty bits = 16 - 5 = 11 bits
Step 5: Calculate the number of bits available for storing aging information for a page
Since each segment has 211 pages and each page can store aging information in the page table entry, the number of bits available for storing aging information for a page = Bits available for aging information / Number of pages in a segment = 11 bits / 211 pages = 0.0521 bits
Rounded to the nearest whole number, the number of bits available for storing aging information for a page is 0 bits.
Answer: The correct answer is 0 bits.
A certain computer system has the segmented paging architecture for vi...
Let x bits required for storing the aging information for the page.
Physical address space = 216 Bytes
Page Size = 512 bytes = 29 bytes
216/29 = 27
7 bits are required for frame.
Page table entry = 16 bits
x + 7 + 1 + 3 + 1 = 16
x = 16 - 12 = 4 bits