Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On the vertical axis is the number of cycles for one memory read instruction. The horizontal axis is the size of the test array in

On the vertical axis is the number of cycles for one memory read instruction. The horizontal axis is the size
of the test array in bytes.
How many levels of caching is used by computer A and how large are these caches?
How many levels of caching is used by computer B and how large are these caches?B. Now consider the following two implementations of a horizontal flip and copy of the matrix. Again
assume that the src matrix starts at address 0 and that the dest matrix follows immediately follows it.
void copy_n_flip_matrix1(int dest[ROWS][COLS], int src[ROWS][COLS])
{
int i, j;
for ROWS; i++
for COLS ;j++
dest[i][COLS-1-j]=src[i][j];
}
}
}
What is the cache miss rate if ROWS =128 and COLS =128?
Miss rate =
%
What is the cache miss rate if ROWS =128 and COLS =192?
Miss rate =
%
void copy_n_flip_matrix2(int dest[ROWS][COLS], int src[ROWS][COLS])
{
int i, j;
for COLS ;j++
for ROWS; i++
dest[i][COLS-1-j]=src[i][j];
}
}
}
What is the cache miss rate if ROWS =128 and COLS =128?
Miss rate =
%
What is the cache miss rate if ROWS =192 and COLS =128?
Miss rate =Problem 5.(8 points):
A. You are given the following loop:
for
prod=prod**vec[i];
}
That compiles into the following assembly code:
mov1 $0x1,%eax
mov1 $0x0,%esi
. L2 :
imul Oxfffffde8(%ebp, %esi, 4),%eax
inc1%esi
cmp1 $0x80,%esi
j1. L2
Calculate the CPE (cycles per element) of this loop assuming 4 cycles for a multiply instruction, 3
cycles for a memory load, and 1 cycle for all other instructions. The processor is fully pipelined, and
can issue multiple instructions every cycle. For simplicity, assume there is an unbounded number of
functional units. Also assume that the processor makes no branch mispredictions.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

5.3 Explain internal recruitment methods.

Answered: 1 week ago