Skip to content
GATEiit

GATE CSE 2022 Q61: Speed-up from a branch predictor with 80% accuracy

Question

A processor X1X_1 operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI (cycles per instruction) of one without any pipeline hazards. For a given program P that has 30% branch instructions, control hazards incur 2 cycles stall for every branch. A new version of the processor X2X_2 operating at same clock frequency has an additional branch predictor unit (BPU) that completely eliminates stalls for correctly predicted branches. There is neither any savings nor any additional stalls for wrong predictions. There are no structural hazards and data hazards for X1X_1 and X2X_2. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X2X_2 over X1X_1 in executing P is____________.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 1.42 to 1.45 (official GATE 2022 final answer key)

Concept used: Effective CPI = base CPI + (branch fraction × stall cycles per stalled branch); speed-up is the CPI ratio at equal clock.

First step: CPIX1=1+0.3×2CPI_{X_1} = 1 + 0.3 \times 2 and CPIX2=1+0.3×0.2×2CPI_{X_2} = 1 + 0.3 \times 0.2 \times 2.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2022 CS question paper and final answer key, organised by IIT Kharagpur. Question paper · Answer key