Question: please solve it using c++ A computer has a L1 cache, L2 cache, main memory, and a disk used for virtual memory. Suppose the computer

please solve it using c++
A computer has a L1 cache, L2 cache, main memory, and a disk used for virtual memory. Suppose the computer uses a cache inclusive strategy and CPU can access data only through L1 cache. If a referenced word is in the L1 cache, 10 ns are required to access it. If it is in L2 cache but not in L1 cache, 20 ns are needed to load it into the L1 cache, and then the reference is started again. If it is in main memory but not in L1 or L2 cache, 80 ns are needed to load it into L2 cache, 20 ns to load it into the L1 cache, and then the reference is started again. If the word is not in main memory, 10 ms are required to fetch the word from the disk, followed by 80 ns to copy it to L2 cache, 20 ns to load it into the L1 cache, and then the reference is started again. The L1 cache hit ratio is 0.9, L2 cache hit ratio is 0.7, and the main memory hit ratio is ((K modulo 5)+2)*0.1, where K is the SECOND last digit of your student number? (2 +5 points) a. What is the main memory hit ratio? Write the equation to compute the average access time for the above computer. b. What is the average time in nanoseconds required to access a referenced word on this system
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
