Question

a) Most of the time the sharing of a single branch predictor counter between two different...

a) Most of the time the sharing of a single branch predictor counter between two different branch instructions hurts the prediction accuracy, but sometimes it helps. Give an example of a sequence of branch instructions such that the predictor sharing hurts the performance. Specifically indicate the order in which branch instructions are executed and estimate the prediction accuracy for both cases (shared predictor vs. separate predictors). You can assume any initial state you want.

b) Repeat a), but this time show an example where predictor sharing actually helps the overall accuracy.

Homework Answers

Answer #1

Example of how sharing predictor decreases the accuracy of prediction:

Take two branches B1 and B2 and a predictor P. B1 and B2 are in alternate execution . in this example of program execution B1 is always taken and B2 is always not taken and are interleaved. P is 1-bit predictor shared by B1 and B2.

T-> Taken
NT-> Not taken

This shows how sharing of 1-bit predictor decreases chances of correct prediction.

B) Predictor sharing improving performance:
Same assumption as above but here B1 and B2 are taken/not taken alternately

Do comment back if you need further clarification.Thanks.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions