GATE - 2014 | OS | Assume that there are 3 page frames which are initially empty. If the page

GATE - 2014 | OS | Assume that there are 3 page frames which are initially empty. If the page
Posted on 11-02-2022

GATE - 2014 [Operating System]

Question:

Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.

A

7

B

8

C

9

D

10

      

Solution:

Option (A) is Correct.

In the optimal page replacement policy, we replace the place which is not used for the longest duration in the future.

Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.
Total 7 faults are there.

Thank You