Skip to content
GATEiit

GATE CSE 2017 Session 1 Q61: Conflict misses in a 2-way set-associative 256-block LRU cache, sequence repeated 10 times

Syllabus topic: Memory interfacing and hierarchy: performance and cache memory mapping

Question

Consider a 2-way set associative cache with 256 blocks and uses LRU replacement. Initially the cache is empty. Conflict misses are those misses which occur due to contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks

(0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, 257, 129)

is repeated 10 times. The number of conflict misses experienced by the cache is ______.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 76 (official GATE 2017 final answer key)

Concept used: With 128 sets, blocks 0, 128, 256 all map to set 0 and 1, 129, 257 to set 1; three blocks competing for two ways under LRU cause repeated conflict misses beyond the compulsory ones.

Concept notes

Loading notes…

First step: Map each block to set (block mod 128), simulate the 2-way LRU set for one pass and for a repeated pass, and count misses that are not first-time accesses.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on Memory interfacing and hierarchy: performance and cache memory mapping

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key