Question: Write a simple C program for which a 4 - way associative cache has a significantly lower miss rate than an equally sized 2 -
Write a simple C program for which a way associative cache has a significantly lower miss rate than an equally sized way set associative cache. It will be easiest if you use blockSizec as a starting point. You may choose any cache size and block size you wish, but they must remain the same for the entire problem.
Hints for writing programs with a specified cache behavior:
You need not loop through the entire array. Instead, find addresses that collide in the cache. Remove the inner loop and make NUMLOOPS Notice in blockSizec that array is an array of characters; therefore, each item in the array is exactly byte. As a result, it is easy to identify data items that will or will not conflict in the cache. For example, in an KB directmapped cache, array bytes and will conflict. This is basically a pencilandpaper problem that we happen to be using a cache simulator to verify.Write the simplest program you can that will produce a miss rate for the way cache.
Submit the source code, all cache parameters, and resulting hit rates.
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
