Cache Read Write policies(3)
Cache Read Write policies(3)
Read/Write Policies
Presented by:
Dr. Amanpreet Kaur(Sr.)
Assistant Professor
Department of Electronics and Communication Engineering,
Thapar Institute of Engineering and Technology, Patiala
Cache Read operation : How is a block found if it is
in the cache?[1]
Cache Addressing
/
INDEX
Set Index field – is used to locate the desired set in the cache
A Valid bit in the TAG field indicates whether the block is empty or contains some
data.
Block offset is used to locate the data in the respective block identified
Cache Hit – If the address matches and the data block is found in the cache .
Cache Miss- If the cache is empty/ Address does not match / the valid bit is zero for
that address.
Cache Miss and block Replacement [1] :
A Cache miss causes the address from the processor to search for the
same in the next hierarchical level in the memory .
If the cache is empty the block found from the next hierarchical level is
placed in the cache depending upon the placement policy followed .
For a Direct mapped cache the block replacement depends upon the
calculated block number from the formula.
The replacement of any block with the new one depends upon the
replacement policy followed.
Replacement Policy [1]:
Random—To spread allocation uniformly,
candidate blocks are randomly selected.
Write no Allocate :The block is modified in the lower level and not
loaded into the cache.
References :
[1].Computer Architecture: A Quantitative Approach, 2 nd
edition , John L. Hennessy, David A. Patterson