Question: Cache line 0 is mapped to A and E blocks of main memory. Cache line 1 is mapped to B and F blocks of main

Cache line 0 is mapped to A and E blocks of main memory. Cache line 1 is mapped to B and F blocks of main memory. Cache line 2 is mapped to C and G blocks of main memory. Cache line 3 is mapped to D and H blocks of main memory. Now initially the cache is empty, and memory access sequence is given. Now we can have two cases:

1. The accessed block is in the cache: Then it is a hit and you need not to do anything. 2. The accessed block is not in the cache: Then it is a miss and you need to replace mapped cache line with the accessed block.

Now the chart can be completed as:

Cache line 0 is mapped to A and E blocks of main

Total hits=25

Total memory accesses=40

Hit Ratio=25/40=5/8 = 0.625

answer from question 1 above:

memory. Cache line 1 is mapped to B and F blocks of

main memory. Cache line 2 is mapped to C and G blocks

2 Di+ 2 For this same computer system, if choose associative mapping. Please construct the similar diagram as Question 1 to calculate the hit ratio for the following block replacement strategies. (1) LRU (Least Recent Used). [5 (2) First-in-first-out (FIFO). [5 (3) Least Frequently Used (LFU). [5 Again, for the same computer system, if choose 2-way set associative mapping. Please construct the similar diagram as Question 1 and 2 to calculate the hit ratio for the following block replacement strategies: (1) LRU [5: (2) FIFO [5; (3) LFU 5 (4) What's the design decision after comparing the results of Question 1 to 3. 5 2 Di+ 2 For this same computer system, if choose associative mapping. Please construct the similar diagram as Question 1 to calculate the hit ratio for the following block replacement strategies. (1) LRU (Least Recent Used). [5 (2) First-in-first-out (FIFO). [5 (3) Least Frequently Used (LFU). [5 Again, for the same computer system, if choose 2-way set associative mapping. Please construct the similar diagram as Question 1 and 2 to calculate the hit ratio for the following block replacement strategies: (1) LRU [5: (2) FIFO [5; (3) LFU 5 (4) What's the design decision after comparing the results of Question 1 to 3. 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!