Virtual Machine Scheduler with Priority Queues for I/O Latency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional virtual machine (VM) schedulers fail to efficiently allocate processor resources in real-time environments, leading to prolonged reaction times and poor I/O performance due to interrupt-driven I/O operations, where IRQ messages are delayed as processor resources are shared among multiple VMs.
Innovation Solution
A scheduler method that classifies VM modules into priority queues based on I/O device operating time and processor usage time, using a FIFO mechanism for high-priority VMs with longer I/O device operating times and a credit mechanism for VMs with shorter times, ensuring timely processor allocation and preventing excessive waiting.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Stability of the object's composition
If the conventional VM scheduler equally allocates processor resources to each VM, then the processor resource allocation is uniform, but the I/O device cannot support real-time operations of multiple VMs, leading to prolonged reaction time and lowered I/O performance
Solution Approach 1:
The scheduler segments VMs into different service classes (first service class, second service class, third service class) based on their I/O device operating time to processor usage time ratios. This segmentation allows different scheduling strategies to be applied to different VM groups, resolving the contradiction between uniform allocation and real-time responsiveness by treating time-sensitive VMs differently from others.
Solution Approach 2:
The scheduler changes the scheduling parameter (priority level) based on the I/O device operating time to processor usage time ratio. VMs with higher ratios (more I/O bound) are assigned to higher priority queues, while VMs with lower ratios are assigned to lower priority queues. This dynamic parameter adjustment resolves the contradiction by adapting resource allocation to the actual operational characteristics of each VM.
2Ease of operation
If the VM uses interrupt-driven I/O mode, then the I/O device can communicate with the processor, but the IRQ message cannot be immediately processed due to shared processor resources, forcing all I/O operations to go through additional delay time
Solution Approach 1:
The scheduler performs preliminary classification of VMs into service classes before actual I/O operations occur. By pre-identifying which VMs are I/O bound (have high I/O device operating time to processor usage time ratios) and placing them in higher priority queues, the system prepares the scheduling structure in advance to minimize delay times when I/O operations actually occur.
Solution Approach 2:
The scheduler acts as an intermediary layer between the interrupt-driven I/O subsystem and the processor allocation mechanism. It intercepts I/O requests, classifies them according to service classes, and routes them through appropriate priority queues before processor execution, thereby mediating the conflict between simple interrupt-driven I/O and the need to minimize delay times.
3Adaptability or versatility
If the number of VMs increases, then the VM system provides more virtualization capacity, but the delay time is extended according to the scheduler mechanism, making it impossible to maintain real-time service quality
Solution Approach 1:
The scheduler segments the VM queue into multiple priority levels (first service class, second service class, third service class) based on I/O characteristics. This segmentation prevents a single long queue from forming, as VMs are distributed across multiple priority queues. When the number of VMs increases, they are spread across these segments rather than creating a single long waiting line, thereby maintaining real-time service quality despite increased system capacity.
Solution Approach 2:
The scheduler introduces a new dimension (priority level/service class) to the traditional single-queue scheduling model. Instead of managing VMs in a single sequential queue where delay increases linearly with the number of VMs, the system creates a multi-dimensional scheduling space with multiple priority queues. This dimensional transformation allows the system to handle increased VM counts without proportionally increasing delay times, as VMs can be serviced from multiple parallel queues.
Data Source
AI summary
A scheduler of a virtual machine (VM) module, a scheduling method thereof, and a device containing computer software are provided. The scheduler has a classification module and a scheduling module. The classification module receives at least one VM module and analyzes a resource proportion parameter to generate classification result information. The scheduling module has a first schedule queue and a second schedule queue, sort an immediately resource-required VM module to the first schedule queue and a non immediately resource-required VM module to the second schedule queue, and determine whether the VM module of the first schedule queue exists or not, and if yes, it outputs the VM module of the first schedule queue to a processor; otherwise, outputs the VM module of the second schedule queue to the processor.


