# US 11,907,138 B2 · Multimedia compressed frame aware cache replacement policy

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,907,138 B2
- Document ID: US11907138B2
- Status: Granted
- Kind: B2
- Application number: 17/646,690
- Filed: 2021-12-31
- Published: 2023-07-06
- Granted: 2024-02-20
- Earliest claimed: 2021-12-31
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Hiral Nandu; Subbarao Palacharla; George Patsilaras; Alain Artieri; Simon Peter William Booth; Vipul Gandhi; Girish Bhat; Yen-Kuan Wu; Younghoon Kim
- Web page: https://patentgrep.com/patent/US11907138B2

## CPC

- G06F 12/122: of the least frequently used [LFU] type, e.g. with individual count value
- G06F 12/123: with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
- G06F 9/30101: {Special purpose registers}
- G06F 12/127: using additional replacement algorithms
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various embodiments include methods and devices for implementing a criterion aware cache replacement policy by a computing device. Embodiments may include updating a staling counter, writing a value of a local counter to a system cache in association with a location in the system cache for with data, in which the value of the local counter includes a value of the staling counter when (i.e., at the time) the associated data is written to the system cache, and using the value of the local counter of the associated data to determine whether the associated data is stale.

## Claims

### Claim 1

A method for implementing a criterion aware cache replacement policy by a computing device, comprising:
updating a staling counter;
writing a value of a local counter to a system cache in association with a location in the system cache for associated data, wherein the value of the local counter includes a value of the staling counter when the associated data is written to the system cache;
calculating a replacement value using a value of the staling counter and the value of the local counter of the associated data;
determining whether all replacement values for a plurality of associated data in a portion of the system cache are equal to one another; and
determining whether the replacement value exceeds a staling threshold in response to determining that not all of the replacement values for the plurality of associated data in the portion of the system cache are equal to one another, wherein the associated data is determined to be stale in response to determining that the replacement value exceeds the staling threshold.

### Claim 2 (depends on 1)

The method of claim 1, wherein updating the staling counter comprises:
receiving a signal from a client of the computing device configured to indicate whether to update the staling counter;
determining whether to update the staling counter based on the signal; and
updating the staling counter in response to determining to update the staling counter.

### Claim 3 (depends on 2)

The method of claim 2, wherein the signal is a register write command, and wherein:
receiving the signal from the client of the computing device comprises reading a value from a register set by the client; and
determining whether to update the staling counter based on the signal comprises determining whether to update the staling counter based on the value from the register.

### Claim 4 (depends on 3)

The method of claim 3, further comprising setting the value at the register by the client of the computing device based on a time-based criterion.

### Claim 5 (depends on 3)

The method of claim 3, further comprising setting the value at the register by the client of the computing device based on an event based criterion.

### Claim 6 (depends on 1)

The method of claim 1, further comprising receiving a memory write command, wherein writing the value of the local counter to the system cache in association with the location in the system cache for the associated data occurs before updating the staling counter, wherein the associated data is data of the write memory command.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
receiving a memory access command; and
writing data of the memory access command to the system cache at a location for which the replacement value exceeds the staling threshold, wherein the data of the memory access command written to the system cache is the associated data.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving a memory write command;
invalidating data at a location for which the replacement value exceeds the staling threshold; and
writing data of the memory write command to the system cache at a location having the invalidated data, wherein the data of the memory write command written to the system cache is the associated data.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
receiving a memory write access command; and
writing data of the memory write access command to the system cache at a location according to another cache replacement policy in response to determining that no replacement value exceeds the staling threshold.

### Claim 10 (depends on 1)

The method of claim 1, wherein calculating the replacement value using the value of the staling counter and the value of the local counter of the associated data comprises calculating a difference between the value of the staling counter and the value of the local counter.

### Claim 11

A computing device, comprising:
a memory control device configured to:
update a staling counter;
write a value of a local counter to a system cache in association with a location in the system cache for associated data, wherein the value of the local counter includes a value of the staling counter when the associated data is written to the system cache;
calculate a replacement value using a value of the staling counter and the value of the local counter of the associated data;
determine whether all replacement values for a plurality of associated data in a portion of the system cache are equal to one another; and
determine whether the replacement value exceeds a staling threshold in response to determining that not all of the replacement values for the plurality of associated data in the portion of the system cache are equal to one another, wherein the associated data is determined to be stale in response to determining that the replacement value exceeds the staling threshold.

### Claim 12 (depends on 11)

The computing device of claim 11, wherein the memory control device is further configured to update the staling counter by:
receiving a signal from a client of the computing device configured to indicate whether to update the staling counter;
determining whether to update the staling counter based on the signal; and
updating the staling counter in response to determining to update the staling counter.

### Claim 13 (depends on 12)

The computing device of claim 12, wherein:
the signal is a register write command; and
the memory control device is further configured to:
receive the signal from the client of the computing device by reading a value from a register set by the client; and
determine whether to update the staling counter based on the signal by determining whether to update the staling counter based on the value from the register.

### Claim 14 (depends on 13)

