GATE Computer ScienceHardGATE CS (PYQ pattern)

Design X runs at 2.0 GHz and, with no branch prediction, charges 2 cycles for each taken branch. Design Y runs at 1.8 GHz and charges 0 for a correctly predicted branch and 4 for a mispredicted one; its predictor is right for 80% of all branches. 15% of instructions are branches and 70% of branches are taken. Both machines also lose 0.15 cycles per instruction to other stalls on top of an ideal CPI of 1. Which is faster, and by what factor (slower time ÷ faster time)?

  1. A. Y, by a factor of 1.038
  2. B. X, by a factor of 1.071
  3. C. Y, by a factor of 1.071
  4. D. X, by a factor of 1.038

Correct answer: D. X, by a factor of 1.038

X: CPI = 1.15 + 0.15·0.7·2 = 1.36 at 2.0 GHz = 0.680 ns/instr. Y: CPI = 1.15 + 0.15·0.2·4 = 1.27 at 1.8 GHz = 0.7056 ns/instr. The lower CPI of Y is more than cancelled by its slower clock, so X wins by 1.038.

More Computer Organization and Architecture questions

Exams that ask this topic