Predictive Credit Scheduler for Precise VCPU Resource Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing Credit scheduler algorithms for virtual machine monitors, such as Xen, face inaccuracies in allocating processor resources, particularly leading to credit overdrawing and inadequate resource isolation, especially when the number of virtual machines increases and the target allocation is smaller.

Innovation Solution

Implementing a predictive scheduling method that uses timers to notify the Credit scheduler when credits are overdrawn, introducing a wait queue for VCPUs with negative credits, and maintaining a run queue structure with UNDER, OVER, and IDLE priorities to ensure precise allocation of processor resources, thereby preventing further credit consumption and ensuring isolation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the existing Credit scheduler uses a penalty mechanism for credit overdrawing, then the system can respond rapidly to small tasks, but the VCPU gets more processor time than expected and resource isolation is ineffective

Engineering Contradiction:
Improveresponse speed to small tasksVSAvoidprocessor time allocation accuracy
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The patent introduces a predictive mechanism that calculates the expected credit value before the scheduling period ends. By predicting whether credit will be overdrawn and stopping scheduling in advance, the system prevents excessive processor time allocation while maintaining rapid response to small tasks throughout the scheduling period.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a feedback mechanism where the scheduler continuously monitors credit consumption and compares it against the predicted credit value. When the actual credit approaches the predicted threshold, the scheduler adjusts or stops scheduling the VCPU, creating a closed-loop control system that ensures precise processor time allocation.

Inventive Principle:
Principle #23Feedback

2Adaptability or versatility

If the Credit scheduler allows credit overdrawing in every time slice, then the system maintains flexibility in resource allocation, but the accuracy of processor resource allocation deteriorates especially when target allocation is smaller

Engineering Contradiction:
Improveresource allocation flexibilityVSAvoidprocessor resource allocation accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent calculates the expected credit value at the beginning of each scheduling period based on the VCPU's weight and the scheduling period duration. This preliminary calculation establishes a precise allocation target that guides subsequent scheduling decisions, ensuring accuracy even for small resource allocations while maintaining flexibility through dynamic adjustment.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent makes the scheduling decision dynamic by continuously evaluating whether the VCPU should be scheduled based on current credit status against the predicted credit value. This dynamic approach allows flexible resource allocation while maintaining precise control over processor time distribution throughout the scheduling period.

Inventive Principle:
Principle #15Dynamics

3Reliability

If the Credit scheduler penalizes VCPU by stopping scheduling until credit becomes positive, then equitable allocation is ensured overall, but effective resource isolation is not provided in a short time

Engineering Contradiction:
Improveequitable allocationVSAvoidresource isolation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent predicts the credit value before the scheduling period ends and stops scheduling the VCPU in advance when the predicted credit indicates potential overdraw. This preliminary action prevents credit negative values from occurring, providing immediate resource isolation without waiting for the end of the scheduling period or requiring penalty phases.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent skips the traditional penalty mechanism entirely by implementing predictive stopping. Instead of allowing overdraw and then penalizing the VCPU in subsequent periods, the system rushes to prevent overdraw by stopping scheduling in advance, thereby achieving both equitable allocation and immediate resource isolation without time loss.

Inventive Principle:
Principle #21Skipping (Rushing through)

Data Source

PatentUS9286127B2Method for allocating processor resources precisely by means of predictive scheduling based on current credits
Publication Date: 2016.03.15 SHANGHAI JIAOTONG UNIV
  • US9286127B2 patent drawing
  • US9286127B2 patent drawing
  • US9286127B2 patent drawing

AI summary

The present invention discloses a method for allocating processor resources precisely by means of predictive scheduling based on current credits, wherein the run queue of the Credit scheduler comprises virtual central processing units (VCPUs) with UNDER priority located at the head of the queue, VCPUs with OVER priority, VCPUs with IDLE priority located at the end of the queue and a wait queue for saving all VCPUs with overdrawn credits. Based on credit values of VCPUs, the method predicts the time of the credit overdrawing, and sets a timer which is triggered after the time to notify the Credit scheduler to stop scheduling corresponding VCPU. Thus the method effectively controls credit consumption and achieves the object of precise allocation of processor resources. The method is suitable to multi-core environment, and is also capable of reserving the advantages of the existing Credit scheduler, which are quick response for small task loads and load balancing.