The Gateway to Computer Science Excellence
+16 votes

I want to clearly understand the difference between compulsory miss, conflict miss and capacity miss
what I understood is
compulsory miss: when a block of main memory is trying to occupy fresh empty line of cache, it is called compulsory miss
conflict miss: when still there are empty lines in the cache, block of main memory is conflicting with the already filled line of cache, ie., even when empty place is available, block is trying to occupy already filled line. its called conflict miss
capacity miss: miss occured when all lines of cache are filled.
conflict miss occurs only in direct mapped cache and set-associative cache. Because in associative mapping, no block of main memory tries to occupy already filled line.
is this correct?

in CO and Architecture by Boss (12k points)
retagged by | 9.5k views
then what is the problem it is absolutely right .
just wanted to make sure :)
Suppose there is a Direct Mapped cache. All the blocks are full. Now if a new block from main memory, that is not present in the cache, is mapped to some block in the cache; it will be a miss. So this is a Conflict miss and NOT a Capacity miss? If so, can we conclude that Capacity miss CANNOT occur in Direct Mapped cache?
I think your definition of compulsory miss is not right. see this :-

1 Answer

+6 votes

Compulsory miss is not when a block occupies a fresh line, it is when a fresh block that was never given access in Cache before appears.

by (125 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,479 answers
100,553 users