Question: h - is - problem tests given the f 1 1 . your ability to pr d . o owmg code to analyze: e ict
hisproblem tests
given the f
your ability to pr do owmg code to analyze: e ict the cache behavior of C
co
d
e
Youti
mt
X
int
i
Homework Problems
int
sum
O;
for
i
O;
i
;
i
sum x O
i
X
i;
Assume we execute this under the follow
ct
mg con ttons:
sizeofint
Array x begins at memory address
OxO
and is stored in rowmajor order.
In each case below, the cache
is
initially empty.
The only
~emory
accesses are to the entries of thy array x All other variables
are stored m registers.
;
i
Given these assumptions, estimate the miss rates for the following cases:
A Case
:
Assue the cache is bytes, directmapped, with byte cache
blocks.
What
s
the miss rate?B
Case
:
What
is the miss rate if we double the cache size to bytes?
C
Case : Now assume the cache is bytes, twoway set associative using
an
LRU
replacement policy, with byte cache blocks. What
is
the cache
miss rate?
D For case will a larger cache size help to reduce the miss rate? Why
or
why not?
E For case will a larger block size help to reduce the miss rate? Why
or
why
not?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
