Resource sharing explained, CPU Virtualization

Resource sharing explained

In virtualization, physical resources are shared among virtual machines. Resource sharing represents perhaps the most significant advantage of server virtualization, because you can allocate resources to a VM based on the machine’s actual performance needs. Multiple virtual machines can run on the same physical host, with each virtual machine sharing the resources of the host. Virtual machines share access to CPUs, physical network cards, disk controllers, and are assigned their own region of memory.
On the same physical host, different virtual machines can run different operation systems. For example, you can run virtual machines that run some Linux distributions and virtual machines that run Windows on the same host.
When multiple virtual machines run on the same host, each virtual machine is allocated a portion of its physical resources. The hypervisor allows multiple operating systems to share a single hardware host.

With the default settings, all VMs on the same ESXi host receive an equal share of resources available.


What is CPU virtualization?

CPU virtualization involves a single CPU acting as if it were multiple separate CPUs. The most common reason for doing this is to run multiple different operating systems on one machine. CPU virtualization emphasizes performance and runs directly on the available CPUs whenever possible. The underlying physical resources are used whenever possible and the virtualization layer runs instructions only as needed to make virtual machines operate as if they were running directly on a physical machine.
When many virtual machines are running on an ESXi host, those virtual machines might compete for CPU resources. When CPU contention occurs, the ESXi host time-slices the physical processors across all virtual machines so each virtual machine runs as if it has its specified number of virtual processors.

Note that the CPU virtualization is not the same thing as emulation. With emulation, all operations are run in software by an emulator. The emulator emulates the original computer’s behavior by accepting the same data or inputs and achieving the same results.


Physical and virtualized host memory

In a nonvirtual environment, the operating system assumes it owns all physical memory available. When an application starts, it uses interfaces provided by the OS to allocate or release virtual memory pages during the execution. Virtual memory is a technique used in most operating systems, and is supported by almost all modern CPUs. Virtual memory creates a uniform virtual address space for applications and allows the OS and hardware to handle the address translation between the virtual and physical address space. This technique adapts the execution environment to support large address spaces, process protection, file mapping, and swapping in modern computer systems.
In a vSphere environment, the VMware virtualization layer creates a contiguous addressable memory space for the virtual machine when it is started. The allocated memory space is configured when the virtual machine is created and has the same properties as the virtual address space. This configuration allows the hypervisor to run multiple virtual machines simultaneously while protecting the memory of each virtual machine from being accessed by others.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s