1 of 6

Slide Notes

DownloadGo Live

MICROSOFT HYPER-V

Published on Feb 17, 2024

No Description

PRESENTATION OUTLINE

MICROSOFT HYPER-V

Virtualization Platform

ABOUT

  • Whether you are a software developer, an IT professional, or a technology enthusiast, many of you need to run multiple operating systems. Hyper-V lets you run multiple operating systems as virtual machines on Windows.
  • Hyper-V runs each virtual machine in its own isolated space, which means you can run more than one virtual machine on the same hardware at the same time.
  • Provides features such as live migration, high availability, scalability.

CPU Algorithms

  • First Come, First Served (FCFS)
  • Round Robin (RR)
  • Priority Scheduling
Photo by Austin Distel

FCFS(first come first serve)

  • First Come First Serve (FCFS) scheduling algorithm is a basic scheduling technique used by operating systems and hypervisors like Microsoft Hyper-V to allocate resources to tasks or virtual machines.
  • Task Queue: When multiple VMs are running on a Hyper-V host, each VM is placed in a queue, representing the order in which they were started or activated.
  • Service Order: The Hyper-V hypervisor services the VMs in the order they entered the queue. The VM that arrived first is given the CPU and other resources first, followed by the next VM in the queue, and so on. Resource Allocation: Once a VM is scheduled to run, it is allocated the necessary CPU time, memory, and other resources according to its configuration and the host's capabilities. Execution: The VM is allowed to execute its tasks for a certain time slice (quantum) before the hypervisor switches to the next VM in the queue. Completion: When a VM's time slice expires or it voluntarily yields the CPU, the hypervisor moves to the next VM in the queue, and the process repeats. Preemption: FCFS scheduling does not involve preemption, meaning that once a VM starts executing, it continues until it finishes or voluntarily gives up the CPU.

ROUND ROBIN

  • Round Robin is a CPU scheduling algorithm used in operating systems to manage the allocation of CPU time among multiple tasks or processes. It is particularly popular in time-sharing environments where multiple tasks compete for CPU resources.
  • Task Queue: In Round Robin scheduling, VMs are placed in a queue, similar to First Come First Serve (FCFS) scheduling. However, instead of servicing VMs strictly based on arrival order, RR scheduling cyclically iterates through the queue. Time Quantum: Hyper-V assigns a fixed time quantum (or time slice) to each VM. When a VM's turn comes, it is allowed to execute for a predefined amount of time, typically ranging from milliseconds to seconds. Execution: The hypervisor allocates CPU time to the first VM in the queue and allows it to execute for its time quantum. If the VM completes its tasks within the time quantum, it voluntarily yields the CPU. If not, the hypervisor preempts the VM after the time quantum expires. Task Rotation: After each time quantum, the hypervisor moves to the next VM in the queue, regardless of whether the current VM has completed its tasks or not. This ensures fair CPU allocation among all VMs. Preemption: Round Robin scheduling involves preemption, meaning that if a VM's time quantum expires before it completes its tasks, the hypervisor interrupts its execution and moves to the next VM in the queue. Task Reinsertion: If a VM still has unfinished tasks after its time quantum expires, it is placed back at the end of the queue to await its next turn. This allows all VMs to have an equal opportunity to execute, preventing starvation.
Photo by QArea Inc.

PRIORITY SCHEDULING

  • Priority scheduling is a CPU scheduling algorithm used in operating systems to determine the order in which tasks or processes are executed based on their priority levels. Each task is assigned a priority value, and the scheduler selects the task with the highest priority for execution.
  • Priority Assignment: Each VM running on Hyper-V is assigned a priority level, which determines its relative importance compared to other VMs. Priority levels can be configured manually by administrators or set automatically based on predefined criteria. Resource Demand Monitoring: Hyper-V continuously monitors the resource demands of VMs, including CPU usage. It tracks factors such as CPU utilization, memory consumption, and I/O activity to assess the workload requirements of each VM. Priority-Based Scheduling: When CPU resources become available, Hyper-V's scheduler prioritizes VMs for execution based on their assigned priority levels. VMs with higher priorities are given precedence over those with lower priorities when allocating CPU time. Dynamic Resource Allocation: Hyper-V dynamically adjusts CPU resource allocation based on changing workload demands and VM priorities. During periods of high demand, such as spikes in activity or increased workload, CPU resources are reallocated to higher-priority VMs to ensure that critical workloads receive adequate processing power. Preemption: Higher-priority VMs may preempt CPU time from lower-priority VMs when necessary. Preemption allows Hyper-V to meet the performance requirements of critical workloads by temporarily reducing the CPU allocation of lower-priority VMs and reallocating resources to higher-priority VMs. Fairness and Efficiency: Priority scheduling in Hyper-V aims to achieve fairness and efficiency in CPU resource utilization. It ensures that critical workloads receive priority access to CPU resources while also maintaining fairness among VMs and preventing resource starvation. Configuration Flexibility: Hyper-V provides administrators with configuration options to fine-tune priority scheduling settings according to specific requirements. Administrators can adjust priority levels, set resource allocation policies, and define scheduling parameters to optimize performance and resource utilization.
Photo by Brett Jordan