IAE Academy

GATE 2022 CS Q.33: solution and answer

GATE 2022 · CSQ.33 · 1 mark · NAT

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 ____.

See the question in the paper

Answer and solution

ANSWER

The minimum hit rate needed after optimization is 0.85.

Official answer: 0.85Source: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. Recall AMAT (Average Memory Access Time) formula: .

  2. Compute AMAT before optimization: .

  3. Let be the new (post-optimization) hit rate. Then .

  4. The optimization must not increase AMAT, so require : .

  5. Simplify: .

  6. Solve for : .

  7. Minimum hit rate needed = .

KEY IDEA

Average Memory Access Time (AMAT) = Hit time + Miss rate × Miss penalty. To keep AMAT unchanged after a latency increase, the miss rate (equivalently, hit rate) must improve enough to offset the added hit-time cost.

WATCH OUT FOR

Forgetting that AMAT uses (1 − hit rate) as the miss rate, or comparing the new access latency directly to the old AMAT instead of setting up the inequality AMAT_new ≤ AMAT_old and solving for h.

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 22 Memory & cache questions, with notes

More Memory & cache questions