In a processor with a five stage pipeline as discussed in the class and shown in the picture below (with buffers between the stages), explain the problem posed by branch instruction. Present a solution.

What will be an ideal response?


The problem presented by a branch instruction is that as it moves into the decode stage the fetch stage does not yet know whether to fetch the next instruction or the branch target instruction.
Without other changes this requires the pipeline to stall until it has the result of the branch comparison.
Possible solution to ameliorate this problem:
a.) Perform the comparison in the decode stage.
b.) Change policy to unconditionally execute the instruction following the branch regardless of the outcome of the branch.
c.) Install a branch predictor which will perhaps record the previous results of a branch and predict the same outcome. Due to the nature of loops this should have a very high success rate.
d.) Install a BTB as discussed in question 11.

Computer Science & Information Technology

You might also like to view...

The remove operation returns

a) an int representing the number of elements remaining in the list after the removal. b) a boolean value indicating if the remove was successful or not. c) the element that was removed. d) a pointer to the list e) The remove operation does not return any of these.

Computer Science & Information Technology

What is the default quorum selection for a cluster that has an even number of host computers?

A. node majority B. node and disk majority C. node and file share majority D. no majority: disk only

Computer Science & Information Technology

Examining the sequence diagram you produced in Exercise 5–4, identify the associations between these objects.

What will be an ideal response?

Computer Science & Information Technology

If you want to move or make changes to the locked Background layer, you can convert it to a regular layer by right-clicking the Background layer and selecting the ____ option on its shortcut menu.

a. Layer From Background b. Change Locked Background c. Convert Background Layer d. Adjust Locked Background

Computer Science & Information Technology