CS FundamentalsVery hardProduct company interview · GATE level

A TLB has 64 entries. With 4 KB pages, what is its reach (the memory it can map without a miss)? If 16 of the entries instead map 2 MB huge pages and the other 48 map 4 KB pages, what is the reach?

  1. A. 256 KB; 32,768 KB
  2. B. 256 KB; 32,960 KB
  3. C. 64 KB; 32,960 KB
  4. D. 256 KB; 131,072 KB

Correct answer: B. 256 KB; 32,960 KB

Reach = entries x page size. 64 x 4 KB = 256 KB. Mixed: 48 x 4 KB + 16 x 2048 KB = 192 + 32,768 = 32,960 KB, about 32 MB, over a hundred times more - which is why large working sets such as databases use huge pages. 32,768 KB forgets the 48 small-page entries, and 131,072 KB treats all 64 entries as 2 MB pages.

More Operating Systems questions

Exams that ask this topic