Operating Systems: The following page table is for a system with 16-bit virtual
ID: 3840911 • Letter: O
Question
Operating Systems:
The following page table is for a system with 16-bit virtual and physical addresses and with 4,096-byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread zeroes out all values of the reference bit. A dash for a page frame indicates the page is not in memory. The page replacement algorithm is localized LRU, and all numbers are provided in decimal.
A.) Convert the following virtual addresses (in hexadecimal) to the equivalent physical addresses. Provide answers in hexadecimal. Also set the reference bit for the appropriate entry in the page table.
0xF12C
0x5A9D
0xB9D9
0x6001
0x9CA1
B.) Using the above addresses as a guide, provide an example of a logical address (in hexadecimal) that results in a page fault.
C.)From what set of page frames will the LRU page-replacement algorithm choose in resolving a page fault?
Page Page Frame Reference Bit 1 0 22 14 0 3 10 0 5 13 0 6 8 0 7 15 0 9 0 0 5 0 10 11 4 0 0 12 0 13 3 0 14 15Explanation / Answer
Answer
a.
The conversion from virtual addresses (in hexadecimal) to the equivalent physical addresses(in hexadecimal) is as below:
0xF12C -> 0x212C (F gives Page Frame 2)
0x5A9D -> 0xDA9D (5 give Page Frame 13 which is D in hexadecimal)
0xB9D9 -> 0x49D9 (B is 11 which gives Page Frame 4)
0x6001 -> 0x8001 (6 gives page frame 8)
0x9CA1 -> 0x0CA1 (9 gives page frame 0)
b.
As per the given table only the pages 4, 8, 12, and 13 does not have page prames, so any logical address refering to these pages will cause a page fault. Therefore, examples of such logical addresses include those that begins with the hexadecimal sequence 0x4..., 0x8..., 0xC..., and 0xD... .
c.
The LRU page replacement algorithm will choose from those page table entries that have a reference bit of zero in order to resolve a page fault. In the given case the following frames 9, 1, 14, 13, 8, 0 and 4 are the options available.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.