GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A fully associative cache (block = one word) sees the block reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5, starting empty. How many misses occur with FIFO replacement and 3 lines, with FIFO and 4 lines, and with LRU and 4 lines?
- A. 9, 10 and 8
- B. 9, 8 and 8
- C. 10, 9 and 8
- D. 9, 10 and 10
Correct answer: A. 9, 10 and 8
FIFO with 3 lines: 9 misses; with 4 lines: 10 — more lines, more misses (Belady's anomaly), because FIFO is not a stack algorithm. LRU is a stack algorithm and can never get worse with more lines: 4 lines give 8 (3 lines give 10).
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 5-stage pipeline resolves conditional branches in ID, with forwarding into ID for ALU results but the branch needs its operand at the…
- A branch alternates T, N, T, N, … for 20 executions, starting with T. A 2-bit saturating counter (states 0-3, predicts taken in states 2…
- A 5-stage pipeline with full forwarding has a measured CPI of 1.40 (ideal 1). 25% of instructions are loads, and 40% of loads are…
- A disk spins at 6000 rpm and each track holds 256 KB. A 1 MB file is stored on 4 consecutive tracks of the same cylinder-group; a head…
- Over 1000 memory references, 40 miss in L1 and 20 of those also miss in L2. L1 hit time is 1 cycle, L2 hit time 10 cycles, and memory adds…
- Radix-2 Booth recoding of an 8-bit multiplier performs one add or subtract at each change between adjacent bits (with an implied 0 to the…