208k views
2 votes
A computer with a five-stage pipeline deals with conditional branches by stalling for the next three cycles after hitting one. How much does stalling hurt the performance if 20% of all instructions are conditional branches

User JackPGreen
by
4.2k points

1 Answer

5 votes

Answer:

The stalling hurt the performance by 60%.

Step-by-step explanation:

This can be calculated as follows:

Value of CPI ideally taken by pipeline = 1

From the question, we are given:

Stall frequency = 20%,

Number of frequency = 3

Therefore, we have:

Cycles per instruction (CPI) of the architecture = Value of CPI ideally taken by pipeline + (Stall frequency * Number of frequency) = 1 + (20% * 3) = 1.60

Amount by which the stalling hurt the performance = Cycles per instruction (CPI) of the architecture Value of CPI ideally taken by pipeline = 1 - 0.60 = 0.60, or 60%

Therefore, the stalling hurt the performance by 60%.

User Sarath Babu
by
4.3k points