Skip to content

GATE CS 2007 Q10 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI

Consider a 44-way set associative cache consisting of 128128 lines with a line size of 6464 words. The CPU generates a 20−bit20-bit address of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:

Choose one option
View worked solution

Answer: D

To determine the size of the TAG, LINE (Set Index), and WORD (Offset) fields, we analyze the structure of the 2020-bit physical address generated by the CPU:

Address Format: [ TAG (t bits)∣ LINE (s bits)∣ WORD (w bits)]\text{Address Format: } [\text{ TAG } (t \text{ bits}) \mid \text{ LINE } (s \text{ bits}) \mid \text{ WORD } (w \text{ bits})]

  1. WORD Field (ww):
    The block size (line size) is given as 6464 words. WORD bits (w)=log⁡2(64)=6 bits\text{WORD bits } (w) = \log_2(64) = 6 \text{ bits}
  2. LINE Field (ss):
    The cache is 44-way set associative and contains a total of 128128 lines. Number of Sets=Total LinesAssociativity=1284=32 sets\text{Number of Sets} = \frac{\text{Total Lines}}{\text{Associativity}} = \frac{128}{4} = 32 \text{ sets} LINE bits (s)=log⁡2(32)=5 bits\text{LINE bits } (s) = \log_2(32) = 5 \text{ bits}
  3. TAG Field (tt):
    The total address size is 2020 bits. TAG bits (t)=Total Address Bits−(s+w)\text{TAG bits } (t) = \text{Total Address Bits} - (s + w) t=20−(5+6)=9 bitst = 20 - (5 + 6) = 9 \text{ bits}

Thus, the number of bits in the TAG, LINE, and WORD fields are respectively 9,5,69, 5, 6.

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

Published
Report a correction
Keep exploringMore Memory Hierarchy: Cache, Main Memory and Secondary Storage questions