Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Discover comprehensive answers to your questions from knowledgeable professionals on our user-friendly platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

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

Sagot :

Answer:

The stalling hurt the performance by 60%.

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%.