GATE Computer ScienceHardGATE CS (PYQ pattern)
A fully associative cache of 3 lines (block = one word) sees the block reference string [2, 4, 4, 0, 4, 5, 5, 2, 0, 2, 2, 2, 3, 5, 2, 1]. Let h_LRU, h_FIFO and h_OPT be the numbers of hits under LRU, FIFO and the optimal (Belady) policy. Which triple (h_LRU, h_FIFO, h_OPT) is correct?
- A. (7, 9, 11)
- B. (7, 9, 10)
- C. (9, 7, 10)
- D. (8, 9, 10)
Correct answer: B. (7, 9, 10)
Simulate LRU (evict least recently used), FIFO (evict oldest inserted) and OPT (evict the block used furthest in future); OPT is always ≥ both and LRU and FIFO differ on this trace.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 16-bit instruction has 5-bit address fields. Two-address instructions use a 6-bit opcode; further opcodes are obtained by expanding into…
- The back-edge branch of an inner loop executes the outcome pattern T T T N (three taken, one exit), repeated for 6 consecutive outer…
- A memory system has access time 40 ns and cycle time 60 ns per module. If the addresses are low-order interleaved over 4 such modules and…
- 90% of a program parallelises perfectly, but coordinating p processors adds an overhead of 0.005·p of the single-processor run time, so…
- Three caches with 4 one-word lines each see the word-address trace [0, 4, 0, 8, 4, 0, 12, 4, 0, 8]: (i) direct-mapped, (ii) 2-way…
- A 5-stage pipeline has stage delays 200, 150, 300, 250 and 100 ps and a 25 ps latch overhead per stage. The 300 ps stage is split into two…