This preview shows page 1. Sign up to view the full content.
Unformatted text preview: r data), a check is made to determine if the word is in the cache. If
so, the word is delivered to the CPU from the cache. If not, a block of main memory,
consisting of some fixed number of words including the requested word, is read into the
cache and then the requested word is delivered to the CPU. Because of the feature of
locality of reference, when a block of memory words is fetched into the cache to satisfy a
single memory reference, it is likely that there will soon be references to other words in
that block. That is, the next time the CPU attempts to read a word, it is very likely that it
finds it in the cache and saves the time needed to read the word from main memory. You
might think that the odds of the CPU finding the word it needs in the cache are small, but
it actually does find the word it needs there often enough to improve perceptibly the
performance of a processor. In fact, it has been found in practice that more than 90% of
time, the needed word is available in the cache.
(Slower in speed and larger in size than cache memory)
Block of words including the accessed word
Address of accessed word when the word is not found in the cache
Address of accessed word
As the name implies, cache memory is a memory in hiding (the word "cache" literally
means a hiding place for treasure or stores) and is not addressable by the normal users of
the computer system. Needed instructions/data are transferred automatically between the cache and main memory by the hardware without any programmer intervention. In fact,
the application programmers are unaware of its presence and use.
Figure 7.6 illustrates the general concept of cache memory usage. Actual systems may be
designed to have some variations. For example, many computer systems are designed to
have two separate cache memories called instruction cache and data cache. The
instruction cache is used for storing program instructions and the data cache is used for
storing data. This allows faster identification of availability of accessed...
View Full Document
This document was uploaded on 04/07/2014.
- Spring '14