# US 11,113,113 B2 · Systems and methods for scheduling virtual memory compressors

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

- Number: US 11,113,113 B2
- Document ID: US11113113B2
- Status: Granted
- Kind: B2
- Application number: 15/853,239
- Filed: 2017-12-22
- Published: 2019-03-14
- Granted: 2021-09-07
- Earliest claimed: 2017-09-08
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Derek R. Kumar; Thomas Brogan Duffy, Jr.
- Web page: https://patentgrep.com/patent/US11113113B2

## CPC

- G06F 9/505: {considering the load}
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 9/5044: {considering hardware capabilities}
- G06F 2209/483: Multiproc
- G06F 2209/5022: Workload threshold
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, apparatuses, and methods for efficiently selecting compressors for data compression are described. In various embodiments, a computing system includes at least one processor and multiple codecs such as one or more hardware codecs and one or more software codecs executable by the processor. The computing system receives a workload and processes instructions, commands and routines corresponding to the workload. One or more of the tasks in the workload are data compression tasks. Current condition(s) are determined during the processing of the workload by the computing system. Conditions are determined to be satisfied based on comparing current selected characteristics to respective thresholds. In one example, when the compressor selector determines a difference between a target compression ratio and an expected compression ratio of the first codec exceeds a threshold, the compressor selector switches from hardware codecs to software codecs.

## Claims

### Claim 1

An apparatus comprising:
a first processor configured to execute one or more applications;
a plurality of codecs comprising one or more hardware codecs and one or more software codecs executable by the first processor; and
a compressor selector configured to:
select a first codec of the plurality of codecs for data compression;
monitor one or more factors corresponding to a dynamic behavior of the apparatus, wherein values of the one or more factors vary in response to execution of tasks by the first processor;
select a second codec of the plurality of codecs for data compression, based at least in part on a determination that the one or more factors indicate a first condition is satisfied during execution of the tasks by the first processor, wherein one of the first codec and the second codec is a hardware codec and another one of the first codec and the second codec is a software codec; and
maintain the first codec as a selected codec for data compression, based at least in part on a determination that the first condition is not satisfied during execution of tasks by the first processor, wherein the determination that the first condition is satisfied comprises a determination that a difference between a target compression ratio and an expected compression ratio of the first codec exceeds a threshold.

### Claim 2 (depends on 1)

The apparatus as recited in claim 1, wherein the first codec is a hardware codec and the second codec is a software codec.

### Claim 3 (depends on 2)

The apparatus as recited in claim 2, wherein the expected compression ratio is based in part on a history of achieved compression ratios tracked by the compressor selector.

### Claim 4 (depends on 2)

The apparatus as recited in claim 2, wherein the determination that the first condition is satisfied comprises a determination that one or more compression queues for the first codec have reached a given occupancy level.

### Claim 5 (depends on 1)

The apparatus as recited in claim 1, wherein the first codec is a software codec and the second codec is a hardware codec.

### Claim 6 (depends on 5)

The apparatus as recited in claim 5, wherein the determination that the first condition is satisfied comprises a determination that an incoming rate of compression tasks is greater than a completion rate of compression tasks.

### Claim 7 (depends on 5)

The apparatus as recited in claim 5, wherein the determination that the first condition is satisfied comprises a determination that a priority level of energy efficiency is at a given level.

### Claim 8 (depends on 1)

The apparatus as recited in claim 1, wherein the apparatus further comprises a second processor capable of processing performance higher than the first processor, and wherein the compressor selector is further configured to select the second processor instead of the first processor for data compression based at least in part on a determination that the second processor has a higher performance level than the first processor.

### Claim 9

A method for data compression comprising:
selecting, by a compressor selector, a first codec of a plurality of codecs for data compression;
monitoring, by the compressor selector, one or more factors corresponding to a dynamic behavior of the apparatus, wherein values of the one or more factors vary in response to execution of tasks by the first processor;
selecting, by the compressor selector, a second codec of the plurality of codecs for data compression, based at least in part on a determination that the one or more factors indicate a first condition is satisfied during execution of the tasks by the first processor, wherein one of the first codec and the second codec is a hardware codec and another one of the first codec and the second codec is a software codec; and
maintaining, by the compressor selector, the first codec as a selected codec for data compression, based at least in part on a determination that the first condition is not satisfied during execution of tasks by the first processor, wherein the determination that the first condition is satisfied comprises a determination that a difference between a target compression ratio and an expected compression ratio of the first codec exceeds a threshold.

### Claim 10 (depends on 9)

The method as recited in claim 9, wherein the expected compression ratio is based in part on a history of achieved compression ratios tracked by the compressor selector.

### Claim 11 (depends on 9)

The method as recited in claim 9, wherein determining the first condition is satisfied comprises determining one or more compression queues for the first codec have reached a given occupancy level.

### Claim 12 (depends on 9)

The method as recited in claim 9, wherein the first codec is a software codec and the second codec is a hardware codec.

### Claim 13 (depends on 12)

The method as recited in claim 12, wherein determining the first condition is satisfied comprises determining an incoming rate of compression tasks is greater than a completion rate of compression tasks.

### Claim 14 (depends on 12)

The method as recited in claim 12, wherein determining the first condition is satisfied comprises determining a priority level of energy efficiency is at a given level.

### Claim 15

A system for selecting data compressors, the system comprising:
a processor; and
a non-transitory computer readable storage medium comprising program instructions operable to select between codecs, wherein the program instructions when executed by the processor cause the system to:
select a first codec of a plurality of codecs for data compression, wherein the plurality of codecs comprises one or more hardware codecs and one or more software codecs executable by a first processor;
monitor one or more factors corresponding to a dynamic behavior of the apparatus, wherein values of the one or more factors vary in response to execution of tasks by the first processor;
select a second codec of the plurality of codecs for data compression, based at least in part on a determination that the one or more factors indicate a first condition is satisfied during execution of the tasks by the first processor, wherein one of the first codec and the second codec is a hardware codec and another one of the first codec and the second codec is a software codec; and
maintain the first codec as a selected codec for data compression, based at least in part on a determination that the first condition is not satisfied during execution of tasks by the first processor, wherein the determination that the first condition is satisfied comprises a determination that a difference between a target compression ratio and an expected compression ratio of the first codec exceeds a threshold.

### Claim 16 (depends on 15)

The system as recited in claim 15, wherein the expected compression ratio is based in part on a history of achieved compression ratios tracked by the compressor selector.

### Claim 17 (depends on 15)

The system as recited in claim 15, wherein the first codec is a software codec and the second codec is a hardware codec.

### Claim 18 (depends on 17)

The system as recited in claim 17, wherein determining the first condition is satisfied comprises determining an incoming rate of compression tasks is greater than a completion rate of compression tasks.
