In Second chance Page replacement algorithm(clock algorithm), if all the Reference bits are set to one, then the algorithm behaves just as FIFO.

Considering this case, can we conclude that Second chance algorithm also suffers from Belady's anomaly?

  • $\begingroup$ Second- chance replacement degenerates to FIFO replacement if all bits are SET. $\endgroup$ – SanketSSJ5 Dec 23 '15 at 14:02

This is not true. This is only a special case in once instance of 2nd chance algorithm. All reference bits set to one does not persist for each page that tested for a page replacement. Since LRU does not suffer from Belady's anomaly, and since 2nd chance is an approximation to LRU, then it follows that 2nd chance does not suffer from Belady's anomaly.

  • $\begingroup$ What is not true? What is only a special case? $\endgroup$ – David Richerby Nov 24 '14 at 8:40
  • $\begingroup$ As per this book, > The 2nd chance algorithm is a FIFO based algorithm. Hence, if a case arises where all the reference-bits are set to 1, the 2nd chance algorithm will work just like FIFO and FIFO suffers from Belady's anomaly. $\endgroup$ – Prabhakar Nov 25 '14 at 9:34
  • $\begingroup$ Hence, 2nd chance algorithm must also suffer from Belady's anomaly. $\endgroup$ – Prabhakar Nov 25 '14 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.