Answer: 1.42:1.45
To find the speedup of processor X2 over X1, we first calculate the average Cycles Per Instruction (CPI) for both processors.
1. Calculation of CPI for Processor X1
- Base CPI: 1
- Branch instruction frequency: 30%=0.3
- Stall cycles per branch: 2
CPI1=Base CPI+(Branch Frequency×Stall Cycles per Branch)
CPI1=1+(0.3×2)=1+0.6=1.6
2. Calculation of CPI for Processor X2
Processor X2 uses a Branch Predictor Unit (BPU) with 80% accuracy:
- Correct prediction rate: 80%=0.8 (incurs 0 stall cycles)
- Incorrect prediction rate: 20%=0.2 (incurs the standard 2 stall cycles)
The average stall cycles per branch instruction in X2 is:
Average Stall Cycles=(0.8×0)+(0.2×2)=0.4
Now, we calculate the average CPI for X2:
CPI2=Base CPI+(Branch Frequency×Average Stall Cycles)
CPI2=1+(0.3×0.4)=1+0.12=1.12
3. Speedup Calculation
Since both processors operate at the same clock frequency (2 GHz) and execute the same program P (same instruction count), the speedup is given by the ratio of their CPIs:
Speedup=Execution Time of X2Execution Time of X1=CPI2CPI1
Speedup=1.121.6=710≈1.42857
Rounding off to two decimal places, the speedup obtained is 1.43.