How does branch prediction reduce the branch penalty?
What will be an ideal response?
In a pipelined processor, an instruction flows through the pipeline and is executed in stages. If an instruction is a
branch and the branch is taken, all instructions behind it in the pipeline have to be flushed. The earlier a branch is
detected and the outcome resolved the better. Branch prediction makes a guess about the direction (outcome) of
the branch; taken or not taken. If the branch is predicted not taken, nothing happens and execution continues. If
the branch is predicted as taken, instructions can be obtained from the branch target address and loaded into the
instruction stream immediately. If the prediction is incorrect, the pipeline has to be flushed in the normal way.
You might also like to view...
Endnotes are placed at the bottom of the page just like a footnote.
a. true b. false
To select the entire document you should follow the sequence _____.
A. HOME, Editing, Select, Select All B. VIEW, Editing, Select, Select All C. HOME, Editing, Select Text D. HOME, Select All