Assume that in a certain computer, the virtual addresses are 64 bits long and…

2019

Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?

  1. A.

    16 x 210

  2. B.

    256 x 210

  3. C.

    4 x 220

  4. D.

    8 x 220

Attempted by 82 students.

Show answer & explanation

Correct answer: B

Given:

  • Virtual address = 64 bits

  • Physical address = 48 bits

  • Word addressable memory

  • Page size = 8 KB = 8 × 2¹⁰ bytes = 2¹³ bytes

  • Word size = 4 bytes

  • TLB has 128 entries

Step 1: Find number of words per page
Each page = 8 KB = 2¹³ bytes
Each word = 4 bytes = 2² bytes
So,
Number of words per page = 2¹³ / 2² = 2¹¹ words per page

That means the page offset = 11 bits (since each word is uniquely addressed).

Step 2: Pages that TLB can hold
TLB entries = 128 = 2⁷
So TLB can translate 2⁷ virtual pages at once.

Step 3: Total distinct virtual addresses
Each page = 2¹¹ addresses
Total addresses = 2⁷ × 2¹¹ = 2¹⁸ addresses

= 256 × 2¹⁰ addresses

Final Answer:
Maximum number of distinct virtual addresses = 256 × 2¹⁰ (Option B)

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir