Sunday, June 22, 2014

Virutalization and CPU Rings

Operating system runs in ring 0.  Modern processor inserts a ring -1 for the hypervisor to control access to CPU and resources.

Type-2 hypervisor sits on the top of an OS.  The hypervisor core module - VMM (VM monitor) runs as a kernel driver.  The main hypervisor and the guest OS runs in ring 1 or 3.  This is called ring compression because the using less ring (4 rings to 3 rings) by the architecture.  When a guest OS needs to do I/O, the request will be trapped by the hypervisor and pass onto the host OS via VMM.  This caused some performance penalty.

No comments: