# US 2008/0313420 A1 · Managing working set use of a cache via page coloring

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

- Number: US 2008/0313420 A1
- Document ID: US20080313420A1
- Status: Published application
- Kind: A1
- Application number: 11/818,727
- Filed: 2007-06-15
- Published: 2008-12-18
- Earliest claimed: 2007-06-15
- Assignees: Microsoft Corporation
- Inventors: Bradford Beckmann; Bradley M. Waters
- Web page: https://patentgrep.com/patent/US20080313420A1

## CPC

- G06F 12/1054: {the data cache being concurrently physically addressed}
- G06F 12/0842: for multiprocessing or multitasking
- G06F 2212/653: Page colouring
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processor cache is indexed by a group of distinct page colors. The use of this cache by different working sets is controlled using page coloring. Translations of virtual addresses of the instructions and/or data of a working set are constrained to physical addresses the page colors of which are in a subgroup of the group of distinct page colors.

## Claims

### Claim 1

A method for managing use of a physically-indexed cache indexed by a group of distinct page colors, the method comprising:
constraining translations of virtual addresses of a first working set to physical addresses the page colors of which belong to a first subgroup of the group.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
constraining translations of virtual addresses of a second working set to physical addresses the page colors of which belong to the first subgroup.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
constraining translations of virtual addresses of a second working set to physical addresses the page colors of which belong to a second subgroup of the group, where the first subgroup and the second subgroup have at least one page color in common.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
constraining translations of virtual addresses of a second working set to physical addresses the page colors of which belong to a second subgroup of the group, where the first subgroup and the second subgroup do not have any page colors in common.

### Claim 5 (depends on 4)

The method of claim 4, wherein the second subgroup is larger than the first subgroup.

### Claim 6 (depends on 5)

The method of claim 5, wherein an entity to which the second working set belongs is of higher priority than the entity to which the first working set belongs.

### Claim 7 (depends on 5)

The method of claim 5, wherein the second working set belongs to an application having Quality of Service requirements.

### Claim 8 (depends on 4)

The method of claim 4, wherein the first working set belongs to a first guest environment and the second working set belongs to a second guest environment.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
permitting translations of virtual addresses of a second working set to any physical addresses the page colors of which belong to the group.

### Claim 10 (depends on 9)

The method of claim 9, wherein an entity to which the second working set belongs is of higher priority than the entity to which the first working set belongs.

### Claim 11 (depends on 9)

The method of claim 9, wherein the second working set belongs to an application having Quality of Service requirements.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
determining that the first working set does not belong to a performance-critical process.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
checking whether an entity to which the first working set belongs attempts to access a line of the cache belonging to a page the color of which does not belong to the first subgroup.

### Claim 14

A computer-readable medium having computer-executable instructions for performing steps comprising:
initializing a pointer to point to a page color most recently used for a particular working set;
incrementing a page color value to generate an incremented page color value for use when next allocating memory and translating a virtual address of the particular working set to a physical address; and
if the incremented page color value exceeds a limit for the particular working set, resetting the incremented page color value to a page color offset for the particular working set prior to use of the incremented page color value for allocating memory and translating the virtual address to the physical address.

### Claim 15

A computer system comprising:
a physically-indexed cache indexed by a group of distinct page colors;
a processor coupled to the cache;
a main memory coupled to the processor, the main memory storing system software that is able to translate virtual addresses to physical addresses using page coloring such that translations of virtual addresses of at least one working set are constrained to physical addresses the page colors of which are in a subgroup of the group of distinct page colors.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein the system software comprises a resource management layer that is able to split the cache or a portion thereof between multiple applications at least one of which has Quality of Service requirements.

### Claim 17 (depends on 15)

The computer system of claim 15, wherein the system software comprises a system management layer that is able to assign a greater number of page colors to performance-critical processes than to non-performance critical processes.

### Claim 18 (depends on 15)

The computer system of claim 15, wherein the main memory stores user software that is able to request from the system software that a particular working set use only a certain percentage of the cache.

### Claim 19 (depends on 15)

The computer system of claim 15, wherein the main memory stores a virtual machine monitor that is able to split the cache or a portion thereof between multiple guest environments.

### Claim 20 (depends on 15)

The computer system of claim 15, wherein the main memory stores a managed runtime environment that is able to influence the page coloring in accordance with a page coloring policy.
