IP Library Granted Patent US 7,469,320
Granted Patent B2
US 7,469,320 · App. 11/417,078 · Granted Dec 23, 2008

Adaptive replacement cache

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,469,320
App. No.
11/417,078
Granted
Dec 23, 2008
Kind
B2
Abstract

A method for caching a block, which includes receiving a request to store the block in a cache and determining whether the cache is able to expand. If the cache is not able to expand, then determining whether evictable blocks are present in the cache and, if evictable blocks are present in the cache determining whether a total size of the evictable blocks is greater than or equal to a size of the block, evicting a sufficient number of the evictable blocks from the cache and storing the block in the cache, if the total size of the evictable blocks is greater than or equal to the size of the block, and activating a cache throttle, if the total size of the evictable blocks is less than the size of the block.

Claims (35)

1. A method for caching a block, comprising:

receiving a request to store the block in a cache, wherein the cache is structured to comprise a most recently used (MRU) portion and a most frequently used (MFU) portion, wherein the MRU portion comprises a first evictable list and a first non-evictable list, and the MFU portion comprises a second evictable list and a second non-evictable list, wherein the first and second evictable lists are linked lists that store blocks that have no active references and the first and second non-evictable lists are linked lists that store blocks that have at least one active reference;

determining whether the cache is able to expand;

if the cache is able to expand:

expanding the cache at runtime to obtain an expanded cache, wherein expanding the cache comprises increasing the size of the cache, and

storing the block in the expanded cache;

if the cache is not able to expand:

determining whether evictable blocks are present in the cache;

if evictable blocks are present in the cache:

determining whether a total size of the evictable blocks is greater than or equal to a size of the block;

evicting a sufficient number of the evictable blocks from the cache and storing the block in the cache, if the total size of the evictable blocks is greater than or equal to the size of the block; and

activating a cache throttle, if the total size of the evictable blocks is less than the size of the block.

2. The method of claim 1 , wherein blocks in each of the linked lists are organized from newest to oldest.

3. The method of claim 1 , wherein the cache supports multiple block sizes.

4. The method of claim 1 , wherein determining whether to expand the cache comprises determining whether a memory state of a system in which the cache resides is low.

5. The method of claim 1 , wherein evicting the sufficient number of the evictable blocks from the cache comprises:

evicting evictable blocks in the MRU portion of the cache; and

evicting evictable blocks in the MFU portion of the cache only if the sufficient number of evictable blocks is not present in the MRU.

6. A system, comprising:

a cache structured to comprise a most recently used (MRU) portion and a most frequently used (MFU) portion, wherein the MRU portion comprises a first evictable list and a first non-evictable list, and the MFU portion comprises a second evictable list and a second non-evictable list, wherein the first and second evictable lists are linked lists that store blocks that have no active references and the first and second non-evictable lists are linked lists that store blocks that have at least one active reference,

wherein the cache is configured to:

receive a request to store a block;

determine whether the cache is able to expand;

if the cache is able to expand:

expand the cache at runtime to obtain an expanded cache, wherein expanding the cache comprises increasing the size of the cache, and

store the block in the expanded cache;

if the cache is not able to expand:

determine whether evictable blocks are present in the cache;

if evictable blocks are present in the cache:

determine whether a total size of the evictable blocks is greater than or equal to a size of the block;

evict a sufficient number of the evictable blocks from the cache and store the block in the cache, if the total size of the evictable blocks is greater than or equal to the size of the block; and

activate a cache throttle, if the total size of the evictable blocks is less than the size of the block.

7. The system of claim 6 , wherein the blocks in each of the linked lists are organized from newest to oldest.

8. The system of claim 6 , wherein a size of the block is within a range of 512 bytes and 128 K.

9. The system of claim 6 , wherein determining whether to expand the cache comprises determining whether a memory state of a system in which the cache resides is low.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037303/0926 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 3, 2006
From: BONWICK, JEFFERY S.; MOORE, WILLIAM H.; MAYBEE, MARK J.; AHRENS, MATTHEW A.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 017862/0269 →