Question

Assume that for a certain processor, a read request takes 50 nanoseconds on a cache miss and 5 nanoseconds on a cache hit. Suppose while running a program, it was observed that 80% of the processor's read requests result in a cache hit. The average read access time in nanoseconds is _____.

Official answer and solution
Official answer
14
From
Official GATE 2015 answer key

Solution

Apply the Average Memory Access Time (AMAT) formula: Tavg=h⋅Thit+(1−h)⋅TmissT_{\text{avg}} = h \cdot T_{\text{hit}} + (1 - h) \cdot T_{\text{miss}}.

Parameters given:

  • Hit time Thit=5 nsT_{\text{hit}} = 5\text{ ns}
  • Miss time Tmiss=50 nsT_{\text{miss}} = 50\text{ ns}
  • Hit ratio h=80%=0.80h = 80\% = 0.80
  • Miss ratio 1−h=20%=0.201 - h = 20\% = 0.20

Compute the average access time:

Tavg=h⋅Thit+(1−h)⋅TmissT_{\text{avg}} = h \cdot T_{\text{hit}} + (1 - h) \cdot T_{\text{miss}}
Tavg=(0.80×5 ns)+(0.20×50 ns)T_{\text{avg}} = (0.80 \times 5\text{ ns}) + (0.20 \times 50\text{ ns})
Tavg=4 ns+10 ns=14 ns.T_{\text{avg}} = 4\text{ ns} + 10\text{ ns} = 14\text{ ns}.
Final answer

14

Common trap

Adding the hit time to the miss time when miss time is already specified as the total access latency on a miss.

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

Source

Paper
GATE 2015 Computer Science and Information Technology (CS) Session 2
Question
34 of 65, printed as CS Q.24
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.