Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need answer for attached question You execute the following code segment exactly once on a machine with 3 2 - bit integer values.int a
I need answer for attached question You execute the following code segment exactly once on a machine with bit integer values.int a junkaOFFSETc ;
int i j;
for i; i ; i cij bijtextrmatextrmitextrmj;The machine configuration is:
bit integer; bit words; byte addressed on word boundaries.
L data cache: byte block size, direct mapped, no writeallocate, writethrough. Hit time for
clock.
L: byte block size, direct mapped, write allocate, writeback, hit time for L clock to
process miss clocks to access clocks. Memory access time after clocks to discover
that there is an L miss clocks.
Assume:
Array a starts at address and arrays are allocated contiguously. The assembly code
always fetches before on a given iteration.
Physical addresses for data map identically to their virtual addresses.
Machine starts with invalidated caches.
Writing all modified data from the L cache to main memory is done after the code runs and is
included in all answers to the questions.
Only data cache behavior is considered ignore instruction fetching Caches are blocking with no
prefetching of data.
a How many clocks are spent to handle L misses ie give the number of clocks waiting for main
memory beyond whatever clocks would have been required to access cache if there had been hits
Justify your answer.
b How many clocks are spent to handle L misses that are hit in L Justify your answer.
Hint: Layout the arrays in the cache and see how many times they wrap around and see what is the
effect of junka and junkb on the layout of the arrays.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started