Question

A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. An optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to 15 ns, whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is _____________.

Official answer and solution
Official answer
0.85
From
Official GATE 2022 answer key

Solution

Set the new average memory access time to be less than or equal to the initial AMAT and solve for the new hit rate.

The initial average memory access time (AMAT) is:

AMAT1=t1+(1−h1)×m=10 ns+(1−0.8)×100 ns=10+20=30 ns\text{AMAT}_1 = t_1 + (1 - h_1) \times m = 10\text{ ns} + (1 - 0.8) \times 100\text{ ns} = 10 + 20 = 30\text{ ns}

After optimization, the access latency increases to t2=15 nst_2 = 15\text{ ns} while the miss penalty remains m=100 nsm = 100\text{ ns}. We require the new AMAT not to exceed 30 ns:

AMAT2=t2+(1−h2)×m≤30 ns\text{AMAT}_2 = t_2 + (1 - h_2) \times m \le 30\text{ ns}
15+(1−h2)×100≤3015 + (1 - h_2) \times 100 \le 30
(1−h2)×100≤15(1 - h_2) \times 100 \le 15
1−h2≤0.15  ⟹  h2≥0.851 - h_2 \le 0.15 \implies h_2 \ge 0.85

Thus, the minimum hit rate required after the optimization is 0.85.

Final answer

0.85

Common trap

Using the formula h×t+(1−h)×mh \times t + (1 - h) \times m without including the cache lookup time 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 2022 Computer Science and Information Technology (CS)
Question
33 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.