1,137 views
0 votes
0 votes
In a pipeline the maximum ideal speed-up is 5. Let the percentage of unconditional branches in a set of typical program be 5% and that of conditional branches be 10%. If 70% of the conditional branches are taken, calculate % loss of speed-up due to branch instructions.

It is very difficult to understand this question and solve it. Please help.

1 Answer

0 votes
0 votes

In Ideal Case, Speed Up Factor = no. of Stages

Here Speed Up Factor = 5 , So no. of Stages = 5

So, Branch penalty = 4

Avg. no. of stalls = (frequency of unconditional branch instruction + frequency of conditional branch instruction ) * branch penalty

Avg. no. of stalls = ( 0.05 + 0.1*0.7 ) * 4

Avg. No. of Stalls = 0.48

Avg. CPI = 1+0.48 = 1.48

new Speed Up Factor = no. of stages / avg. CPI …...in ideal case

new Speed Up Factor = 5/1.48 = 3.378

% LOSS = ((Old Speed Up – New Speed UP) / Old Speed Up)* 100

% LOSS = (( 5 – 3.378 ) / 5) * 100

%LOSS = (1.622 / 5 )* 100 = 32.44%

ANSWER = 32.44% loss

Related questions

0 votes
0 votes
2 answers
1
0 votes
0 votes
1 answer
4