A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor…
2016
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:
- A.
11 bits
- B.
13 bits
- C.
15 bits
- D.
20 bits
Attempted by 93 students.
Show answer & explanation
Correct answer: C
The virtual address is 32 bits and page size is 4 KB (2^12 bytes), so the offset requires 12 bits. This leaves 32 - 12 = 20 bits for the virtual page number. The TLB has 128 entries with 4-way associativity, resulting in 128 / 4 = 32 sets. The index requires log2(32) = 5 bits. Therefore, the TLB tag size is 20 - 5 = 15 bits.
A video solution is available for this question — log in and enroll to watch it.