Question: 2 . Assume the data cache has space for only eight blocks of data, where block consists of only one 1 6 - bit word
Assume the data cache has space for only eight blocks of data, where block consists of
only one bit word of data and main memory is word addressable with bit
addresses. Assume that a x array of numbers called A each occupying one word,
is stored in memory location A through Ahex The elements of array A are
stored in row major order. Now consider the following pseudo code to compute the
average of the elements in the first row and divide each element of first row by that
average.
SUM
for j to do
SUM SUM A j
end
AVE SUM
For i down to do
A iA iAVE
End
i Show the content of cache after each pass if an associative mapped cache is used that
uses LRU replacement algorithm. Assume that cache is initially empty. Find the
number of bits required for each of the TAG, BLOCK and WORD fields.
ii Repeat part i for a four way set associative cache. Find the number of bits required
for each of the TAG, SET and WORD fields.
Calculate hit and miss ratio for i and ii
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
