GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A classic 5-stage pipeline (IF, ID, EX, MEM, WB) runs: I1: ADD R1, R2, R3; I2: LW R4, 8(R1); I3: AND R5, R4, R1; I4: OR R6, R5, R4; I5: LW R7, 0(R6); I6: SUB R8, R7, R2. Without hazards I1 finishes WB in cycle 5. Machine F has full forwarding (EX/MEM and MEM/WB to the ALU inputs), so only a load followed immediately by a user stalls, for one cycle. Machine N has no forwarding, but its register file is written in the first half of a cycle and read in the second half. In which cycle does I6 finish WB on F and on N?
- A. 12 and 25
- B. 11 and 20
- C. 12 and 20
- D. 13 and 21
Correct answer: C. 12 and 20
F: two load-use pairs (I2→I3, I5→I6) cost one bubble each: 10 + 2 = 12. N: a consumer may be in ID in its producer's WB cycle (producer ID + 3); ID cycles I1 2, I2 5, I3 8, I4 11, I5 14, I6 17, so WB at 20. Without the split-cycle 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 virtually indexed, physically tagged L1 cache has 64-byte blocks, 4 KB pages and must avoid synonym (aliasing) problems with no OS help…
- A disk spins at 6000 rpm with 500 sectors of 512 B per track and 4 recording surfaces. A long file fills whole cylinders in order…
- A direct-mapped cache has 2 lines of 4 words each. The word-address trace is ['W0', 'W1', 'W2', 'W3', 'R0', 'R1', 'W8', 'W9', 'R8', 'R0']…
- Which of the following statements about I/O are correct? I. A DMA controller must become the bus master to transfer data to memory. II. In…
- A physically indexed L2 cache is 2 MB, 8-way set-associative with 64-byte blocks. How many page colours (classes of frames that map to the…
- A multiplexed bus needs 1 address cycle and 3 wait cycles before data. Option P: a 32-bit bus that transfers 4-word bursts (1 + 3 + 4…