Patent ID: 7321954

Claim:
A method for tracking the accessing of lines of an associative cache for selecting a line to be considered a least recently used line (LRU), the method comprising: storing, for each line first data corresponding to each of said lines in an LRU memory array having a common address portion, said first data including a plurality of fields, each of said fields containing a bit identifying a relative age of a cache line in a pair of ways, said first data thereby identifying which way of a pair is a least recently used (LRU) cache line; and storing second data in association with said first data, wherein said second data includes cache line lock information for selectively identifying whether cache lines for any of a plurality of ways are to be prevented from replacement; and processing said first data and not said second data to select a line for replacement when said second data indicates no line is prevented from replacement and processing said first and second data to select a line for replacement when said second data indicates at least one line is prevented from replacement, said processing allowing replacement of only a single line when all lines, are prevented from replacement.