# When is it best to use the second chance replacement algorithm?

I'm going through 'Operating Concepts' by Silberschatz, Galvin and Gagne (The Dinosaur Book) and it mentions the Second-Chance Algorithm (not enhanced) as an improvement on the FIFO replacement algorithm.

My question is, is there ever a case where this algorithm would perform better than, say, the Least Recently Used algorithm or even something like the Farthest-in-Future Algorithm? The book describes how the algorithm works but doesn't offer a lot of information on when it would be useful, other than just in improving 'FIFO'.

To add to this, is there ever a case where 'second chance' would out preform LRU? I'm assuming the answer is yes, as no algorithm is perfect for every situation.

• (What does the book state about Farthest-in-Future?) Try to construct examples where one algorithm performs better than the other. If you don't succeed, present how far you got and where/why/how you see yourself stuck. May 2 '20 at 18:35
• That's partially what brought up the question. I've been running comparisons on SCR and LRU and haven't been able to find a case where SCR preforms better but have found many where FIFO outperforms LRU, even though SCR is an optimization of FIFO. May 2 '20 at 19:34