Consider a small 2-way set-associative cache memory, consisting of four…

2007

Consider a small 2-way set-associative cache memory, consisting of four blocks. For choosing the block to be replaced, use the least recently (LRU) scheme. The number of cache misses for the following sequence of block addresses is 8,12,0,12,8

  1. A.

    2

  2. B.

    3

  3. C.

    4

  4. D.

    5

Attempted by 71 students.

Show answer & explanation

Correct answer: C

The cache is 2-way set-associative with 4 blocks, so it has 2 sets.

The block addresses 8, 12, and 0 all map to the same set because each is even.

Accesses: 8 miss, 12 miss, 0 miss and evicts 8 by LRU, 12 hit, 8 miss. Total misses = 4.

Explore the full course: Niacl Ao It Specialist