Question: It's 1 9 8 7 and Apple has just released the Macintosh II featuring a Motorola 6 8 0 3 0 processor. The 6 8
It's and Apple has just released the Macintosh II featuring a Motorola processor. The contains a state of the art byte datacache and uses byteaddressable memory. Having taken you know there's more to cache design than just size, so you write a C program to help you determine the block size, number of blocks per set, and number of sets in the cache. You have a function ACCESSchar that loads the memory at the given pointer. Assume all variables other than the data array are stored in registers and that the cache has been cleared before each call to missrate Assume data is at the start of the cache block.
#define CACHESIZE XX
double missrateint stride
char dataCACHESIZE ; note array is cache size
for int i ; i stride; i
for int j i; j CACHESIZE ; j stride
ACCESSdata j
In order to test your code, you first run it on a B fullyassociative cache with B blocks. You set the CACHESIZE macro to Fill in the miss rate for each stride in the following table. Only answers in the table will be graded. Fractions are OK You now run your program on the Motorola processor with a byte datacache. You set the CACHESIZE macro to and collect the following data
Using the above data answer the following questions and justify your answers.
What is the block size in bytes?
What is the associativity of the cache?
How many sets are there in the cache?
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
