Replacement Policy; Updating Main Memory; Updating Main Memory - Intel Embedded Intel486 Hardware Reference Manual

Embedded intel486 processor
Table of Contents

Advertisement

CACHE SUBSYSTEM
This situation applies when using page mode accesses in dynamic RAM; and the initial word is
read after the normal access time, whereas subsequent words can be accessed quickly by chang-
ing only the column addresses. Taking advantage of this situation while selecting the optimum
line size can greatly increase cache performance.
6.3.4

Replacement Policy

In a set-associative cache configuration, a replacement policy is needed to determine which set
should receive new data when the cache is updated. There are four common approaches for
choosing which block (or single word) within a set is be overwritten. These are the least recently
used (LRU) method, the pseudo LRU method, the first-in first-out (FIFO) method, and the ran-
dom method.
In the LRU method, the set that was least recently accessed is overwritten. The control logic must
maintain least recently used bits and must examine the bits before an update occurs. In the pseudo
LRU method, the set that was assumed to be the least recently accessed is overwritten. In the
FIFO method, the cache overwrites the block that is resident for the longest time. In the random
method, the cache arbitrarily replaces a block. The performance of the algorithms depends on the
program behavior. The LRU method is preferred because it provides the best hit rate.
6.4

UPDATING MAIN MEMORY

When the processor executes instructions that modify the contents of the cache, changes have to
be made in the main memory as well; otherwise, the cache is only a temporary buffer and it is
possible for data inconsistencies to arise between the main memory and the cache. If only one of
the cache or the main memory is altered and the other is not, two different sets of data become
associated with the same address. A potential situation of incorrect or stale data is shown in
Fig-
ure
6-6. There are two general approaches to updating the main memory. The first is the write-
through method; and the second is the write-back, also known as copy-back method. Memory
traffic issues are discussed for both methods.
6-11

Advertisement

Table of Contents
loading

Table of Contents