A processor without pipelining takes 4 clock cycles to fully process one instruction, and cannot start a new instruction until the previous one finishes.
A pipelined version of the same processor splits execution into 4 equal stages, so that once the pipeline is full, one instruction completes every clock cycle.
Calculate the number of clock cycles needed to fully process 10 instructions, without pipelining and with pipelining (assume the first instruction takes 4 cycles to complete, then one further instruction completes each following cycle).
State one hazard that can reduce the benefit of pipelining.
Answer
40 cycles without pipelining, 13 cycles with pipelining; a data or control hazard can reduce the benefit
Mark scheme
| M1 | for 10 * 4 = 40 cycles without pipelining. |
| M1 | for using 4 + (10 - 1) to include pipeline fill and the remaining completions; accept an equivalent timing diagram. |
| A1 | for 13 cycles with pipelining. |
| B1 | for stating one valid pipeline hazard, such as a data hazard or a control hazard; no explanation is required. |