Question:

A CPU generates 32 bits 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

The size of the TLB tag is calculated by subtracting the offset and index bits from the total virtual address size.
Updated On: June 02, 2025
  • 11 bits
  • 15 bits
  • 13 bits
  • 20 bits
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

We are given the following parameters:
Virtual address size = 32 bits
Page size = 4 KB = \(2^{12}\) bytes
Number of entries in TLB = 128
The TLB is 4-way set associative.
Step 1: Calculate the number of bits for the offset.
The page size is 4 KB, so the offset will be 12 bits, because: \[ {Offset bits} = \log_2(4 \, {KB}) = 12 \, {bits}. \] Step 2: Calculate the number of bits for the TLB index.
The total number of entries in the TLB is 128, and it is 4-way set associative. The number of sets in the TLB is: \[ {Number of sets} = \frac{{Number of entries in TLB}}{{Associativity}} = \frac{128}{4} = 32. \] Thus, the number of bits for the index is: \[ {Index bits} = \log_2(32) = 5 \, {bits}. \] Step 3: Calculate the number of bits for the TLB tag.
The total number of bits for the virtual address is 32. The total number of bits used by the offset and the index is \(12 + 5 = 17\) bits. Therefore, the number of bits for the TLB tag is: \[ {Tag bits} = 32 - 17 = 15 \, {bits}. \] Thus, the correct answer is: \[ \boxed{15 \, {bits}}. \]
Was this answer helpful?
0
0

NIMCET Notification