Project

General

Profile

« Previous | Next » 

Revision 14390

web/links/index.htm: updated to Firefox bookmarks: VirtualBox: performance: added that context-switching also imposes an overhead, in addition to sandboxing.

View differences:

index.htm
2559 2559
                <DT><a name="VirtualBox" href="#VirtualBox"><H3 ADD_DATE="1401316606">VirtualBox</H3></a>
2560 2560
                <DL><p>
2561 2561
                    <DT><a name="performance" href="#performance"><H3 ADD_DATE="1406878214">performance</H3></a>
2562
                    <DD>the VM container almost always makes system calls available as *platform-independent* BIOS calls rather than forwarding the system calls themselves (as chroot does).
2563
for security reasons, BIOS calls are almost always provided as wrappers around *system* calls, rather than native BIOS calls (which cannot be trapped by the host OS).
2562
                    <DD>virtualization always imposes two kinds of overhead: context-switching and sandboxing (see below). by contrast, a multi-OS bootloader does not impose an overhead because it only provides a hardware compatibility layer, without imposing context-switching or sandboxing.
2563

  
2564
context-switching imposes an overhead because glue code is needed to allow the guest and host OS to run simultaneously. there is overhead each time the CPU switches between the guest and host OS, which is in proportion to the switching frequency. this means you want the timeslices for each OS to be as long as possible to minimize the overhead of saving/restoring the CPU context. you also need a dedicated timer on the CPU (untouchable by the guest OS) to preempt the guest thread at the end of the timeslice.
2565

  
2566
sandboxing imposes an overhead as follows:
2567
- the VM container almost always makes system calls available as *platform-independent* BIOS calls rather than forwarding the system calls themselves (as chroot does).
2568
- for security reasons, BIOS calls are almost always provided as wrappers around *system* calls, rather than native BIOS calls (which cannot be trapped by the host OS).
2564 2569
these constraints together mean that virtualization always imposes *some* overhead (on system calls), regardless of guest/host configuration.
2565 2570
however, note that for *some* system and BIOS calls, the overhead can be removed by forwarding either the system call (when the guest and host OS are the same) or the BIOS call (if the BIOS call is not privileged).
2566 2571
</DD>

Also available in: Unified diff