A processor resource accurate allocation method for predictive scheduling based on a current credit, wherein an operation queue of a credit scheduler comprises a VCPU that is located in the front of the queue and at an UNDER priority, a VCPU at an OVER priority, a VCPU that is located at the end of the queue and at an IDLE priority, and a waiting queue used for saving all VCPUs that overdraw the credit. The method predicts a time point when the credit starts to be overdrawn based on a credit value owned by a VCPU, and sets a timer to be triggered after the time point to instruct the credit scheduler to stop scheduling the VCPU so as to effectively control credit consumption and thus archive a purpose of accurately allocating processor resources. The method applies to a multi-core environment. The method can also retain advantages of a current credit scheduler in quick response to a small task load and in load balancing.
展开▼