# US 7,613,897 B2 · Allocating entitled processor cycles for preempted virtual processors

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

- Number: US 7,613,897 B2
- Document ID: US7613897B2
- Status: Granted
- Kind: B2
- Application number: 11/094,712
- Filed: 2005-03-30
- Published: 2006-10-12
- Granted: 2009-11-03
- Earliest claimed: 2005-03-30
- Assignees: International Business Machines Corporation
- Inventors: William Joseph Armstrong; Naresh Nayar
- Web page: https://patentgrep.com/patent/US7613897B2

## CPC

- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, apparatus, system, and signal-bearing medium that, in an embodiment, calculate a preemption credit for a partition if a virtual processor is preempted and the partition is unable to receive an entitled capacity of physical processor cycles during a dispatch window. The preemption credit is the portion of the entitled capacity that the partition is unable to receive. As long as the partition has a remaining preemption credit, in subsequent dispatch windows, a portion of the preemption credit is allocated to the virtual processor, and the preemption credit is reduced. In this way, in an embodiment, shared processor partitions may be ensured of receiving their entitled allocation of processor cycles.

## Claims

### Claim 1

A method comprising:
determining whether a virtual processor is preempted and unable to receive an entitled capacity of physical processor cycles of a physical processor during a dispatch window of a partition, wherein the virtual processor is allocated to the partition, and wherein the virtual processor represents a number of cycles of the physical processor, and wherein the physical processor that the virtual processor represents changes between a plurality of physical processors over time;
if the determining is true, allocating a portion of the entitled capacity that the virtual processor was unable to receive to the virtual processor during at least one subsequent dispatch window, wherein the allocating further comprises calculating a preemption credit for the partition based on the entitled capacity of the physical processor cycles that the partition was unable to receive during the dispatch window; and
if the determining is false, allocating the entitled capacity to the virtual processor during the subsequent dispatch window.

### Claim 2 (depends on 1)

The method of claim 1, wherein the calculating further comprises:
calculating a difference between the preemption credit and a time remaining to an end of the dispatch window.

### Claim 3 (depends on 1)

The method of claim 1, wherein the allocating further comprises:
deciding whether the partition has any of the preemption credit remaining; and
if the deciding is true, calculating a portion of the preemption credit, allocating the portion to the virtual processor for the subsequent dispatch window, and reducing the preemption credit by the portion.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
if the deciding is false, allocating the entitled capacity of the physical processor cycles to the virtual processor for the subsequent dispatch window.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
zeroing the preemption credit in response to the virtual processor having no work remaining associated with the partition.

### Claim 6

A storage medium encoded with instructions, wherein the instructions when executed comprise:
determining whether a virtual processor is preempted and unable to receive an entitled capacity of physical processor cycles of physical processor during a dispatch window of a partition, wherein the virtual processor is allocated to the partition, and wherein the virtual processor represents a number of cycles of the physical processor, and wherein the physical processor that the virtual processor represents changes between a plurality of physical processors over time;
if the determining is true, allocating a portion of the entitled capacity that the virtual processor was unable to receive to the virtual processor during at least one subsequent dispatch window, wherein the allocating further comprises calculating a preemption credit for the partition based on the entitled capacity of the physical processor cycles that the partition was unable to receive during the dispatch window; and
if the determining is false, allocating the entitled capacity to the virtual processor during the subsequent dispatch window.

### Claim 7 (depends on 6)

The storage medium of claim 6, wherein the calculating further comprises:
calculating a difference between the preemption credit and a time remaining to an end of the dispatch window.

### Claim 8 (depends on 6)

The storage medium of claim 6, wherein the allocating further comprises:
deciding whether the partition has any of the preemption credit remaining; and
if the deciding is true, calculating a portion of the preemption credit, allocating the portion to the virtual processor for the subsequent dispatch window, and reducing the preemption credit by the portion.

### Claim 9 (depends on 8)

