GATE Computer ScienceVery hardGATE CS (PYQ pattern)
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 set-associative with LRU, (iii) fully associative with LRU. How many hits does each get, written as (i, ii, iii)?
- A. (0, 1, 6)
- B. (1, 1, 6)
- C. (6, 1, 0)
- D. (0, 6, 1)
Correct answer: A. (0, 1, 6)
All of 0,4,8,12 are multiples of 4, so they fight for one line in (i) and one 2-line set in (ii); in (iii) they share all 4 lines. Simulating: (i) never hits because consecutive references differ, (ii) hits once, (iii) hits 6 times.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- 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…
- Physical memory is 2 GB, virtual address space 2⁴⁸ bytes, pages 16 KB, and each PTE stores the frame number plus 6 control bits, rounded…
- A program of 10⁹ instructions runs on a 2 GHz machine. 30% of instructions take 1 cycle, 50% take 2 cycles and 20% take 5 cycles. The…
- A processor has base CPI 1.2 for non-memory work (60% of instructions) and every load/store (40% of instructions) takes 1 cycle plus…
- A device delivers 2,000,000 bytes/s into a 16-byte FIFO and raises an interrupt each time 12 bytes have accumulated. Each interrupt costs…
- 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…