Pipeline Processor · Computer Organization and Architecture
53 questions · asked in 25 of 27 years (2000–2026)
MCQ 29 · MSQ 2 · NAT 221-mark 23 · 2-mark 30
2000Questions per year2026
Questions 6–10 of 53
Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?
One or more options are correct.
Answer: (A), (B), (C)
Let us check each statement one by one:
- Option 1: This is the exact meaning of forwarding (also called bypassing) TRUE.
- Option 2: A value ready at the MEM output (for example, a loaded value) can be sent to the EX input of a later instruction TRUE.
- Option 3: Forwarding cannot remove all stalls. For example, a load followed right away by an instruction that uses the loaded value still needs 1 stall (load-use hazard) TRUE.
- Option 4: Forwarding needs extra hardware (extra paths, multiplexers, hazard detection logic) FALSE.
Answer: Options 1, 2 and 3
- Option 1: This is the exact meaning of forwarding (also called bypassing) TRUE.
- Option 2: A value ready at the MEM output (for example, a loaded value) can be sent to the EX input of a later instruction TRUE.
- Option 3: Forwarding cannot remove all stalls. For example, a load followed right away by an instruction that uses the loaded value still needs 1 stall (load-use hazard) TRUE.
- Option 4: Forwarding needs extra hardware (extra paths, multiplexers, hazard detection logic) FALSE.
Answer: Options 1, 2 and 3
The baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns). The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores in the multicore system run their share of the parallelized code for an equal amount of time.
The number of cores that minimize the execution time of the program is _______
The number of cores that minimize the execution time of the program is _______
Answer: 3
The serial part of 100 ns, so it is 10 ns. The parallel part is 90 ns.
For cores:
- : 100 ns
- : ns
- : ns
- : ns
The least time is at . The same comes from .
Answer: 3
For cores:
- : 100 ns
- : ns
- : ns
- : ns
The least time is at . The same comes from .
Answer: 3
An instruction format has the following structure:
Instruction Number:
Consider the following sequence of instructions to be executed in a pipelined processor:
I1: DIV R3, R1, R2
I2: SUB R5, R3, R4
I3: ADD R3, R5, R6
I4: MUL R7, R3, R8
Which of the following statements is/are TRUE
Instruction Number:
Consider the following sequence of instructions to be executed in a pipelined processor:
I1: DIV R3, R1, R2
I2: SUB R5, R3, R4
I3: ADD R3, R5, R6
I4: MUL R7, R3, R8
Which of the following statements is/are TRUE
One or more options are correct.
Answer: (A)
Check each statement:
- I1 writes R3 and I2 reads R3 RAW TRUE.
- I1 and I3 both write R3 this is WAW, not WAR FALSE.
- I2 reads R3 and I3 writes R3 this is WAR, not RAW FALSE.
- I3 writes R3 and I4 reads R3 this is RAW, not WAW FALSE.
Answer: There is a RAW dependency on R3 between I1 and I2
- I1 writes R3 and I2 reads R3 RAW TRUE.
- I1 and I3 both write R3 this is WAW, not WAR FALSE.
- I2 reads R3 and I3 writes R3 this is WAR, not RAW FALSE.
- I3 writes R3 and I4 reads R3 this is RAW, not WAW FALSE.
Answer: There is a RAW dependency on R3 between I1 and I2
A non-pipelined instruction execution unit operating at 2 GHz takes an average of 6 cycles to execute an instruction of a program P. The unit is then redesigned to operate on a 5-stage pipeline at 2 GHz. Assume that the ideal throughput of the pipelined unit is 1 instruction per cycle. In the execution of program P, 20% instructions incur an average of 2 cycles stall due to data hazards and 20% instructions incur an average of 3 cycles stall due to control hazards. The speedup (rounded off to one decimal place) obtained by the pipelined design over the non-pipelined design is ________
Answer: 2.9 to 3.1
Non-pipelined unit: 6 cycles for each instruction.
CPI of the pipelined unit:
The clock is the same (2 GHz), so the speedup is:
Answer: 3
CPI of the pipelined unit:
The clock is the same (2 GHz), so the speedup is:
Answer: 3
Consider a 3-stage pipelined processor having a delay of 10 ns (nanoseconds), 20 ns, and 14 ns, for the first, second, and the third stages, respectively. Assume that there is no other delay and the processor does not suffer from any pipeline hazards. Also assume that one instruction is fetched every cycle.
The total execution time for executing 100 instructions on this processor is _______ ns
The total execution time for executing 100 instructions on this processor is _______ ns
Answer: 2040
The clock cycle is set by the slowest stage, so cycle time = 20 ns.
The number of cycles needed for n instructions on k stages: .
Total time ns
Answer: 2040
The number of cycles needed for n instructions on k stages: .
Total time ns
Answer: 2040
Keep practising