The direct mapping scheme assigns every main memory address to a data block alon g with a block offset

. Every cache block here is given to be of 64 bytes. The cache is accessed one blo ck at a time, that is 64 contiguous addresses per access. An array is a contiguous set of memory address sequence. There are 2500 contiguo us bytes in the given array. For all the array elements to be accessed during first pass number of blocks fet ched into cache ( cache miss count ) will be Ceiling(2500 / 64) = 40. It is to be observed that as the number of lines in the cache is 32 only, so it can hold 32 blocks at a time. The simple direct mapping scheme does not have any sophisticated cache block rep lacement policy. So we can assume FIFO as the replacement policy here. So the subsequent data blocks that come after 32 have a 'wrapping up effect' or a 'modulo division effect', in the process overwriting the earlier data. Thus during the first access consecutive 40 cache miss occur. During the second pass of the array access: a. the first 8 blocks miss. b. next 24 blocks hit as they are available from earlier pass. c. again the last 6 block

Sign up to vote on this title
UsefulNot useful