To Implement Page Replacement Algorithms

Post Test

1. The page replacement algorithm which gives the lowest page fault rate is

a) LRU
b) FIFO
c) Optimal page replacement
d) Second chance algorithm

2. For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1.
How many page faults does the LRU page replacement algorithm produce?

a) 10
b) 15
c) 11
d) 12

3. Consider the virtual page reference string 1, 2, 3, 2, 4, 1, 3, 2, 4, 1 On a demand paged virtual memory system running on a computer system that main memory size of 3 pages frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacements policy. Then

a) OPTIMAL < LRU < FIFO
b) OPTIMAL < FIFO < LRU
c) OPTIMAL = LRU
d) OPTIMAL = FIFO

4. Page fault occurs when

a) When a requested page is in memory
b) When a requested page is not in memory
c) When a page is corrupted
d) When an exception is thrown

5. A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 100 distinct pages in some order and then accesses the same 100 pages but now in the reverse order. How many page faults will occur?

a) 196
b) 192
c) 197
d) 195