in Operating System
375 views
0 votes
0 votes

Only "Second chance" is mentioned then how can I know whether it is "FIFO 2nd chance" or "LRU 2nd chance" algorithm ?

in Operating System
375 views

1 Answer

2 votes
2 votes
Best answer

The second Chance algorithm is generally a modified version of FIFO. It works just like FIFO, with a slight difference. Instead of swapping out at first go, we look for the status of referenced/use bit. 

  • If the reference bit is set - > clear the bit but do not swap out the page.
  • If the reference bit isn't set - > swap that page with the new page.
  • This swapping happens just like the FIFO method. So Belady's Anomaly can also happen here.
selected by

Related questions