Question
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 _____.
Official answer and solution
- Official answer
- 22
- From
- Official GATE 2015 answer key
Solution
Decompose the virtual address into Page Offset, TLB Set Index, and TLB Tag fields.
- Virtual Address breakdown:
- Total virtual address size = 40 bits.
- Page size = .
- Page offset field = 13 bits.
- Virtual Page Number (VPN) = bits.
- TLB organization:
- Total entries = 128.
- Ways per set = 4.
- Number of sets = sets.
- Set index field = bits.
- TLB Tag length:
The TLB set index is selected from the Virtual Page Number. The remaining bits form the TLB tag:
22
Subtracting the set index from the entire 40-bit virtual address instead of the 27-bit Virtual Page Number.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 2
- Question
- 35 of 65, printed as CS Q.25
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.