Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 : Branch Prediction ( 1 5 points ) a ) [ 5 points ] Assume that we observed the following outcomes for the

Question 1: Branch Prediction (15 points)
a)[5 points] Assume that we observed the following outcomes for the last 8 instances of particular branch instruction: N-T-N-T-N-T-T-N (where N indicates Not Taken, and T indicates Taken branch). Show the content of Branch History Table (BHT) and predictions to be made if we use 1bit branch predictor, and calculate the % of accuracy of the predictor. Assume that very first prediction is Not Taken (N).
\table[[BHT,Prediction,Actual Result,True/False],[0,N,N,true],[,,T,],[,,N,],[,,T,],[,,N,],[,,T,],[,,T,],[,,N,],[,,,]]
b)[5 points] Assume that we observed the following outcomes for the last 8 instances of particular branch instruction: N-T-T-T-T-N-T-N (where N indicates Not Taken, and T indicates Taken branch). Show the content of Branch History Table (BHT) and predictions to be made if we use 2-bit branch predictor, and calculate the % of accuracy of the predictor. Assume that we start with 01 state that leads to have the first prediction be Not Taken (N).
\table[[BHT,Prediction,Actual Result,True/False],[01,N,N,true],[,,T,],[,,T,],[,,T,],[,,T,],[,,N,],[,,T,],[,,N,],[,,,]]
c)[5 points] Assume a processor that employs a branch prediction whose prediction accuracy is 76%. When a branch is predicted correctly, there is no performance penalty. However, when a branch is mispredicted, then there is 5 cycles of penalty. Assume that we want to run a program whose 35% of the instructions are branch instructions. Considering the ideal CPI on this processor is 1(when no hazard and stall occur), what will be the CPI for this program on the given processor?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

The influence of genetics and personality on emotions.

Answered: 1 week ago