GATE / CS ARCHIVE

GATE CSE 2019 / QUESTION 33

Virtual address coverage of a TLB

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2019 paper

GATE 2019, Q33 2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 33, GATE 2019: A word-addressable machine has 64-bit virtual addresses, 48-bit physical addresses, 8 kB pages, 4-byte words, and 128 valid TLB entries. Find the maximum distinct virtual word addresses translatable without a TLB miss: A 16×2^10, B 256×2^10, C 4×2^20, D 8×2^20.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. One TLB entry caches the translation for an entire virtual page, not just one word. Every offset within a cached page can use that same entry.
2. Using the intended binary memory units, a page contains 8×1024=8192 bytes. Since an address identifies a four-byte word, the number of addressable words per page is 8192/4=2048=211.
3. To maximize coverage, let the 128=27 valid entries represent different virtual pages. The number of distinct covered word addresses is 27×211=218=262144.
4. Rewriting 262144 as 256×210 identifies option B. The cached byte span would be 1 MiB, but reporting that number of addresses would ignore word addressability.
5. The 64-bit and 48-bit widths bound the larger virtual and physical spaces; they do not change the number of offsets covered by these 128 page translations.

Original paper, page 11 · Answer key