Ask Question
6 May, 20:01

Suppose we have an 8 block cache. Each block of the cache is one word wide. When a given program is executed, the processor reads data from the decimal addresses show below. 4, 7, 10, 11, 4, 8, 12, 7 Show the contents of the cache at the end of the above reading operations if the cache is 4-way set associative. Assume blocks will be filled starting at block position zero and the replacement policy is LRU. Use 4 or [ 4 ] to represent the contents of memory at address 4. If the block is empty, enter [ empty ]. Set # Block Position Contents of Data Cache 0 0 1 2 3 1 0 1 2 3

+4
Answers (1)
  1. 6 May, 22:54
    0
    The set for block position contents of data cache 0 0 1 2 3 1 0 1 2 3 is as follows:

    Explanation:

    Total number of blocks = 8

    The cache mapping used is 4 way set associative.

    Number of sets = 8 by 4 = 2 that is set 0 and set 1.

    The mapping in a set associative takes place as:

    Location for a memory block in cache = Memory block mod number of sets in the cache.

    The first address is 4.

    Location of the block with address 4 = 4 mod 2 = Set 0.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose we have an 8 block cache. Each block of the cache is one word wide. When a given program is executed, the processor reads data from ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers