GATE CS 2026 Set 2 | Question 52
Computer Organization & Architecture › Memory Hierarchy · MSQ · 2 marks · Answer: A, B
- Question 52Computer Organization & Architecturemsq2 marksConsider a system with a processor and a 4 KB direct mapped cache with block size of 16 bytes. The system has 16 MB physical memory. Four words P, Q, R, S are accessed in the order P, Q, R, S repeated 10 times (40 references total). The cache is initially empty (1 word = 1 byte). Addresses: P: 0x845B32, Q: 0x845B26, R: 0x845B36, S: 0x846B32. Which of the following statements is/are true? Note: , .
- A.Every access to P results in a cache miss✓
- B.Every access to R results in a cache hit✓
- C.Every access to Q results in a cache miss
- D.Except the first access to S, all subsequent accesses to S result in cache hits
Answer: A, B
Solution
Answer: (A), (B) Cache: 4 KB / 16 B lines → 8 index bits; block offset bits. So bits select the line. Lower bits of the addresses: P, R → same block (), so R loads P's block. S differs only above the index/offset region but maps to the same line as P/R, evicting them. Each round P and S map to the same line and keep evicting each other, so every P is a miss (A ✓). R shares P's block and, within a round, is fetched right after P with no intervening eviction, so R is always a hit (B ✓). Q maps to a different line and, after the first round, hits (so (C) 'every Q is a miss' is false). S collides with P/R and is evicted before its next use, so S is not always a hit (D false). - A.
More GATE PYQ on Memory Hierarchy
All GATE CS Computer Organization & Architecture PYQ →Attempt GATE CS 2026 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →