CS FundamentalsModerateGATE CS · Product-company placement

A TLB has 64 entries. A program randomly touches a 100 MB data set. What is the TLB reach with 4 KB pages and with 2 MB huge pages, and what follows?

  1. A. 256 KB and 128 MB; with huge pages the whole data set fits in the TLB's reach
  2. B. 64 KB and 64 MB; neither covers the data
  3. C. 256 MB and 128 GB; both cover it
  4. D. 4 KB and 2 MB; huge pages make no difference

Correct answer: A. 256 KB and 128 MB; with huge pages the whole data set fits in the TLB's reach

Reach = entries × page size: 64 × 4 KB = 256 KB, far below 100 MB, so random access misses constantly; 64 × 2 MB = 128 MB covers the whole set. This is why databases and JVMs use huge pages.

More Operating Systems questions

Exams that ask this topic