Consider a 2-way set associative cache organization with the capacity of 8 block
ID: 3850139 • Letter: C
Question
Consider a 2-way set associative cache organization with the capacity of 8 blocks. Assume Write-Allocate and Write-back are used. Further, assume that the replacement algorithm is LRU. Show the content of the cache and the content of the memory locations for each block after each access. If an entry is left blank in the memory portion, it is assumed that the value of the entry will be the block that occupied the entry most recently. For the cache portion, show both entries for any access to a set (read or write) - if no access is made to a set, the most recent values are assumed (so no need to repeat the entry) As a notation, for each access, the word Read/Write followed by a number indicates the type of access for that block number. For example, Read 5 indicates that the cache needs to read a word within block 5. As a further notation, a modification (write) to a block is indicated by superscripting it with the prime character. For example, the first modification to block 5 is indicated as 5’, the second as 5”, etc.
Explanation / Answer
Number of sets in cache = v. So, main memory block j will be mapped to set (j mod v), which will be any one of the cache lines from (j mod v) * k to (j mod v) * k + (k-1). (Associativity plays no role in mapping- k-way associativity means there are k spaces for a block and hence reduces the chances of replacement.)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.