US 7,516,275 B2
Pseudo-LRU virtual counter for a locking cache
Jonathan James DeMent, Austin, Tex. (US); Ronald P. Hall, Cedar Park, Tex. (US); Brian Patrick Hanley, Austin, Tex. (US); and Kevin C. Stelzer, Austin, Tex. (US)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Apr. 25, 2006, as Appl. No. 11/380,140.
Prior Publication US 2007/0250667 A1, Oct. 25, 2007
Int. Cl. G06F 12/00 (2006.01); G06F 13/00 (2006.01); G06F 13/28 (2006.01)
U.S. Cl. 711—128  [711/133; 711/136] 3 Claims
OG exemplary drawing
 
1. A computer implemented method for managing replacement of sets in a locked cache, the computer implemented method comprising:
responsive to a cache access by a program to a set locked in a cache, identifying a side of a binary tree pointed to by a base leaf to form an identified side, wherein a cache access comprises a cache hit or a replacement of a set;
determining whether a number of accesses to the identified side equals a number of sets associated with the program on the identified side, wherein a virtual counter tracks the number of accesses to the identified side;
responsive to the number of accesses to the identified side being equal to the number of sets associated with the identified side, changing a value of the base leaf to point to an opposite side of the binary tree; and
updating a least recently used array using the value of the base leaf.