Question

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

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

Official answer and solution
Official answer
4
From
Official GATE 2025 answer key

Solution

Apply the hierarchical Average Memory Access Time (AMAT) formula AMAT=TL1+(1−HL1)(ML2→L1+(1−HL2)MMem→L2)\text{AMAT} = T_{\text{L1}} + (1 - H_{\text{L1}})\left(M_{\text{L2}\rightarrow\text{L1}} + (1 - H_{\text{L2}}) M_{\text{Mem}\rightarrow\text{L2}}\right).

Given:

  • L1 access time TL1=1 nsT_{\text{L1}} = 1\text{ ns}, L1 hit rate HL1=0.90  ⟹  H_{\text{L1}} = 0.90 \implies L1 miss rate =1−0.90=0.10= 1 - 0.90 = 0.10.
  • L2 hit rate HL2=0.80  ⟹  H_{\text{L2}} = 0.80 \implies L2 miss rate =1−0.80=0.20= 1 - 0.80 = 0.20.
  • Miss penalty from L2 to L1 =10 ns= 10\text{ ns}.
  • Miss penalty from main memory to L2 =100 ns= 100\text{ ns}.

Therefore, the average memory access time is:

AMAT=1+0.10×(10+0.20×100)=1+0.10×(10+20)=1+3.0=4.0 ns\text{AMAT} = 1 + 0.10 \times \left(10 + 0.20 \times 100\right) = 1 + 0.10 \times (10 + 20) = 1 + 3.0 = 4.0\text{ ns}
Final answer

4.0

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
Question
55 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.