Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using any high-level programming language of your choice, develop a programme to test the working of Branch prediction technique, which is used in Computer

Using any high-level programming language of your choice, develop a programme to test the working of  Question 2 (Performance measure) Using your programs developed in question 1 above, perform the following

Using any high-level programming language of your choice, develop a programme to test the working of "Branch prediction" technique, which is used in Computer Engineering to improve performance. In developing this program, it is suggested that you consider the following possibilities: [1] Write a main program that has at least ten different executable branches. The executed branch should be determined by a value of a global variable, say, myBranchNumber. [2] For the ten branches suggested in [1] above, ensure that they have comparable computations. [3] Apart from the ten branches in [1], the main program should have at least thirty (30) sequentially executed instructions. [4] Write a function that generates random numbers within a reasonable range and update the global variable as suggested in [1]. [5] There should be a function which keeps track of the time taken to complete N runs of the program. This function should store in a file the record of predicted and executed branches as well as the time to complete the N runs. Question 2 (Performance measure) Using your programs developed in question 1 above, perform the following tests: [1] Run the program for N runs with the prediction functionality disabled and determine time taken to complete the runs. [2] Re-run the program with the branch prediction enabled and determine time taken to complete the runs. "Adjust" the branch prediction accuracy and determine its effect on the speed of execution. [3] Report on your findings. Using any high-level programming language of your choice, develop a programme to test the working of "Branch prediction" technique, which is used in Computer Engineering to improve performance. In developing this program, it is suggested that you consider the following possibilities: [1] Write a main program that has at least ten different executable branches. The executed branch should be determined by a value of a global variable, say, myBranchNumber. [2] For the ten branches suggested in [1] above, ensure that they have comparable computations. [3] Apart from the ten branches in [1], the main program should have at least thirty (30) sequentially executed instructions. [4] Write a function that generates random numbers within a reasonable range and update the global variable as suggested in [1]. [5] There should be a function which keeps track of the time taken to complete N runs of the program. This function should store in a file the record of predicted and executed branches as well as the time to complete the N runs. Question 2 (Performance measure) Using your programs developed in question 1 above, perform the following tests: [1] Run the program for N runs with the prediction functionality disabled and determine time taken to complete the runs. [2] Re-run the program with the branch prediction enabled and determine time taken to complete the runs. "Adjust" the branch prediction accuracy and determine its effect on the speed of execution. [3] Report on your findings.

Step by Step Solution

3.37 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

int randomint branch... 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

Step: 3

blur-text-image

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

Auditing and Assurance services an integrated approach

Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley

14th Edition

133081605, 132575957, 9780133081602, 978-0132575959

More Books

Students also viewed these Computer Network questions

Question

Sketch the graph of the function. y = e -x/2

Answered: 1 week ago

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago