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 36–40 of 53
Which of the following are NOT true in a pipelined processor?
I. Bypassing can handle all RAW hazards
II. Register renaming can eliminate all register carried WAR hazards
III. Control hazard penalties can be eliminated by dynamic branch prediction
I. Bypassing can handle all RAW hazards
II. Register renaming can eliminate all register carried WAR hazards
III. Control hazard penalties can be eliminated by dynamic branch prediction
Answer: (B)
I is false. Bypassing (forwarding) cannot remove every RAW hazard. A LOAD gets its value only at the end of its memory access stage, so an instruction that needs this value in its execute stage in the next cycle must still stall.
II is true. A WAR hazard is a false dependence caused only by reusing a register name. Register renaming gives each write a new physical register, so a later write cannot overwrite a value that an earlier instruction still has to read.
III is false. Dynamic branch prediction only guesses the outcome. Each wrong guess still costs a flush of the pipeline, so the penalty is reduced, not eliminated.
The statements that are not true are I and III.
Answer: (B)
II is true. A WAR hazard is a false dependence caused only by reusing a register name. Register renaming gives each write a new physical register, so a later write cannot overwrite a value that an earlier instruction still has to read.
III is false. Dynamic branch prediction only guesses the outcome. Each wrong guess still costs a flush of the pipeline, so the penalty is reduced, not eliminated.
The statements that are not true are I and III.
Answer: (B)
Data forwarding techniques can be used to speed up the operation in presence of data dependencies. Consider the following replacements of LHS with RHS.
i.
ii.
iii.
iv.
In which of the following options, will the result of executing the RHS be the same as executing the LHS irrespective of the instructions that follow ?
i.
ii.
iii.
iv.
In which of the following options, will the result of executing the RHS be the same as executing the LHS irrespective of the instructions that follow ?
Answer: (B)
(i) is true. and both receive the value of in and in .
(ii) is false. gets the correct data in and in , but is not updated in .
(iii) is false. In the last write to is from , but in gets .
(iv) is true. The first write to in is of no use, because the next write overwrites it.
So (i) and (iv) hold.
Answer: (B)
(ii) is false. gets the correct data in and in , but is not updated in .
(iii) is false. In the last write to is from , but in gets .
(iv) is true. The first write to in is of no use, because the next write overwrites it.
So (i) and (iv) hold.
Answer: (B)
The floating point unit of a processor using a design D takes 2t cycles compared to t cycles taken by the fixed point unit. There are two more design suggestions and . uses 30% more cycles for fixed point unit but 30% less cycles for floating point unit as compared to design D. uses 40% less cycles for fixed point unit but 10% more cycles for floating point unit as compared to design D. For a given program which has 80% fixed point operations and 20% floating point operations, which of the following ordering reflects the relative performances of three designs? ( > denotes that is faster than )
Answer: (B)
Average time per operation = 0.8 (cycles of fixed point) + 0.2 (cycles of floating point). Fewer cycles means faster.
: fixed point 1.3t, floating point , so
: fixed point 0.6t, floating point , so
takes the fewest cycles (0.92t), then (1.2t), then (1.32t). So .
Answer: (B)
: fixed point 1.3t, floating point , so
: fixed point 0.6t, floating point , so
takes the fewest cycles (0.92t), then (1.2t), then (1.32t). So .
Answer: (B)
A processor takes 12 cycles to complete an instruction . The corresponding pipelined processor uses 6 stages with the execution times of 3, 2, 5, 4, 6 and 2 cycles respectively. What is the asymptotic speedup assuming that a very large number of instructions are to be executed?
Answer: (B)
The pipeline cycle time must match the slowest stage, which takes 6 cycles. When the pipeline is full, one instruction completes every 6 cycles.
Speed-up = 12 / 6 = 2
Answer: 2
Speed-up = 12 / 6 = 2
Answer: 2
Consider a pipelined processor with the following four stages:
IF: Instruction Fetch
ID: Instruction Decode and Operand Fetch
EX: Execute
WB: Write Back
The IF, ID and WB stages take one clock cycle each to complete the operation. The number of clock cycles for the EX stage depends on the instruction. The ADD and SUB instructions need 1 clock cycle and the MUL instruction needs 3 clock cycles in the EX stage. Operand forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions?
ADD R2, R1, R0 (R2 R1 + R0)
MUL R4, R3, R2 (R4 R3 * R2)
SUB R6, R5, R4 (R6 R5 - R4)
IF: Instruction Fetch
ID: Instruction Decode and Operand Fetch
EX: Execute
WB: Write Back
The IF, ID and WB stages take one clock cycle each to complete the operation. The number of clock cycles for the EX stage depends on the instruction. The ADD and SUB instructions need 1 clock cycle and the MUL instruction needs 3 clock cycles in the EX stage. Operand forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions?
ADD R2, R1, R0 (R2 R1 + R0)
MUL R4, R3, R2 (R4 R3 * R2)
SUB R6, R5, R4 (R6 R5 - R4)
Answer: (B)
Forwarding passes a result from the end of one EX stage to the start of the next EX stage, so a dependent instruction does not wait for WB.
ADD: IF in t1, ID in t2, EX in t3, WB in t4. MUL needs R2 from ADD, which is forwarded, so MUL does EX in t4 to t6 and WB in t7. SUB needs R4, which MUL makes only at the end of its 3-cycle EX (t6). So SUB stalls in t5 and t6, gets R4 by forwarding, does EX in t7 and WB in t8.
Here is the EX to EX data forwarding:
The last WB is in t8, so 8 cycles are taken.
Answer: (B)
ADD: IF in t1, ID in t2, EX in t3, WB in t4. MUL needs R2 from ADD, which is forwarded, so MUL does EX in t4 to t6 and WB in t7. SUB needs R4, which MUL makes only at the end of its 3-cycle EX (t6). So SUB stalls in t5 and t6, gets R4 by forwarding, does EX in t7 and WB in t8.
Here is the EX to EX data forwarding:
The last WB is in t8, so 8 cycles are taken.
Answer: (B)
Keep practising