GATE - 2010 | OS | A system uses FIFO policy for page replacement. It has 4 page frames with

GATE - 2010 | OS | A system uses FIFO policy for page replacement. It has 4 page frames with
Posted on 13-02-2022

GATE - 2010 [Operating System]

Question:

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

   

Solution:

Option (A) is Correct.

The first 100 accesses cause 100-page faults.
Page 1 …….. Page 100 causes 100 faults.
Now, when they are accessed in reverse order pages 100, 99, 98, 97 are already present. So we get 96-page faults. So, a total of 196-page faults.

Thank You

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh