GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER ORGANIZATION & ARCHITECTURE

Partition virtual addresses for TLB tags

2 questions solved the same way, newest first. Back to Computer Organization & Architecture

How these are solved

Subtract page-offset and TLB-set-index widths from virtual-address width; page size, virtual width and set count differ. Neither adds process/ASID bits.

1 mark · NAT
Report issue

Memory Organization & Address Translation

Question 19, GATE 2015: Virtual addresses 40 bits, page size 8 KB, TLB128 entries arranged 32 sets×4 ways. No process ID in tag. Find minimum TLB tag width.
Tap to enlarge
Answer & solution

Official answer: 22

Step through it (6 steps)

An8 KiB page contributes 13 offset bits, leaving 27 virtual page-number bits. The 32 TLB sets use 5 index bits. Without a process identifier, the tag uses 27−5=22 bits.

Split the virtual address into tag, set index, and page offset. An8KiB page has 213 bytes, so 13 bits select the byte. The remaining 40−13=27 bits form the virtual page number. Thirty-two sets need log 2 32=5 index bits; the four ways do not consume address bits because their tags are compared associatively. The tag therefore needs 27−5=22 bits. No process-ID bits are added because the prompt excludes them.

Original paper, page 32 · Answer key

2 marks · MCQ
Report issue

Tag width of four-way TLB

Memory Organization & Address Translation

Question 62, GATE 2006: A CPU has 32-bit virtual addresses, 4 KB pages, and a 128-entry TLB that is four-way set associative. What is the minimum tag width, excluding any address-space identifier?
Options:
(A) 11 bits
(B) 13 bits
(C) 15 bits
(D) 20 bits
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step through it (6 steps)

1. A 4 KB page requires 12 offset bits, leaving 32−12=20 virtual-page-number bits. There are 128/4=32 TLB sets, requiring 5 index bits.

2. The minimum tag is the remaining 20−5=15 bits, option C. Additional address-space identifiers are not included in the stated minimum.

3. Teaching check: Partition the virtual address into offset, set index and tag. Page offsets require log₂4096=12 bits. Four-way associativity means only 128/4=32 sets, so five more bits select the set and the remaining fifteen distinguish pages within that set.

Original paper, page 9