Skip to content
Official PYQ · 2025

GATE CS 2025 Set 2 Q45 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI
Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 11 nanosecond (ns) and the "hit rate" for L1 cache is 90%90 \% while the processor is accessing the data from L1 cache. Whereas, for the second level (L2) cache, the "hit rate" is 80%80 \% and the "miss penalty" for transferring data from L2 cache to L1 cache is 1010 ns . The "miss penalty" for the data to be transferred from main memory to L2 cache is 100100 ns .

Then the average memory access time in this system in nanoseconds is __________ . (rounded off to one decimal place)
View worked solution

Answer: 4:4

To find the average memory access time (AMAT), we analyze the hierarchical access penalty at each level of the cache hierarchy:

  • L1 Cache: Access time T1=1T_1 = 1 ns, Hit rate H1=0.90H_1 = 0.90, Miss rate M1=1−H1=0.10M_1 = 1 - H_1 = 0.10.
  • L2 Cache: Hit rate H2=0.80H_2 = 0.80, Miss rate M2=1−H2=0.20M_2 = 1 - H_2 = 0.20.

When an L1 miss occurs, the data must be retrieved from L2 or main memory:

  • If L2 hits (probability H2=0.80H_2 = 0.80), the transfer penalty from L2 to L1 is 1010 ns.
  • If L2 misses (probability M2=0.20M_2 = 0.20), the data is first transferred from main memory to L2 (penalty 100100 ns) and then from L2 to L1 (penalty 1010 ns). Thus, the total penalty is 100+10=110100 + 10 = 110 ns.

The average penalty for an L1 miss is calculated as:

Average L1 Miss Penalty=(H2×10)+(M2×110)=(0.80×10)+(0.20×110)=8+22=30 ns\text{Average L1 Miss Penalty} = (H_2 \times 10) + (M_2 \times 110) = (0.80 \times 10) + (0.20 \times 110) = 8 + 22 = 30\text{ ns}

Now, we compute the overall Average Memory Access Time (AMAT):

AMAT=T1+M1×(Average L1 Miss Penalty)=1+0.10×30=1+3=4 ns\text{AMAT} = T_1 + M_1 \times (\text{Average L1 Miss Penalty}) = 1 + 0.10 \times 30 = 1 + 3 = 4\text{ ns}

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