A job has four pages A, B, C, D and the main memory has two page frames only.…
2013
A job has four pages A, B, C, D and the main memory has two page frames only. The job needs to process its pages in following order ABACABDBACD. Assuming that a page interrupt occurs when a new page is brought in the main memory, irrespective of whether the page is swapped out or not. The number of page interrupts in FIFO and LRU page replacement algorithms are
- A.
9 and 7
- B.
7 and 6
- C.
9 and 8
- D.
8 and 6
Attempted by 7 students.
Show answer & explanation
Correct answer: C
FIFO replacement yields 9 interrupts as pages A, B, C, A, B, D, B, C, D cause faults.
LRU replacement yields 8 interrupts because page A is retained longer due to recency rules.
A video solution is available for this question — log in and enroll to watch it.
Loading lesson…