GATE Computer ScienceVery hardGATE CS (PYQ pattern)

An in-order 2-issue processor starts up to two consecutive instructions per cycle. The second is issued with the first only if it has no RAW or WAW dependence on it and they are not both loads/stores. An instruction waits until its source operands are ready: ALU results are usable the next cycle, load results two cycles after issue. For the program [ALU r1<-r2,r3; ALU r4<-r5,r6; ALU r7<-r1,r4; LW r8<-r9; ALU r10<-r8,r7; SW -<-r10,r9; LW r11<-r9; ALU r12<-r11,r11], in how many cycles are all instructions issued (count the cycle of the last issue)?

  1. A. 4
  2. B. 8
  3. C. 7
  4. D. 9

Correct answer: B. 8

Simulate cycle by cycle: a 1-issue machine needs 10 cycles; dependences and the load latency stop the pairing, so the 2-issue machine needs 8, far from the ideal ⌈8/2⌉ = 4.

More Computer Organization and Architecture questions

Exams that ask this topic