Question: Consider a machine with two level caches. The Level 1 (L1) cache is of size 16K words with hit time of 1ns. The level
Consider a machine with two level caches. The Level 1 (L1) cache is of size 16K words with hit time of 1ns. The level 2 (L2) cache is of size 8M word with hit time of 6ns. The L1/L2 cache system is not block-based, i.e. when there is a cache miss in L1, the corresponding word (not block) is read from L2. The block size for L2 cache/main memory system is 128 bytes. The main memory can access four 32-bit words in parallel. The access time for the first four words is 60ns, and each subsequent four words require 12ns. Assuming that the cache hit rate for level 1 cache is 65% and that of level 2 cache is 95%. (i) Calculate the miss penalty of the level 2 cache, i.e. the time to move a block from main memory to level 2 cache. (ii) (1) What is the memory access time if the data is in L1 cache. (2) What is the memory access time if the data is in L2 cache but not in L1 cache? (3) What is the memory access time if the data is not in both L1 and L2 cache, but in the main memory? (4) What is the average memory access time, assuming there is no virtual memory in the system. (iii) Consider a programming language that uses column major scheme for storing 2D arrays, i.e. the mapping between the 2D array and the 1D memory is like this: a [0,0] a[1,0] a[0,1] a[1,1] a [n-1,0] a [n-1,1] ... a [0,n-1] a[1,-1] a [n-1,n-1] a[0,0] a[1,0] a[2,0] a[n-1,0] a[0,1] a[1,1] You are writing a program to go through each array element once. Write down the nested for-loop stucture to access the array elements (for example, printing out the value of each element) so as to reduce the memory access time, assuming there is a cache memory in the system. Explain why the memory access time can be reduced. Consider a system with 8 HDDs, each of size 12TB. (i) What is the usable HDD storage if RAID 1 is used. (ii) What is the usable HDD storage if RAID 5 is used. (iii) What is the usable HDD storage if RAID 6 is used. (iv) Write down the reliability of the the above RAID in decreasing order by comparing the number of HDD failures that can be endured.
Step by Step Solution
There are 3 Steps involved in it
The following nested forloop structure can be used to access the array elements in column major scheme for int i 0 i numcols i for int j 0 j numrows j Access the element at row j and column i arrayj n... View full answer
Get step-by-step solutions from verified subject matter experts
