Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider an instruction sequence of length n that is streaming through the instr

ID: 662989 • Letter: C

Question

Consider an instruction sequence of length n that is streaming through the instruction

pipeline. Let p be the probability of encountering a conditional or unconditional branch

instruction, and let q be the probability that execution of a branch instruction I causes a

jump to a nonconsecutive address.Assume that each such jump requires the pipeline to

be cleared, destroying all ongoing instruction processing, when I emerges from the last

stage. Revise Equations (12.1) and (12.2) to take these probabilities into account.

Explanation / Answer

Let us count the first conditional branch as loop 1 as p is the probability of encountering a conditional or unconditional banch instruction and q as the probability of execution of a branch instruction.

As per the equations 12.1 and 12.2 :-
In the loop 11 when it is not taken as there is a stall after the load and the branches are assumed not to be taken.
In the loop 11 when it is taken as the branch is having single delay slot and the 1st load is having a single delay slot.