Direct Mapping: Each Word in Cache Consists of The Data Word and It Associated Tag
Direct Mapping: Each Word in Cache Consists of The Data Word and It Associated Tag
Each word in cache consists of the data word and it associated tag.
When a new word is brought into cache, the tag bits store along
data
The tag field of the CPU address is equal to tag in the word from
cache; there is a hit, otherwise miss.
Set – Associative Mapping
Each tag requires 6 bits & each data word has 12 bits, so the word
length is 2(6+12) =36 bits
When the CPU generates a memory request, the index value of the
address is used to access the cache.
The tag field of the CPU address is compared with both tags in the
cache.
· Random replacement
· FIFO
· Least Recently Used (LRU)
The algorithm to remove and place new contents into the cache is
called _______
a) Replacement algorithm
b) Renewal algorithm
c) Updation
d) None of the mentioned
Writing into cache
there are two writing methods that the system can proceed.
This method has the advantage that main memory always contains the
same data as the cache.
Write-back method
In this method only the cache location is updated during a write operation.
The location is then marked by a flag so that later when the word is
removed from the cache it is copied into main memory.
The reason for the write-back method is that during the time a word resides
in the cache, it may be updated several times.
The correspondence between the main memory blocks and those in the
cache is given by _________
a) Hash function
b) Mapping function
c) Locale function
d) Assign function
The write-through procedure is used ________