GATE Computer ScienceHardGATE CS (PYQ pattern)
A branch target buffer (BTB) lets the fetch unit predict taken branches with no bubble when it hits and predicts correctly. Branches are 20% of instructions; 90% hit in the BTB, and on a hit the prediction is right 95% of the time. A BTB miss or a wrong prediction costs 4 cycles. What is the CPI (ideal 1)?
- A. 1.116
- B. 1.036
- C. 1.120
- D. 1.080
Correct answer: A. 1.116
Probability a branch is not handled cleanly = 0.1 (miss) + 0.9 × 0.05 (hit but wrong) = 0.145; CPI = 1 + 0.2 × 0.145 × 4 = 1.116. Adding 0.05 instead of 0.9 × 0.05 ignores that mispredictions occur only on hits.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A stack grows downwards in 4-byte units and SP = 0x8000 initially. The instructions PUSH, PUSH, CALL (pushes a 4-byte return address)…
- A Wallace-tree multiplier of 16 × 16 bits must add 16 partial products using layers of 3:2 carry-save adders (each group of 3 rows becomes…
- Instruction frequencies are 0.5, 0.25, 0.125, 0.0625 and 0.0625. What is the minimum average opcode length with a prefix code, and how…
- A cache line holds 8 words. Memory returns the first word 20 cycles after the request and then one word per cycle. Without…
- A physically indexed, physically tagged cache needs the TLB first: a TLB hit takes 1 ns and the cache hit then takes 2 ns. A VIPT cache…
- A physically tagged L1 data cache is 32 KB, 8-way set-associative with 64-byte blocks. Physical addresses are 40 bits and pages are 4 KB…