Skip to content

GATE CS 1995 Q2.25 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI

A computer system has a 4 K4 \ K word cache organized in block-set-associative manner with 44 blocks per set, 6464 words per block. The number of bits in the SET and WORD fields of the main memory address format is:

Choose one option
View worked solution

Answer: D

To find the number of bits in the SET and WORD fields of the main memory address format, we can analyze the cache parameters step-by-step:

  1. WORD Field:

    The block size is given as 6464 words.

    Number of bits for WORD field=log⁡2(Block size)=log⁡2(64)=6 bits\text{Number of bits for WORD field} = \log_2(\text{Block size}) = \log_2(64) = 6 \text{ bits}

  2. Total Cache Blocks:

    The total cache size is 4 K4\text{ K} words (4×1024=40964 \times 1024 = 4096 words).

    Total blocks in cache=Cache sizeBlock size=409664=64 blocks\text{Total blocks in cache} = \frac{\text{Cache size}}{\text{Block size}} = \frac{4096}{64} = 64 \text{ blocks}

  3. SET Field:

    The cache is 44-way set-associative, meaning there are 44 blocks per set.

    Number of sets=Total blocksBlocks per set=644=16 sets\text{Number of sets} = \frac{\text{Total blocks}}{\text{Blocks per set}} = \frac{64}{4} = 16 \text{ sets}

    Number of bits for SET field=log⁡2(Number of sets)=log⁡2(16)=4 bits\text{Number of bits for SET field} = \log_2(\text{Number of sets}) = \log_2(16) = 4 \text{ bits}

Thus, the number of bits in the SET and WORD fields are 44 and 66 respectively.

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