GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A classic 5-stage pipeline (IF, ID, EX, MEM, WB) runs: I1: ADD R1, R1, R2; I2: ADD R3, R1, R4; I3: ADD R5, R3, R1; I4: LW R6, 0(R5); I5: ADD R7, R6, R3; I6: SW R7, 0(R5). Without hazards I1 finishes WB in cycle 5. Machine N has no forwarding but a split-cycle register file (a consumer may be in ID in its producer's WB cycle); machine F has full forwarding to the ALU inputs, so only a load followed immediately by a user stalls, for one cycle. In which cycle does I6 finish WB on N and on F?
- A. 25 and 11
- B. 20 and 10
- C. 20 and 11
- D. 18 and 11
Correct answer: C. 20 and 11
N: every instruction depends on the one before, so each ID comes 3 cycles after the previous ID: I1 2, I2 5, I3 8, I4 11, I5 14, I6 17 → WB 20. F: only I4 → I5 is a load-use pair, 10 + 1 = 11. Without the split register file N would need 25.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A direct-mapped cache of 128 bytes with 32-byte blocks (4 lines) is used while a program reads the 4-byte words at byte addresses 0, 4, 8…
- A non-pipelined processor takes 180 + 120 + 200 + 260 + 100 ps per instruction. Its 5-stage pipelined version adds a 20 ps latch after…
- Memory access takes 200 ns. A page fault takes 8 ms to service if the replaced page is clean and 20 ms if it is dirty (it must first be…
- In IEEE 754 single precision with round-to-nearest-even, which of these is correct for computing 1.0 + 2⁻²⁴ and (1 + 2⁻²³) + 2⁻²⁴?
- In IEEE 754 single precision with round-to-nearest-even, let x = 3 × 2⁻¹⁴⁹ (three times the smallest positive denormal). What are x / 2…
- A memory protects data with a SECDED Hamming code (single-error correction plus one overall parity bit for double-error detection). How…