subject

You have a 1,024-byte direct-mapped data cache with 16-byte blocks. A structure is defined as: 1 struct my_struct { 2 int x; 3 int y; }; 6 struct my_struct grid[16][8]; 7 int total_x = 0, total_y = 0; 8 int i, j; Determine the cache performance for the following code: 1 for (i = 0; i < 16; i++) { 2 for (j = 0; j < 8; j++) { 3 total_x += grid[i][j].x; 4 } 5 } 7 for (i = 0; i < 16; i++) { 8 for (j = 0; j < 8; j++) { 9 total_y += grid[i][j].y; 10 } 11 } a) What is the total number of reads? b) What is the total number of reads that miss in the cache? c) What is the miss rate? d) How to modify the program to decrease the miss rate. Show the new miss rate you get. Assume: sizeof(int)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
question
Computers and Technology, 24.06.2019 13:10
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): ‘what is your name? ’ “josh” ‘, josh. what is your favorite color? ’ “green” ‘mine too. do you also like ice cream? ’ “no” ‘josh, how old are you? ’ “40” ‘ and how many siblings do you have? ’’ “3” ‘that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
Answers: 3
You know the right answer?
You have a 1,024-byte direct-mapped data cache with 16-byte blocks. A structure is defined as: 1 str...
Questions
question
Mathematics, 08.09.2021 03:30
question
Mathematics, 08.09.2021 03:30
question
Mathematics, 08.09.2021 03:30
question
Mathematics, 08.09.2021 03:30
question
Mathematics, 08.09.2021 03:30
question
History, 08.09.2021 03:30
question
Mathematics, 08.09.2021 03:30