Skip to content
Official PYQ · 2015

GATE CS 2015 Set 2 Q25 — Memory Management and Virtual Memory

Explain with AI
A computer system implements a 40  -bit40\;\text{-bit} virtual address, page size of 8  kilobytes8\;\text{kilobytes}, and a 128-entry128\text{-entry} translation look-aside buffer (TLB)\text{(TLB)} organized into 3232 sets each having 44 ways. Assume that the TLB\text{TLB} tag does not store any process id. The minimum length of the TLB\text{TLB} tag in bits is ______.
View worked solution

Answer: 22

To find the minimum length of the TLB tag, we can analyze how the virtual address is split for TLB lookup.

1. Analyze the Virtual Address Structure

  • Virtual Address Size: 40 bits40\text{ bits}
  • Page Size: 8 KB=8×1024 bytes=213 bytes8\text{ KB} = 8 \times 1024\text{ bytes} = 2^{13}\text{ bytes}

The page offset requires log⁡2(213)=13 bits\log_2(2^{13}) = 13\text{ bits}.

Therefore, the size of the Virtual Page Number (VPN) is: VPN size=40 bits−13 bits=27 bits\text{VPN size} = 40\text{ bits} - 13\text{ bits} = 27\text{ bits}

2. Analyze the TLB Structure

  • Total TLB entries: 128128
  • Organization: 4-way4\text{-way} set-associative with 3232 sets (32×4=12832 \times 4 = 128 entries)

To select one of the 3232 sets, we need a set index. The number of index bits is: TLB Index bits=log⁡2(32)=5 bits\text{TLB Index bits} = \log_2(32) = 5\text{ bits}

3. Calculate the TLB Tag Length

During a TLB lookup, the Virtual Page Number (VPN) is split into the TLB Set Index and the TLB Tag:

VPN=TLB Tag+TLB Index\text{VPN} = \text{TLB Tag} + \text{TLB Index}

TLB Tag size=27 bits−5 bits=22 bits\text{TLB Tag size} = 27\text{ bits} - 5\text{ bits} = 22\text{ bits}

Thus, the minimum length of the TLB tag is 2222 bits.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Management and Virtual Memory questions