Question: Consider a 64-bit computer with a simplified memory hierarchy. This hierarchy contains a single cache and an unbounded backing memory. The cache has the following

Consider a 64-bit computer with a simplified memory hierarchy. This hierarchy contains a single cache and an unbounded backing memory. The cache has the following characteristics: Direct-Mapped, Write-through, Write allocate. Cache blocks are 4 words each. The cache has 256 sets.

(a) Calculate the caches size in bytes.

(b) Consider the following code fragment in the C programming language to be run on the described computer. Assume that: program instructions are not stored in cache, arrays are cache-aligned (the beginning of the array aligns with the beginning of a cache line), ints are 32 bits, and all other variables are stored only in registers.

int N = 32768; int A[N]; for (int i = 0; i < N; i += 2) { A[i] = A[i+1]; }

Determine the following: (i) The number of cache misses. (ii) The cache miss rate. (iii) The type of cache misses which occur.

(c) Consider the following code fragment in the C programming language to be run on the described computer. Assume that: program instructions are not stored in cache, arrays are cache-aligned (the beginning of the array aligns with the beginning of a cache line), ints are 32 bits, and all other variables are stored only in registers.

int N = 32768; int A[N]; int B[N]; for (int i = 0; i < N; ++i) { B[i] = A[i]; }

Determine the following: (i) The number of cache misses. (ii) The cache miss rate. (iii) The type of cache misses which occur.

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 Databases Questions!