Question:

A given program has \( 25\% \) load/store instructions. Suppose the ideal CPI (cycles per instruction) without any memory stalls is 2. The program exhibits \( 2\% \) miss rate on instruction cache and \( 8\% \) miss rate on data cache. The miss penalty is \( 100 \) cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e., with NO data or instruction cache misses) is \_\_\_\_\_.

Updated On: Jan 22, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Calculate the effective CPI with cache misses. The total CPI is given by: \[ \text{CPI} = \text{Ideal CPI} + \text{Miss contribution}. \] For instruction cache: \[ \text{Instruction miss penalty} = 0.02 \times 100 = 2 \, \text{cycles}. \] For data cache (25\% load/store): \[ \text{Data miss penalty} = 0.25 \times 0.08 \times 100 = 2 \, \text{cycles}. \] Total CPI: \[ \text{CPI} = 2 + 2 + 2 = 6. \] Step 2: Compute speedup with a perfect cache. With no cache misses, the CPI reduces to \( 2 \). The speedup is: \[ \text{Speedup} = \frac{\text{CPI with cache misses}}{\text{CPI without cache misses}} = \frac{6}{2} = 3.00. \] Final Answer: \[ \boxed{3.00} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions