GATE CS 2022 | Question 54

Computer Organization & Architecture › Memory Hierarchy · MSQ · 2 marks · Answer: A, B, D

  1. Question 54Computer Organization & Architecturemsq2 marks
    A 2 KB direct-mapped data cache with 64-byte blocks, 64 KB physical address space, 16-bit words. Words P,Q,R,S are accessed as PQRSPQRS... (40 accesses). Addresses: P=0xA248, Q=0xC28A, R=0xCA8A, S=0xA262. Which statements are TRUE?
    • A.
      Every access to S is a hit.
      ✓
    • B.
      Once P is brought to the cache it is never evicted.
      ✓
    • C.
      At the end only R and S reside in the cache.
    • D.
      Every access to R evicts Q from the cache.
      ✓

    Answer: A, B, D

    Solution

    Answer: (A), (B) and (D) sets (offset 6 bits, index 5 bits). Computing the set index of each address: P (0xA248) and S (0xA262) map to the SAME set and the same 64-byte block; Q (0xC28A) and R (0xCA8A) map to the same set but DIFFERENT blocks (so they conflict). - (A) S shares P's block, so after P is loaded every access to S hits. TRUE. - (B) Only P/S map to P's set with no conflicting block, so P is never evicted. TRUE. - (C) FALSE: P's block stays resident, so it is not "only R and S". - (D) Q and R thrash the same set, so each R access evicts Q. TRUE.

More GATE PYQ on Memory Hierarchy

All GATE CS Computer Organization & Architecture PYQ →

Attempt GATE CS 2022 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →