Apparatus and method for periodic load balancing in a multiple run queue system
AssigneeInternational Business Machines Corporation
InventorsLarry Bert Brenner, Luke Matthew Browning
Life of this patent
Estimating the term…
Abstract
An apparatus and methods for periodic load balancing in a multiple run queue system are provided. The apparatus includes a controller, memory, initial load balancing device, idle load balancing device, periodic load balancing device, and starvation load balancing device. The apparatus performs initial load balancing, idle load balancing, periodic load balancing and starvation load balancing to ensure that the workloads for the processors of the system are optimally balanced.
Claims40
A method of balancing workload among a plurality of local run queues, comprising:
- identifying a heaviest local run queue and a lightest local run queue, the heaviest local run queue being a local run queue with a highest load average and the lightest local run queue being a local run queue with a lowest load average;
- calculating a difference in load average between the heaviest local run queue and the lightest local run queue;
- and
- performing load balancing if the difference exceeds a threshold amount.
A computer program product in a computer readable medium for balancing workload among a plurality of local run queues, comprising:
- first instructions for identifying a heaviest local run queue and a lightest local run queue, the heaviest local run queue being a local run queue with a highest load average and the lightest local run queue being a local run queue with a lowest load average;
- second instructions for calculating a difference in load average between the heaviest local run queue and the lightest local run queue;
- and
- third instructions for performing load balancing if the difference exceeds a threshold amount.
A workload balancing apparatus for balancing workload among a plurality of local run queues in a multiple run queue system, comprising:
- means for identifying a heaviest local run queue and a lightest local run queue, the heaviest local run queue being a local run queue with a highest load average and the lightest local run queue being a local run queue with a lowest load average;
- means for calculating a difference in load average between the heaviest local run queue and the lightest local run queue;
- and
- means for performing load balancing if the difference exceeds a threshold amount.
The apparatus of claim 26, wherein the means for scanning the plurality of local run queues for a run queue that satisfies idle load balancing criteria includes means for identifying a local run queue that has a largest number of threads, contains more threads than a selected threshold, and contains at least one unbound thread.
A method of balancing workload among a plurality of processors, comprising:
- identifying an idle processor from the plurality of processors;
- scanning the plurality of processors for a processor meeting idle load balancing criteria;
- and
- if a processor meeting the idle load balancing criteria is found, performing idle load balancing.
A multiple processor system, comprising:
- a plurality of processors;
- and
- a dispatcher, wherein each of the plurality of processors has an associated local run queue and wherein the dispatcher identifies a heaviest local run queue and a lightest local run queue, the heaviest local run queue being a local run queue with a highest load average and the lightest local run queue being a local run queue with a lowest load average, calculates a difference in load average between the heaviest local run queue and the lightest local run queue, and performs load balancing if the difference exceeds a threshold amount.
Dependencies are inferred from the claim text.