
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Professor: Archer; Class: COMP ARCHITECTURE; Subject: Computer Science; University: Portland State University; Term: Spring 2007;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!
CS538 Homework 4 Spring, 2007
branch instruction. Assume now that some other subset of address bits is chosen. Discuss the effects on buffer operation.
branches in a program will share the same predictor. A single predictor predicting a single branch instruction is generally more accurate than if the predictor serves more than one branch (which we call aliasing). 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 that show a simple example of how sharing a 1-bit predictor increases misprediction. c. Discuss why sharing branch predictors can be expected to increase misprediction for long instruction sequences of actual programs.
the code on three systems, each system using one of the branch predictors below. All predictors use a 2^14 -entry branch history table (BHT). (The global predictor does not need its BHT for predicting branch direction.) The three predictors are: System B: bimodal System G: global, history length 10. (Accuracy can be approximated.) System L: local, history length 10.
void samples(int& x, int& y, char **string_array ) {// Loop 5-xor for( int i = 0; i < 5; i++ ) x = x ^ i; // Loop 5-len for( int i = 0; i < 5; i++ ) if( strlen( string_array[i] ) < 20 ) return; // Never executes. <- Important. // Loop 100-xor for( int i = 0; i < 100; i++ ) y = y ^ i;}
a. Determine the amount of memory (in bits) needed to implement each predictor.
b. For each loop in samples determine the accuracy of the loop branch (the one that tests the value of i) after warmup on each system. The accuracy for the global predictor can be approximated, the others must be determined exactly.
c. Why would solving the problem above be impossible, or at least tedious, if the BHT size were about 2^3 entries?