The storage medium of claim 8, further comprising:
if the deciding is false, allocating the entitled capacity of the physical processor cycles to the virtual processor for the subsequent dispatch window.

### Claim 10 (depends on 6)

The storage medium of claim 6, further comprising:
zeroing the preemption credit in response to the virtual processor having no work remaining associated with the partition.

### Claim 11

A computer system comprising:
a physical processor; and
a storage device encoded with instructions, wherein the instructions when executed on the physical processor comprise:
determining whether a virtual processor is preempted and unable to receive an entitled capacity of physical processor cycles of the physical processor during a dispatch window of a partition, wherein the virtual processor is allocated to the partition, and wherein the virtual processor represents a number of cycles of the physical processor, and wherein the physical processor that the virtual processor represents changes between a plurality of physical processors over time,
if the determining is true, allocating a portion of the entitled capacity that the virtual processor was unable to receive to the virtual processor during at least one subsequent dispatch window, wherein the allocating further comprises calculating a preemption credit for the partition based on the entitled capacity of the physical processor cycles that the partition was unable to receive during the dispatch window, and
if the determining is false, allocating the entitled capacity to the virtual processor during the subsequent dispatch window.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein the calculating further comprises:
calculating a difference between the preemption credit and a time remaining to an end of the dispatch window.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein the allocating further comprises:
deciding whether the partition has any of the preemption credit remaining; and
if the deciding is true, calculating a portion of the preemption credit, allocating the portion of the preemption credit to the virtual processor for the subsequent dispatch window, and reducing the preemption credit by the portion.

### Claim 14 (depends on 11)

The computer system of claim 11, wherein the allocating further comprises:
if the deciding is false, allocating the entitled capacity of the physical processor cycles to the virtual processor for the subsequent dispatch window.

### Claim 15 (depends on 11)

The computer system of claim 11, wherein the instructions further comprise:
zeroing the preemption credit in response to the virtual processor having no work remaining associated with the partition.

### Claim 16

A method for configuring a computer, comprising:
configuring the computer to determine whether a virtual processor is preempted and unable to receive an entitled capacity of physical processor cycles of a physical processor during a dispatch window of a partition, wherein the virtual processor is allocated to the partition, and wherein the virtual processor represents a number of cycles of the physical processor, and wherein the physical processor that the virtual processor represents changes between a plurality of physical processors over time;
configuring the computer to allocate a portion of the entitled capacity that the virtual processor was unable to receive to the virtual processor during at least one subsequent dispatch window if the virtual processor is preempted, wherein the configuring the computer to allocate further comprises configuring the computer to calculate a preemption credit for the partition based on the entitled capacity of the physical processor cycles that the partition was unable to receive during the dispatch window; and
configuring the computer to allocate the entitled capacity to the virtual processor during the subsequent dispatch window if the virtual processor is not preempted.

### Claim 17 (depends on 16)

The method of claim 16, wherein the configuring the computer to allocate further comprises:
configuring the computer to calculate a preemption credit for the partition based on the portion of the entitled capacity of the physical processor cycles that the partition was unable to receive during the dispatch window.

### Claim 18 (depends on 16)

The method of claim 16, wherein the configuring the computer to calculate further comprises:
configuring the computer to calculate a difference between the preemption credit and a time remaining to an end of the dispatch window.

### Claim 19 (depends on 16)

The method of claim 16, wherein the configuring the computer to allocate further comprises:
configuring the computer to decide whether the partition has any of the preemption credit remaining; and
configuring the computer to calculate a portion of the preemption credit, allocate the portion of the preemption credit to the virtual processor for the subsequent dispatch window, and reduce the preemption credit by the portion if the partition has any of the preemption credit remaining.

### Claim 20 (depends on 16)

The method of claim 16, further comprising:
configuring the computer to allocate the entitled capacity of the physical processor cycles to the virtual processor for the subsequent dispatch window if the partition does not have any of the preemption credit remaining.
