GateAI
Cache Memory and Hierarchy

GATE CSE 2024 Set 1 · Q56

NAT2 marksMedium

Time

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\textit{rounded off to two decimal places}) achieved with a perfect cache (i.e., with NO data or instruction cache misses) is ______

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 3

Cache Memory and Hierarchy

To calculate the actual CPI with stalls:

  1. Instruction Cache Stalls:

    • Every instruction requires an instruction fetch (1 access per instruction).

    • Instruction miss rate =2%=0.02= 2\% = 0.02

    • Miss penalty =100 cycles= 100\text{ cycles}

    I-cache stall cycles per instruction=1×0.02×100=2 cycles\text{I-cache stall cycles per instruction} = 1 \times 0.02 \times 100 = 2\text{ cycles}
  2. Data Cache Stalls:

    • Load/store instructions make up 25%=0.2525\% = 0.25 of all instructions (0.25 data accesses per instruction).

    • Data miss rate =8%=0.08= 8\% = 0.08

    • Miss penalty =100 cycles= 100\text{ cycles}

    D-cache stall cycles per instruction=0.25×0.08×100=2 cycles\text{D-cache stall cycles per instruction} = 0.25 \times 0.08 \times 100 = 2\text{ cycles}
  3. Total Actual CPI:

    CPIactual=CPIideal+I-cache stalls+D-cache stalls=2+2+2=6\text{CPI}_{\text{actual}} = \text{CPI}_{\text{ideal}} + \text{I-cache stalls} + \text{D-cache stalls} = 2 + 2 + 2 = 6
  4. CPI with Perfect Cache:

    CPIperfect=CPIideal=2\text{CPI}_{\text{perfect}} = \text{CPI}_{\text{ideal}} = 2
  5. Speedup:

    Speedup=CPIactualCPIperfect=62=3.00\text{Speedup} = \frac{\text{CPI}_{\text{actual}}}{\text{CPI}_{\text{perfect}}} = \frac{6}{2} = 3.00

Thus, the speedup achieved with a perfect cache is 3.00.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Cache Memory and Hierarchy previous year question is Q56 of the GATE CSE 2024 Set 1 paper. Find more GATE CSE PYQs on Cache Memory and Hierarchy in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Cache Memory and Hierarchy PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Cache Memory and Hierarchy in GATE CSE

Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 16 of them are 2-mark NAT questions like this one, and GATE CSE 2024 Set 1 has 4.

How GATE tests Cache Memory and Hierarchy

More from GATE CSE 2024 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 1 · Q56 · NAT

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 …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.