Question: Consider the case of a two - dimensional 4 4 array A . Assume that each number in the array occupies one word and that

Consider the case of a two-dimensional 44 array A. Assume that each number in the array occupies one word and that the array elements are stored row-major order in the main memory from location 1000 to location 1015. The cache consists of four blocks each consisting of just two words. Assume also that whenever needed, FIFO replacement policy is used. We would like to examine the changes in the cache as the following code:
for i :=0 to 3 do
sum :=0
for j :=0 to 3 do
sum := sum + a(i,j)
end for
ave(i) := sum/8
end for
Select all that apply:
Question 2 options:
Assuming direct mapping and the cache memory access time is 10 ns and that the memory access time is 100 ns, the average access timeper element of the array A is roughly equal to (10+100) ns.
Assuming direct mapping and the cache memory access time is 10 ns and that the memory access time is 100 ns, the average access timeper element of the array A is larger than ((8*10)+(6*100))/14 ns.
Assuming direct mapping and the cache memory access time is 10 ns and that the memory access time is 100 ns, the average access timeper element of the array A is roughly equal to ((8*10)+(8*110))/16 ns.
Assuming direct mapping and the cache memory access time is 10 ns and that the memory access time is 100 ns, the average access timeper element of the array A is less than (10+100) ns.
Assuming direct mapping and the cache memory access time is 10 ns and that the memory access time is 100 ns, the average access timeper element of the array A is roughly equal to ((10*10)+(6*110))/12 ns.
Assuming direct mapping and the cache memory access time is 10 ns and that the memory access time is 100 ns, the average access timeper element of the array A is roughly equal to ((6*10)+(10*110))/8 ns.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!