All mock tests are FREE till 31 December — register to save your progress

Consider a virtual page reference string 1, 2, 3, 2, 4, 2, 5, 2, 3, 4. Suppose LRU page replacement algorithm is implemented with 3 page frames in main memory. Then the number of page faults are_________.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. 7

Explanation

1, 2, 3 fault; 2 hit; 4 faults (evict 1); 2 hit; 5 faults (evict 3); 2 hit; 3 faults (evict 4); 4 faults (evict 5). Total 7.

More System Software and Operating System questions