As a typical example of cache size a system having 1

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: word in the cache memory and helps in further improving the processor speed. Many computer systems are also designed to have multiple levels of caches (such as level one and level two caches, often referred to as LI and L2 caches). LI cache is smaller than L2 cache and is used to store more frequently accessed instructions/data as compared to those in the L2 cache. The use of cache memory requires several design issues to be addressed. A detailed discussion of cache design is beyond the scope of this book. Key design issues are briefly summarized below. 1. Cache size. Cache memory is very expensive as compared to the main memory and hence its size is normally kept very small. It has been found through statistical studies that reasonably small caches can have a significant impact on processor performance. Hence cache memory size is usually decided based on statistical studies of program behavior and is chosen so that the probability of the needed instruction/data being in the cache is more than 90%. As a typical example of cache size, a system having 1 GB of main memory may have about 1 MB of cache memory. Many of today's personal computers have 64 KB, 128 KB, 256 KB, 512 KB, or 1 MB of cache memory. 2. Block size. Block size refers to the unit of data (few memory words) exchanged between cache and main memory. As the block size increases from very small to larger sizes, the hit ratio (fraction of time that referenced instruction/data is found in cache) will at first increase because of the principle of locality since more and more useful words are brought into the cache. However, the hit ratio will begin to decrease as the block size further increases because the probability of using the newly fetched words becomes less than the probability of reusing the words that must be moved out of the cache to make room for the new block. Based on this fact, the block size is suitably chosen to maximize the hit ratio. 3. Replacement policy. When a new block is to be fetched into the cache, another may have to be repl...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online