Question: a ) n = 1 ; for j = 1 to 1 0 0 if ( n > 1 0 ) I for i =

a)
n=1;
for j=1 to 100
if (n>10)
I
for i=1 to 100
end for
n=1;
else
I
for i=1 to 100
.1
end for
n=n+1;
end if
end for
For the above code, identify which branch prediction scheme would result in fewer additions to the
CPI for the pipelined processor of Q1(Branch condition is evaluated in EX satge). Static branch
prediction, dynamic branch prediction with 1-bit branch history table and with 2-bit branch history
table. Justify you answer by giving examples from the code where performance is improved by using
a particular scheme over the other.
 a) n=1; for j=1 to 100 if (n>10) I for i=1

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!