Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose in a hypothetical computer, the main memory contains 8 blocks, de- noted by alphabetic characters A - H according to the order of their
Suppose in a hypothetical computer, the main memory contains 8 blocks, de- noted by alphabetic characters A - H according to the order of their addresses. The cache contains 4 lines, numbered as 0, 1, 2 and 3. To design the cache mapping mechanism and cache replacement algorithm, we use a special program for test. The sequence of memory access (to the blocks) for this program is as: ADDCCBABEF AADDCFACDD E H B BDBECBB EDBBDGHDBC If this system use direct mapping, we know that blocks A and E in the main memory are mapped to line 0 in the cache, blocks B and F to line 1, blocks C and G to line 2, and blocks D and H to line 3. Follow the idea in Example 4.5.7, please using the following chart to analyze the cache usage (i.e, marking a cache replacement with the alphabetic bloclk number, and marking a hit with +). Then, calculate the hit ratio if choose direct mapping [5. A D D C C B A B E F AA D D C F ACD D 0 3 0 3 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 Suppose in a hypothetical computer, the main memory contains 8 blocks, de- noted by alphabetic characters A - H according to the order of their addresses. The cache contains 4 lines, numbered as 0, 1, 2 and 3. To design the cache mapping mechanism and cache replacement algorithm, we use a special program for test. The sequence of memory access (to the blocks) for this program is as: ADDCCBABEF AADDCFACDD E H B BDBECBB EDBBDGHDBC If this system use direct mapping, we know that blocks A and E in the main memory are mapped to line 0 in the cache, blocks B and F to line 1, blocks C and G to line 2, and blocks D and H to line 3. Follow the idea in Example 4.5.7, please using the following chart to analyze the cache usage (i.e, marking a cache replacement with the alphabetic bloclk number, and marking a hit with +). Then, calculate the hit ratio if choose direct mapping [5. A D D C C B A B E F AA D D C F ACD D 0 3 0 3 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started