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 entires and is 4- way set associate. The minimum size of the TLB tag is
Explanation
1. Analyze the Virtual Address
-
Total Virtual Address size: 32 bits
-
Page Size: 4 KB=212 bytes
-
Page Offset: Since the page size is 212, the offset requires 12 bits.
-
Virtual Page Number (VPN):
VPN bits=Total Virtual Address bits−Page Offset bits
2. Analyze the TLB Structure
The TLB acts like a cache for the page table. Since it is 4-way set associative, we need to find how many sets exist to determine the Index bits.
-
Total TLB entries: 128
-
Associativity: 4-way (4 entries per set)
-
Number of Sets:
Number of Sets=AssociativityTotal Entries=4128=32 sets
-
TLB Index bits: Since there are 32 sets (25), we need 5 bits for the index.
3. Calculate the TLB Tag Size
The Virtual Page Number (VPN) is divided into the TLB Tag and the TLB Index.
Final Answer
The minimum size of the TLB tag is 15 bits.
Correct Option: (C) 15 bits