The computing device of claim 13, further comprising a client configured to set the value at the register based on a time-based criterion.

### Claim 15 (depends on 13)

The computing device of claim 13, further comprising a client configured to set the value at the register based on an event based criterion.

### Claim 16 (depends on 11)

The computing device of claim 11, wherein the memory control device is further configured to:
receive a memory write command; and
write the value of the local counter to the system cache in association with the location in the system cache for the associated data before updating the staling counter, wherein the associated data is data of the write memory command.

### Claim 17 (depends on 11)

The computing device of claim 11, wherein the memory control device is further configured to:
receive a memory access command; and
write data of the memory access command to the system cache at a location for which the replacement value exceeds the staling threshold, wherein the data of the memory access command written to the system cache is the associated data.

### Claim 18 (depends on 11)

The computing device of claim 11, wherein the memory control device is further configured to:
receive a memory write command;
invalidate data at a location for which the replacement value exceeds the staling threshold; and
write data of the memory write command to the system cache at a location having the invalidated data, wherein the data of the memory write command written to the system cache is the associated data.

### Claim 19 (depends on 11)

The computing device of claim 11, wherein the memory control device is further configured to:
receive a memory write access command; and
write data of the memory write access command to the system cache at a location according to a cache replacement policy that is different from a criterion aware cache replacement policy in response to determining that no replacement value exceeds the staling threshold.

### Claim 20 (depends on 11)

The computing device of claim 11, wherein the memory control device is further configured to calculate the replacement value as a difference between the value of the staling counter and the value of the local counter.

### Claim 21

A computing device, comprising:
means for updating a staling counter;
means for writing a value of a local counter to a system cache in association with a location in the system cache for associated data, wherein the value of the local counter includes a value of the staling counter when the associated data is written to the system cache;
means for calculating a replacement value using a value of the staling counter and the value of the local counter of the associated data;
means for determining whether all replacement values for a plurality of associated data in a portion of the system cache are equal to one another; and
means for determining whether the replacement value exceeds a staling threshold in response to determining that not all of the replacement values for the plurality of associated data in the portion of the system cache are equal to one another, wherein the associated data is determined to be stale in response to determining that the replacement value exceeds the staling threshold.

### Claim 22 (depends on 21)

The computing device of claim 21, wherein means for updating the staling counter comprises:
means for receiving a signal from a client of the computing device configured to indicate whether to update the staling counter;
means for determining whether to update the staling counter based on the signal; and
means for updating the staling counter in response to determining to update the staling counter.

### Claim 23 (depends on 22)

The computing device of claim 22, wherein the signal is a register write command, and wherein:
means for receiving the signal from the client of the computing device comprises means for reading a value from a register set by the client; and
means for determining whether to update the staling counter based on the signal comprises means for determining whether to update the staling counter based on the value from the register.

### Claim 24 (depends on 23)

The computing device of claim 23, further comprising means for setting the value at the register by the client of the computing device based on a time-based criterion or setting the value at the register by the client of the computing device based on an event based criterion.

### Claim 25 (depends on 21)

The computing device of claim 21, further comprising means for receiving a memory write command, wherein means for writing the value of the local counter to the system cache in association with the location in the system cache for the associated data is implemented before updating the staling counter, wherein the associated data is data of the write memory command.

### Claim 26 (depends on 21)

The computing device of claim 21, further comprising:
means for receiving a memory access command; and
means for writing data of the memory access command to the system cache at a location for which the replacement value exceeds the staling threshold, wherein the data of the memory access command written to the system cache is the associated data.

### Claim 27 (depends on 21)

The computing device of claim 21, further comprising:
means for receiving a memory write command;
means for invalidating data at a location for which the replacement value exceeds the staling threshold; and
means for writing data of the memory write command to the system cache at a location having invalidated data, wherein the data of the memory write command written to the system cache is the associated data.

### Claim 28 (depends on 21)

The computing device of claim 21, further comprising:
means for receiving a memory write access command; and
means for writing data of the memory write access command to the system cache at a location according to a cache replacement policy that is different from a criterion aware cache replacement policy in response to determining that no replacement value exceeds the staling threshold.

### Claim 29 (depends on 21)

The computing device of claim 21, wherein means for calculating the replacement value using the value of the staling counter and the value of the local counter of the associated data comprises means for calculating a difference between the value of the staling counter and the value of the local counter.

### Claim 30

A non-transitory processor-readable medium having stored thereon processor-executable instructions configured to cause a processing device to perform operations comprising:
updating a staling counter;
writing a value of a local counter to a system cache in association with a location in the system cache for associated data, wherein the value of the local counter includes a value of the staling counter when the associated data is written to the system cache;
calculating a replacement value using a value of the staling counter and the value of the local counter of the associated data;
determining whether all replacement values for a plurality of associated data in a portion of the system cache are equal to one another; and
determining whether the replacement value exceeds a staling threshold in response to determining that not all of the replacement values for the plurality of associated data in the portion of the system cache are equal to one another, wherein the associated data is determined to be stale in response to determining that the replacement value exceeds the staling threshold.
