subject
Computers and Technology, 07.06.2021 05:10 jay8849

You have a direct mapped cache containing 128 bytes with a cache block size of 32 bytes. The cache uses LRU replacement and write-allocate and write-back policies. Assume i and j are stored in registers, and that the array happy starts at address 0x0. Give the hit rate (as a fraction or a%) for the following two loops. Assume the cache starts out empty. #define LEAP 4 #define SIZE 64 int happy[SIZE] ; // Assume happy has been initialized to contain values. // Assume the cache starts empty at this point. for (int i = 0; i < SIZE; i += LEAP) { 11 Loop 1 happy[i] = happy[i] + i * (i + 2); } for (int j = 1; j < SIZE; j += (LEAP * 2)) { // Loop 2 happy[j] = happy[j] + j * 5; } Hit Rate for Loop 1: Hit Rate for Loop 2: b) [8 pts] For each of the changes proposed below, indicate how it would affect the hit rate of each loop above in part c) assuming that all other factors remained the same as they were in the original problem. Circle one of: "increase", "no change", or "decrease" for each loop. Loop 1: increase / no change / decrease Change associativity from direct mapped to two-way: Loop 2: increase / no change 1 decrease Loop 1: increase Change LEAP from 4 to 8: / no change / decrease Loop 2: increase / no change 1 decrease Loop 1: increase / no change / decrease Change cache size from 128 bytes to 256 bytes: Loop 2: increase / no change 1 decrease Loop 1: increase / no change 1 decrease Change block size from 32 bytes to 16 bytes: Loop 2: increase / no change / decrease

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
The output voltage of a power supply is assumed to be normally distributed. sixteen observations are taken at random on voltage are as follows: 10.35, 9.30, 10.00, 9.96, 11.65, 12.00, 11.25, 9.58, 11.54, 9.95, 10.28, 8.37, 10.44, 9.25, 9.38, and 10.85
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
You have a direct mapped cache containing 128 bytes with a cache block size of 32 bytes. The cache u...
Questions
question
Chemistry, 21.01.2021 04:00
question
Mathematics, 21.01.2021 04:00
question
Mathematics, 21.01.2021 04:00
question
History, 21.01.2021 04:00
question
Biology, 21.01.2021 04:00
question
Mathematics, 21.01.2021 04:00
question
Mathematics, 21.01.2021 04:00
question
Mathematics, 21.01.2021 04:00
question
English, 21.01.2021 04:00