Central Processing Unit Q.15

0. A CPU has five-stages pipeline and runs at 1 GHz frequency. Instruction fetch happens in the first stage of the pipeline. A conditional branch instruction computes the target address and evaluates the condition in the third stage of the pipeline. The processor stops fetching new instructions following a conditional branch until the branch outcome is known. A program executes 109 instructions out of which 20% are conditional branches. If each instruction takes only cycle to complete on average, then total execution time of the program is

  • Option : C
  • Explanation : In the 3rd stage of pipeline, there will be 2 stall cycles i.e. 2 delay slots.
    Total number of instructions = 109
    = (0.2 * (2 + 1) + 0.8 * 1) * 10^9
    = 1.4 sec
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *