The virtual address generated by a CPU is 32 bits. The Translation Look-aside…
2013
The virtual address generated by a CPU is 32 bits. The Translation Look-aside Buffer (TLB) can hold total 64 page table entries and a 4-way set associative (i.e. with 4- cache lines in the set). The page size is 4 KB. The minimum size of TLB tag is
- A.
12 bits
- B.
15 bits
- C.
16 bits
- D.
20 bits
Attempted by 120 students.
Show answer & explanation
Correct answer: C
Final answer: 16 bits
Step 1: Determine page offset.
Page size = 4 KB = 4096 bytes, so page offset = log2(4096) = 12 bits.
Step 2: Compute virtual page number (VPN) bits.
Virtual address = 32 bits, so VPN bits = 32 - 12 = 20 bits.
Step 3: Determine number of sets and set index bits in the TLB.
TLB entries = 64 and it is 4-way set-associative, so number of sets = 64 / 4 = 16. Set index bits = log2(16) = 4.
Step 4: Compute TLB tag bits.
TLB tag bits = VPN bits - set index bits = 20 - 4 = 16 bits.
Therefore, the minimum size of the TLB tag is 16 bits.
A video solution is available for this question — log in and enroll to watch it.