# Does Second chance Page replacement algorithm suffer with Belady's anomaly?

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?

• Second- chance replacement degenerates to FIFO replacement if all bits are SET. – 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.

• What is not true? What is only a special case? – David Richerby Nov 24 '14 at 8:40
• 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. – Prabhakar Nov 25 '14 at 9:34
• Hence, 2nd chance algorithm must also suffer from Belady's anomaly. – Prabhakar Nov 25 '14 at 9:41