GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A 4-way set uses tree pseudo-LRU with three bits: the root bit says which pair (ways 0-1 or 2-3) holds the next victim, and each pair bit says which way of that pair. On every access to way w, the bits on its path are set to point away from w. All bits start at 0 (0 = left). After hits to ways [2, 1, 0, 1, 3, 3] in that order, which way does the next miss replace?
- A. Way 2
- B. Way 0
- C. Way 1
- D. Way 3
Correct answer: B. Way 0
Simulating the three bits gives victim way 0; true LRU would evict way 2. Tree-PLRU only approximates LRU because it remembers one bit per node, not the full order.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A program spends 70% of its time computing and 30% stalled on cache misses. A bigger cache cuts the stall time by 40% but lengthens the…
- A 4-way set holds blocks A, B, C, D in ways 0, 1, 2, 3; A is the least and D the most recently used. Tree pseudo-LRU uses three bits, all…
- A 16-bit unsigned integer (0..65535) is multiplied by a 16-bit two's-complement integer (−32768..32767). What is the minimum width of a…
- A loop computes y[i] += A[i][j] × x[j] for a 32×32 matrix of 4-byte floats (A in row-major order at address 0, x at 4096, y at 4224); for…
- A direct-mapped cache has a 1-cycle hit time, a 4% miss rate and a 40-cycle miss penalty on a 1.0 ns clock. A 2-way version also hits in 1…
- An interrupt is recognised only at instruction boundaries. The longest instruction takes 30 cycles; on average an interrupt arrives…