Computers and Technology

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)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:40, coryowens44
For this assignment you have to write a c program that will take an infix expression as input and display the postfix expression of the input. after converting to the postfix expression, the program should evaluate the expression from the postfix and display the result. what should you submit? write all the code in a single file and upload the .c file. compliance with rules: ucf golden rules apply towards this assignment and submission. assignment rules mentioned in syllabus, are also applied in this submission. the ta and instructor can call any students for explaining any part of the code in order to better assess your authorship and for further clarification if needed. problem: we as humans write math expression in infix notation, e. g. 5 + 2 (the operators are written in-between the operands). in computer's language, however, it is preferred to have the operators on the right side of the operands, ie. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix write a program that takes an "infix" expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % ( example infix expression: (7-3)/(2+2) postfix expression: 7 3 2 2 result: rubric: 1) if code does not compile in eustis server: 0. 2) checking the balance of the parenthesis: 2 points 3) incorrect postfix expression per test case: -2 points 4) correct postfix but incorrect evaluation per test case: -i points 5) handling single digit inputs: maximum 11 points 6) handling two-digit inputs: 100 percent (if pass all test cases)
Answers: 3
image
Computers and Technology, 22.06.2019 21:00, raquelle66
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
image
Computers and Technology, 23.06.2019 09:00, opgbadwolf5
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
image
Computers and Technology, 23.06.2019 23:40, lexiecooley
4. what is the reason for including the following code snippet in the header file animal. h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
Do you know the correct answer?
You have a 1,024-byte direct-mapped data cache with 16-byte blocks. A structure is defined as: 1 str...

Questions in other subjects: