Question: Your program consists of arithmetic instructions, load / store instructions, branch instructions, and unconditional jumps in the given ratio: 4 5 % , 2 0

Your program consists of arithmetic instructions, load/store instructions, branch instructions, and unconditional jumps in the given ratio: 45%,20%,25%, and 10%. For the branch instructions, assume that 70% of all branches are Taken. Assume CPI=1 for arithmetic instructions, CPI=3 for Load/Store, base CPI=1 for branch instructions, and CPI=1 for unconditional jumps.
Your processor can support 3 control hazard strategies, and you are supposed to choose one for the given program:
Strategy 1: Unconditional stall Stalls pipeline for 1 cycle until the branch is resolved.
Strategy 2: Branch prediction Predicts Taken by default; Stall pipeline for 2 cycles if the branch is Not Taken.
Strategy 3: Branch prediction Predicts Not Taken by default; Stall pipeline for 1 cycle if the branch is Taken.
Which strategy would result in the fastest runs for the given program?
Hint: Calculate the Global CPI for each strategy.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!