0

I know this sounds very general question.

Consider 2 OS's running using virtualization say operating system level virtualization. How concurrency is handled if both hosted OS using same resource and how this works?

3 Answers 3

1

Virtualized OSes never actually see physical resources, they "think" they're running on other hardware, which is emulated by the virtualization layer; so, while the VM thinks it has a SCSI controller and a local SCSI disk, maybe this actually maps to a file on a filesystem on a LUN in a SAN.

Concurrent access is handled by the virtualization layer, depending on the resource type; if the host has four physical CPUs and two VMs want to use one each, they can safely do that at the same time, but their workload will be actually divided between two physical CPUs. If there's only one physical CPU, though, then the host's scheduler will handle concurreny and give each VM some CPU time. The same principle applies to every resource (disk, network, etc.).

0

a VM, from the host OS point of view is a process, and that process is being assigned resources like any other process. That applies to IO handling, CPU queuing etc.

thats the very brief and short of it of course, not going into SMP, VT and VT-d

0

Normally the guest OSes aren't allowed access to physicaly hardware. They get to see a virtual representation. For instance, they have virtual disk drives, which usually map to files (but not necessarily). Com, Printer, Network etc ports all work the same way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .