Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Increasing the size of a branch-prediction buffer means that it is less likely t

ID: 3819016 • Letter: I

Question

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 that same predictor serving more than 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 the misprediction rate.

b. List a sequence of branch taken and not taken actions that show a simple example of how sharing a 1-bit predictor increases misprediction.

c. Discuss why the sharing of branch predictors can be expected to increase mispredictions for the long instruction execution sequences of actual programs

Please show work and do all parts of the question, thank you.

Explanation / Answer

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.