Question:

A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is:

Show Hint

To calculate the size of the TLB tag, subtract the bits used for the page offset and set index from the total address size.
Updated On: Oct 18, 2025
  • 13 bits
  • 20 bits
  • 11 bits
  • 15 bits
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Understand the problem.
Given: - The CPU generates 32-bit virtual addresses. - The page size is 4 KB (which is \( 2^{12} \) bytes). - The TLB holds 128 entries and is 4-way set associative.

Step 2: Calculate the number of bits required for the page offset.
Since the page size is 4 KB, the number of bits needed for the page offset is: \[ \text{Page offset bits} = \log_2(4 \, \text{KB}) = 12 \, \text{bits}. \]

Step 3: Calculate the number of sets in the TLB.
The TLB is 4-way set associative and can hold 128 entries, so the number of sets in the TLB is: \[ \text{Number of sets} = \frac{128}{4} = 32 \, \text{sets}. \] The number of bits required to index the sets is: \[ \text{Set index bits} = \log_2(32) = 5 \, \text{bits}. \]

Step 4: Calculate the number of bits for the tag.
The total address length is 32 bits, and we have already used 12 bits for the page offset and 5 bits for the set index. Thus, the remaining bits are for the tag: \[ \text{Tag bits} = 32 - 12 - 5 = 15 \, \text{bits}. \]

Step 5: Conclusion.
Thus, the minimum size of the TLB tag is 15 bits, and the correct answer is (d).

Was this answer helpful?
0
0

Top Questions on Computer Architecture

View More Questions