retagged by
762 views
1 votes
1 votes

Can anyone solve this??
Doubts: Branch penalty should be 2. right?
and what is the branch penalty for unconditional branch?

retagged by

1 Answer

0 votes
0 votes
Branch penalty is 2 ,beacuse the target address we are getting in 3rd stage.

80% are unconditional branches , ie we have to jump there , and there is no time needed to calculate the target address.

// ie. no stalls.

For 20%, the branch penaly is 2.

Speed Up = No. of stages/ (1+ (branch penalty)*(% of conditional branch instructions))

=4/(1+2*0.2)=2.857=2.86

// Here we are ignoring the cases, where branch is not taken. We are assuming for all 20% conditional instrustions, branch is taken.

Related questions

1 votes
1 votes
0 answers
1
0 votes
0 votes
2 answers
2
Rustam Ali asked Sep 3, 2018
882 views
Find time complexity of below Program?A(n){if(n<=1) return;elsereturn $A(\sqrt{n})$ ;}
2 votes
2 votes
1 answer
4
Rishav Kumar Singh asked Jun 15, 2018
2,884 views
Which data structure is most efficient to find the top 10 largest items out of 1 million items stored in file?AMin heapBMax heapCBSTDSorted array