GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A pipeline with ideal CPI 1 handles branches (frequency 20%, of which 40% are taken) in one of three ways: (a) stall for 3 cycles on every branch; (b) predict not-taken, so only taken branches cost 3 cycles; (c) predict taken as soon as the target is computed, which costs 1 cycle if the branch is taken and 3 cycles if it is not. Which gives the lowest CPI, and what is it?
- A. predict-not-taken, CPI 1.24
- B. stalling, CPI 1.60
- C. predict-taken, CPI 1.44
- D. predict-not-taken, CPI 1.34
Correct answer: A. predict-not-taken, CPI 1.24
(a) 1 + 0.2×3 = 1.60; (b) 1 + 0.2×0.4×3 = 1.24; (c) 1 + 0.2×(0.4×1 + 0.60×3) = 1.44. The best choice flips with the taken fraction.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A three-word memory-to-memory instruction ADD @A, B (opcode word, address word A, address word B) computes M[B] ← M[M[A]] + M[B], where @A…
- A quad-core chip gives each core a 32 KB L1 instruction cache, a 32 KB L1 data cache and a 256 KB private L2; all cores share an 8 MB L3…
- Two packed-BCD bytes 0x47 and 0x38 are added with a binary adder. Which correction is needed and what is the correct BCD result?
- A 4-way set uses tree pseudo-LRU with three bits: the root bit says which pair (ways 0-1 or 2-3) holds the next victim, and each pair bit…
- A program spends 70% of its time computing and 30% stalled on cache misses. A bigger cache cuts the stall time by 40% but lengthens the…
- A 4-way set holds blocks A, B, C, D in ways 0, 1, 2, 3; A is the least and D the most recently used. Tree pseudo-LRU uses three bits, all…