GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Two branches share one 2-bit saturating counter (aliasing in a small predictor table): X is always taken, Y is never taken, and they execute alternately X, Y, X, Y, … for 20 dynamic branches. The counter predicts taken in states 2 and 3 and starts in state 2. How many mispredictions occur with the shared counter, and how many in total with two private counters that also start in state 2?
- A. 10 shared; 1 private
- B. 10 shared; 0 private
- C. 10 shared; 10 private
- D. 20 shared; 1 private
Correct answer: A. 10 shared; 1 private
Shared: the counter is pushed down by each Y and up by each X, so it only moves between states 2 and 3, always predicts taken, and every Y (10 of them) is mispredicted. Private counters: X's counter stays at 3 (no misses); Y's starts at 2 and is wrong once (then 1, 0, …): total 1.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- On a processor with base CPI 1.0, the L1 cache has 40 misses per 1000 instructions. Of these, 10 per 1000 instructions also miss in the L2…
- A physically tagged 64 KB, 4-way cache has 64-byte blocks, 48-bit physical addresses and 4 KB pages. How many tag bits does each line…
- In a custom 8-bit floating-point format there is 1 sign bit, 4 exponent bits (bias 7) and 3 fraction bits, with IEEE-like rules (exponent…
- A MIPS-like J instruction has a 26-bit field holding a word address; the target is formed from the top 4 bits of PC + 4, followed by the…
- A processor services interrupts with nested priorities: a higher-priority interrupt (larger number) preempts a running lower-priority…
- Radix-4 Booth recoding of the 8-bit two's-complement multiplier 01101110 (value 110) produces four digits in {−2, −1, 0, +1, +2}. Which…