in Operating System recategorized by
3,974 views
2 votes
2 votes

Consider a main memory with three page frames for the following page reference string:

5, 4, 3, 2, 1, 4, 3, 5, 4, 3, 4, 1, 4

Assuming that the execution of process is initialized after loading page 5 in memory,, the number of page faults in FIFO and second chance replacement respectively are

  1. 8 and 9
  2. 10 and 11
  3. 7 and 9
  4. 9 and 8
in Operating System recategorized by
4.0k views

1 Answer

3 votes
3 votes

5, 4, 3, 2, 1, 4, 3, 5, 4, 3, 4, 1, 4  page frame are 3                     and  page 5 is already there so no page fault for 5

now execution starts 4 and 3 will come in with page fault no 1 and 2  

acc to FIFO page 2 ,1  will replace 5 and 4 and cause page fault no 3 and 4 and so on

9 w.r.to FIFO is only in choice D so it will be the ans 

3 Comments

edited by
Can u please also explain second chance replacement algorithm. I am getting 9 in both cases
0
0

in second chance if a page is referenced again while the page is present in memory then it is given a second chance(by increasing it reference bit to1 from 0) to stay in memory when its replacement turn comes 

P.S   start counting after 5 

0
0
Please explain it
0
0
Answer:

Related questions