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 _________
Official answer and solution
- Official answer
- 3
- From
- Official GATE 2024 answer key
Solution
Compute the average memory stall cycles per instruction from both I-cache and D-cache misses, add to the ideal CPI, and divide by the ideal CPI.
- Instruction cache stall cycles per instruction:
Every instruction () is fetched from the instruction cache: - Data cache stall cycles per instruction:
Only load/store instructions () access the data cache: - Effective CPI with cache misses:
- Speedup with a perfect cache:
3
Applying the 8% D-cache miss rate to all instructions instead of only the 25% load/store instructions.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
- Question
- 56 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.