CS FundamentalsVery hardGATE CS (PYQ pattern)

A query scans a table of 11 pages sequentially, 5 times in a row, with a buffer pool of 10 pages (initially empty). How many buffer hits do LRU and MRU replacement give (in that order)?

  1. A. 0 and 40
  2. B. 40 and 0
  3. C. 0 and 10
  4. D. 40 and 40

Correct answer: A. 0 and 40

LRU evicts exactly the page needed next on a cyclic scan larger than the buffer ('sequential flooding'), so every access misses and there are 0 hits. MRU keeps 9 or 10 pages resident and gets many hits on later scans.

More DBMS and SQL questions

Exams that ask this topic