IP Library Granted Patent US 7,665,092
Granted Patent B1
US 7,665,092 · App. 11/013,498 · Granted Feb 16, 2010

Method and apparatus for distributed state-based load balancing between task queues

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,665,092
App. No.
11/013,498
Granted
Feb 16, 2010
Kind
B1
Abstract

One embodiment of the present invention provides a system that performs load balancing between task queues in a multiprocessor system. During operation, the system conditionally requests load information from a number of neighboring CPUs in a neighborhood of a requesting CPU. In response to the request, the system receives load information from one or more neighboring CPUs. Next, the system conditionally requests one or more neighboring CPUs to transfer tasks to the requesting CPU based on the received load information, thereby balancing load between the CPUs in the neighborhood.

Claims (51)

1. A method for balancing load between task queues in a multiprocessor system, the method comprising:

conditionally requesting load information from a number of neighboring CPUs in a neighborhood of a requesting CPU;

in response to the request, receiving load information from one or more neighboring CPUs;

calculating a neighborhood mean load based on the received load information;

if a load on the requesting CPU is below the neighborhood mean load, requesting one or more neighboring CPUs to transfer tasks to the requesting CPU;

determining a total number of tasks which are to be requested from a neighboring CPU so that, after the transfer, the load on the requested neighboring CPU is not below the neighborhood mean load;

for each neighboring CPU from the one or more neighboring CPUs, determining if a condition is satisfied to send one or more tasks from the neighboring CPU to the requesting CPU; and

if the condition is satisfied, sending the one or more tasks from the neighboring CPU to the requesting CPU, thereby balancing load between CPUs in the neighborhood.

2. The method of claim 1 , wherein the size of the neighborhood is defined in terms of number of hops separating CPUs.

3. The method of claim 1 , wherein conditionally requesting load information from the neighboring CPUs involves:

determining whether the load of the requesting CPU is below a threshold; and

if so, requesting load information from the neighboring CPUs.

4. The method of claim 3 , wherein the threshold is determined based on a delay involved in requesting and receiving load information from a neighboring CPU and a delay involved in requesting and receiving tasks from a neighboring CPU.

5. The method of claim 1 , wherein determining the total number of tasks which are to be requested from the neighboring CPUs involves selecting the larger of:

the amount by which the neighborhood mean load is larger than the load on the requesting CPU, and

a minimum number of tasks which can be transferred between CPUs.

6. The method of claim 1 , wherein determining the number of tasks which are to be requested from a neighboring CPU involves:

ranking the neighboring CPUs in decreasing order with respect to their load; and

determining the number of tasks which are to be requested from each neighboring CPU, starting from the highest-loaded CPU, until the total number of tasks which are to be requested from the neighboring CPUs is satisfied.

7. A method for balancing load between task queues in a multiprocessor system, the method comprising:

receiving at a first CPU a request to transfer a number of tasks to a second CPU, wherein the request includes the number of tasks;

determining whether a load on the first CPU if the number of tasks are transferred is higher than or equal to a load on the second CPU if the number of tasks are transferred, and, if so, transferring the number of tasks to the second CPU;

determining whether a load on the first CPU if the number of tasks are transferred is higher than or equal to a load on the second CPU if the number of tasks are transferred, and, if so, transferring the number of tasks to the second CPU;

otherwise, if the load on the first CPU if the number of tasks are transferred is lower than the load on the second CPU if the number of tasks are transferred:

determining a reduced number of tasks to transfer so that the load on the first CPU if the reduced number of tasks are transferred is higher than or equal to the load on the second CPU if the reduced number of tasks are transferred; and

if the reduced number of tasks is greater than or equal to a minimum number of tasks which can be transferred between CPUs, transferring the reduced number of tasks to the second CPU.

8. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for balancing load between task queues in a multiprocessor system, the method comprising:

conditionally requesting load information from a number of neighboring CPUs in a neighborhood of a requesting CPU;

in response to the request, receiving load information from one or more neighboring CPUs;

calculating a neighborhood mean load based on the received load information;

if a load on the requesting CPU is below the neighborhood mean load, requesting one or more neighboring CPUs to transfer tasks to the requesting CPU;

determining a total number of tasks which are to be requested from a neighboring CPU so that, after the transfer, the load on the requested neighboring CPU is not below the neighborhood mean load;

for each neighboring CPU from the one or more neighboring CPUs, determining if a condition is satisfied to send one or more tasks from the neighboring CPU to the requesting CPU; and

if the condition is satisfied, sending the one or more tasks from the neighboring CPU to the requesting CPU, thereby balancing load between CPUs in the neighborhood.

9. The computer-readable storage medium of claim 8 , wherein the size of the neighborhood is defined in terms of number of hops separating CPUs.

10. The computer-readable storage medium of claim 8 , wherein conditionally requesting load information from the neighboring CPUs involves:

determining whether the load of the requesting CPU is below a threshold; and

if so, requesting load information from the neighboring CPUs.

11. The computer-readable storage medium of claim 10 , wherein the threshold is determined based on a delay involved in requesting and receiving load information from a neighboring CPU and a delay involved in requesting and receiving tasks from a neighboring CPU.

12. The computer-readable storage medium of claim 8 , wherein determining the total number of tasks which are to be requested from the neighboring CPUs involves selecting the larger of:

the amount by which the neighborhood mean load is larger than the load on the requesting CPU, and

a minimum number of tasks which can be transferred between CPUs.

13. The computer-readable storage medium of claim 8 , wherein determining the number of tasks which are to be requested from a neighboring CPU involves:

ranking the neighboring CPUs in decreasing order with respect to their load; and

determining the number of tasks which are to be requested from each neighboring CPU, starting from the highest-loaded CPU, until the total number of tasks which are to be requested from the neighboring CPUs is satisfied.

14. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for balancing load between task queues in a multiprocessor system, the method comprising:

receiving at a first CPU a request to transfer a number of tasks to a second CPU, wherein the request includes the number of tasks;

determining whether a load on the first CPU if the number of tasks are transferred is higher than or equal to a load on the second CPU if the number of tasks are transferred, and, if so, transferring the number of tasks to the second CPU;

otherwise, if the load on the first CPU if the number of tasks are transferred is lower than the load on the second CPU if the number of tasks are transferred:

determining a reduced number of tasks to transfer so that the load on the first CPU if the reduced number of tasks are transferred is higher than or equal to the load on the second CPU if the reduced number of tasks are transferred; and

if the reduced number of tasks is greater than or equal to a minimum number of tasks which can be transferred between CPUs, transferring the reduced number of tasks to the second CPU.

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 037305/0238 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 15, 2004
From: VENGEROV, DAVID
To: SUN MICROSYSTEMS, INC.
Reel/Frame 016102/0643 →