A method for selecting a line to replace in an inclusive set-associative cache
memory system which is based on a least recently used replacement policy but is
enhanced to detect and give special treatment to the reloading of a line that has
been recently cast out. A line which has been reloaded after having been recently
cast out is assigned a special encoding which temporarily gives priority to the
line in the cache so that it will not be selected for replacement in the usual
least recently used replacement process. This method of line selection for replacement
improves system performance by providing better hit rates in the cache hierarchy
levels above, by ensuring that heavily used lines in the levels above are not aged
out of the levels below due to lack of use.