Consider the following code that accesses three values in memory scalar integers x and s, and an

Question:

Consider the following code that accesses three values in memory scalar integers x and s, and an integer vector y[i]. What is the memory latency in clock cycles for a trip round the loop ( after the first iteration)? Assume that the array is not cached and each new access to the array results in a miss. 

The system has both Ll and L2 caches. The access time of the Ll cache is two cycles, the access time of the L2 cache is 6 cycles and main memory has an access time of 50 cycles. In this case all memory and cache memory accesses take place in parallel. 

for (i = 0; i < 100; i++) { X = y [i]; S = S + X; }

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: