Virtual machine cpu resource reservation algorithm based on kvm platform
A CPU resource and resource reservation technology, which is applied in the field of virtual machine CPU resource reservation algorithm, can solve problems such as high-priority tasks cannot be executed and high-priority tasks are completed first, so as to ensure real-time performance and improve response performance effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051] The virtual machine CPU resource reservation algorithm based on the KVM platform includes the following steps:
[0052] 1) In the kernel state, the priority S of the virtual machine is calculated according to the virtual machine priority formula by obtaining the resource reservation parameters set by the user i The theoretical value, find the kernel state task_struct data structure through the process id of the virtual machine, and set the process priority in the task_struct data structure to S i ;
[0053] 2) After step 1), another virtual machine timer task with a period of t will be triggered, in which the priority S of the virtual machine is passed i The theoretical value of is compared with the actual running time value of the virtual machine. When the actual running time value of the virtual machine is greater than or equal to the priority S of the virtual machine i When the theoretical value of , the virtual machine that reaches the theoretical reserved time sl...
Embodiment 2
[0055] The present embodiment is further optimized on the basis of the above-mentioned embodiment, and further for realizing the present invention better, adopts following setting mode especially: Described step 2) comprises the following specific steps:
[0056] 2-1) After the kernel state obtains the reserved parameters, compare and judge whether the virtual machine timer with a period of t has reached the virtual machine statistics time T period;
[0057] 2-2) After step 2-1), if the virtual machine timer with a period of t reaches the virtual machine statistics time T period, set the scheduling priority of the virtual machine to the priority S of the virtual machine i Theoretical value, otherwise go to step 2-3);
[0058] 2-3) Determine whether the user has changed the resource reservation value Ri of the virtual machine again, or whether a new virtual machine has been added to the resource reservation queue, if yes, repeat step 2-2), if not, perform step 2-4);
[0059] ...
Embodiment 3
[0062] This embodiment is further optimized on the basis of the above-mentioned embodiments. In order to further realize the present invention better, the following setting method is adopted in particular: the theoretical reserved time slice includes the time when the virtual machine reaches the reserved time slice within t period Theoretical value t i And / or the virtual machine reaches the theoretical value T of the reserved time slice within the T period i ;
[0063] the t i By formula: calculated;
[0064] The T i By formula: calculated.
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


