Skip to content

GATE CS 2020 Q21 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI
A direct mapped cache memory of 11 MB has a block size of 256256 bytes. The cache has an access time of 33 ns and a hit rate of 94%94 \%. During a cache miss, it takes 220 ns to bring the first word of a block from the main memory, while each subsequent word takes 55 ns. The word size is 6464 bits. The average memory access time in ns (round off to 11 decimal place) is______.
View worked solution

Answer: 13.3:13.3;13.5:13.5

To find the average memory access time, we first determine the number of words in a cache block and the total miss penalty.

1. Calculate the number of words per block:

  • Block size = 256256 bytes
  • Word size = 64 bits=8 bytes64\text{ bits} = 8\text{ bytes}
  • Number of words per block = 2568=32\frac{256}{8} = 32 words

2. Calculate the miss penalty (time to fetch a block):

  • Time for the 1st1^{\text{st}} word = 2020 ns
  • Time for the remaining 3131 words = 31×5=15531 \times 5 = 155 ns
  • Total miss penalty (TmissT_{\text{miss}}) = 20+155=17520 + 155 = 175 ns

3. Calculate the Average Memory Access Time (TavgT_{\text{avg}}):

Depending on how the cache and main memory are accessed, there are two standard interpretations:

  • Interpretation 1 (Hierarchical Access): Tavg=Tc+(1−H)×TmissT_{\text{avg}} = T_c + (1 - H) \times T_{\text{miss}} Tavg=3+0.06×175=3+10.5=13.5 nsT_{\text{avg}} = 3 + 0.06 \times 175 = 3 + 10.5 = 13.5\text{ ns}
  • Interpretation 2 (Simultaneous/Overlap Access): Tavg=H×Tc+(1−H)×TmissT_{\text{avg}} = H \times T_c + (1 - H) \times T_{\text{miss}} Tavg=0.94×3+0.06×175=2.82+10.5=13.32≈13.3 nsT_{\text{avg}} = 0.94 \times 3 + 0.06 \times 175 = 2.82 + 10.5 = 13.32 \approx 13.3\text{ ns}

Both 13.3 ns and 13.5 ns are accepted correct answers.

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