A computer system implements a 40-bit virtual address, page size of 8…

2015

A computer system implements a 40-bit virtual address, page size of 8 kilobytes, and a 128-entry translation look-aside buffer (TLB) organized into 32 sets each having four ways. Assume that the TLB tag does not store any process id. The
minimum length of the TLB tag in bits is _________

Attempted by 100 students.

Show answer & explanation

Correct answer: 22

Answer: 22 bits

Explanation:

  • Page size = 8 KB = 2^13, so the page offset requires 13 bits.

  • Virtual address is 40 bits, so the virtual page number (VPN) is 40 - 13 = 27 bits.

  • TLB has 32 sets, so the set index needs log2(32) = 5 bits.

  • The TLB tag stores the remaining VPN bits after removing the set index: 27 - 5 = 22 bits.

  • Since the tag does not include any process id bits, no additional bits are added.

Therefore the minimum TLB tag length is 22 bits.

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

Explore the full course: Gate Guidance By Sanchit Sir