1. Increasing the size of a branch-prediction buffer means that it is less likel
ID: 3706023 • Letter: 1
Question
1. Increasing the size of a branch-prediction buffer means that it is less likely that two branches in a program will share the same predictor. A single predictor predicting a single branch instruction is generally more accurate than is the same predictor serving more that one branch instruction. a) List a sequence of branch taken and not taken actions to show a simple example of 1-bit predictor sharing that reduces misprediction rate. b) List a sequence of branch taken and not taken actions to show a simple exampl e of 1-bit predictor sharing that increases misprediction rate. c) Discuss why the sharing of branch predictors can be expected to increase mispredictions for the long instruction execution sequences of actual programs.
Explanation / Answer
Solution:
a)
Take two branches b1 and b2 which will execute dfferently .at the time of executon of programm b1 and b2 every alternate taken/not taken .suppose every branch contain a 1_bit predicator ,every branch all the time will mispredicate.
p b1 p b2 p b1 p b2 p b1 p b2 p b1 p b2
NT T T NT NT NT NT T T T T NT NT NT NT T
Correct? no no yes no yes no yes no
here the P indicates the 1_ bit predictor , T- Time taken , NT-Not taken
b1 and b2 specifies the work of branches respectively.
since one predictor is shared ,accuracy increases from 0 to 50%.
b)
in this b1 is all the time taken and b2 is also all the time not taken
P b1 p b2 p b1 p b2 p b1 p b2 p b1 p b2
NT T T NT NT T T NT NT T T NT NT T T NT
correct? no no no no no no no no
Suppose each contain a predictor ,each will rigthly predicted ,later the initial startup of transient, since a single predictor was shared , the accuracy is 0%.
c)
suppose a predicator is having shared with a group of instructions ,furtherly across the course of programm execution set membership would probably alter.(that partricular having shared ).if a fresh branch joins in group or the previous ones moves waay from the group,the branch action antiquity constituted with the state of predicator improbably predict the group atitude and also the previious group behaviour ,that contain few duration to impact the predictor state.the transient intervals succeeding group alters probably would decrease the long term precision.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.