GATE Computer ScienceVery hardGATE CSE
A branch with the repeating outcome pattern T, T, T, N (period 4, repeated 10 times, 40 executions) is predicted by a single 2-bit saturating counter (states 0,1 predict not taken; 2,3 predict taken; increment on taken, decrement on not taken). The counter starts at state 1. How many mispredictions occur in the 40 executions?
- A. 11
- B. 8
- C. 14
- D. 10
Correct answer: A. 11
From state 1 the first T mispredicts, state rises to 2 and the next two T's are right; each N mispredicts; steady state has 1 miss per period. Simulation gives 11.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- The backward branch of an inner loop executes 10 times per entry (taken 9 times, then not taken once), and the inner loop is entered 20…
- A 256×256 array of 4-byte integers is stored in row-major order starting at address 0. A 16 KB direct-mapped cache has 32-byte lines (512…
- In IEEE 754 single precision with round-to-nearest-even, let x = 2^24 = 16777216. What are the values of (x + 1) + 1 and x + (1 + 1)?
- A 4 KB direct-mapped cache has 32-byte lines. The loop "for i = 0..127: sum += A[i] + B[i]" reads 4-byte integers, A starting at address 0…
- A RISC ISA has fixed 4-byte instructions. A conditional branch holds a 16-bit signed offset counted in instructions and the target is…
- How many distinct single-precision IEEE 754 values x satisfy 1 ≤ x < 1024?