GATE Computer ScienceHardGATE CS (PYQ pattern)
A nested loop's inner back-edge branch has the outcome pattern T T T T N (the inner loop runs 5 times) for each of 4 outer iterations (20 outcomes). A 2-bit saturating counter (taken predicted in states 2 and 3) starts in state 0. What is the misprediction count, and what is the count for a 1-bit last-outcome predictor starting at not-taken?
- A. 6 and 6
- B. 8 and 6
- C. 7 and 8
- D. 6 and 8
Correct answer: D. 6 and 8
2-bit: the first two T's are wrong (0→1→2); afterwards it stays in the taken half so only the 4 loop exits are wrong... = 6 total; 1-bit: first T wrong, each N wrong and the following T wrong: 1 + 4 + 3 = 8.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- The expression a − (b − (c − (d − e))) is evaluated by a stack machine in which a binary operator takes the left operand from the…
- A 128-byte, 2-way set-associative cache with 16-byte blocks and LRU replacement is empty. The processor reads these byte addresses in…
- A process maps 100 separate regions, each 1 MB + 4 KB long and each starting on a 2 MB boundary (1 MB = 1024 KB). With 4 KB pages, how…
- A 48-bit virtual address space uses 4 KB pages and a 4-level page table in which every table is one 4 KB page of 512 eight-byte entries (9…
- A virtually indexed, physically tagged L1 cache is 64 KB, 8-way set-associative with 64-byte blocks, and pages are 4 KB. In how many…
- A 64M × 8 DRAM chip uses multiplexed row/column addressing with a square cell array. How many address pins does the chip need (excluding…