The Gateway to Computer Science Excellence
+16 votes
11.4k views

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
retagged by | 11.4k views
+1
then what is the problem it is absolutely right .
0
just wanted to make sure :)
+1
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?
+2
I think your definition of compulsory miss is not right. see this :-
https://www.quora.com/Can-a-compulsary-miss-and-conflict-miss-occur-simultaneously
0

@srestha

any comment on @mdebdeep.

it ambiguity whether is capacity miss or conflict miss?.

0
no, I havenot got any situation where there is any ambiguity for miss.
0

@srestha

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. 

is this capacity miss or conflict miss?

i think it is capacity miss because.

because for conflict miss there should be space for block but due to implementation(condition) we can't place.

but here all blocks are full .\

 

so whether it is capacity miss or conflict?

0
then it will be compulsary miss. See the below ans.

2 Answers

+7 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
+1 vote

It is not correct. You can see here

https://gatecse.in/cache-misses/

by
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
52,315 questions
60,429 answers
201,762 comments
95,240 users