Skip to content
Official PYQ · 2014

GATE CS 2014 Set 2 Q9 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI
A 44-way set-associative cache memory unit with a capacity of 1616 KB is built using a block size of 88 words. The word length is 3232 bits. The size of the physical address space is 44 GB. The number of bits for the TAG field is ____
View worked solution

Answer: 20

To find the number of bits in the TAG field, we break down the physical address into three fields: TAG, Set Index, and Block Offset.

  1. Physical Address (PA) Size:
    Physical Address Space = 4 GB=232 bytes4\text{ GB} = 2^{32}\text{ bytes}.
    Therefore, the Physical Address length is 32 bits32\text{ bits}.
  2. Block Offset Bits:
    Word length = 32 bits=4 bytes32\text{ bits} = 4\text{ bytes}.
    Block size = 8 words=8×4 bytes=32 bytes=25 bytes8\text{ words} = 8 \times 4\text{ bytes} = 32\text{ bytes} = 2^5\text{ bytes}.
    Thus, Block Offset = 5 bits5\text{ bits}.
  3. Set Index Bits:
    Cache Capacity = 16 KB=214 bytes16\text{ KB} = 2^{14}\text{ bytes}.
    Number of blocks in the cache = Cache CapacityBlock Size=21425=29=512\frac{\text{Cache Capacity}}{\text{Block Size}} = \frac{2^{14}}{2^5} = 2^9 = 512 blocks.
    Since it is a 44-way set-associative cache, the number of sets is: Number of Sets=5124=128=27\text{Number of Sets} = \frac{512}{4} = 128 = 2^7 Thus, Set Index = 7 bits7\text{ bits}.
  4. Tag Bits: Tag Bits=Physical Address Size−(Set Index Bits+Block Offset Bits)\text{Tag Bits} = \text{Physical Address Size} - (\text{Set Index Bits} + \text{Block Offset Bits}) Tag Bits=32−(7+5)=20 bits\text{Tag Bits} = 32 - (7 + 5) = 20\text{ bits}

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