GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A process maps 100 separate regions, each 1 MB + 4 KB long and each starting on a 2 MB boundary (1 MB = 1024 KB). With 4 KB pages, how many TLB entries are needed to map all regions at once? With 2 MB pages, how many entries are needed, and how much memory is lost to internal fragmentation?

  1. A. 25,700 entries; 100 entries with 102,000 KB wasted
  2. B. 25,600 entries; 100 entries with 102,400 KB wasted
  3. C. 25,700 entries; 200 entries with 307,600 KB wasted
  4. D. 25,700 entries; 51 entries with 1,000 KB wasted

Correct answer: A. 25,700 entries; 100 entries with 102,000 KB wasted

Each region is 1028 KB = 257 pages of 4 KB → 25,700 entries. A 2 MB page covers a whole region (1028 KB < 2048 KB), so 100 entries, each wasting 2048 − 1028 = 1020 KB → 102,000 KB. Forgetting the extra 4 KB gives 25,600 and 102,400; regions on separate 2 MB boundaries cannot share large pages.

More Computer Organization and Architecture questions

Exams that ask this topic