A system, method and computer program product for executing a cache
replacement algorithm. A system includes a computer processor having an
instruction processor, a cache and one or more useful indicators. The
instruction processor processes instructions in a running program. The
cache includes two or more cache levels including a level one (L1) cache
level and one or more higher cache levels. Each cache level includes one
or more cache lines and has an associated directory having one or more
directory entries. A useful indicator is located within one or more of
the directory entries and is associated with a particular cache line. The
useful indicator is set to provide an indication that the associated
cache line contains one or more instructions that are required by the
running program and cleared to provide lack of such an indication.