April 25, 2019

Linux as a Hypervisor

Many Different Types of Virtualization

  • July 21, 2008
  • By Andrea Arcangeli

It's quite fascinating how many virtualization designs there are out there. Even in Linux itself there are so many different approaches. To reduce the scope a bit for this post we'll ignore all the designs that can't revirtualize the CPU to allow other operative systems to run.

If we look back, before virtualization existed, there have been a lots and lots of discussions on OS designs too. For example Linux uses the monolithic design (modulo drivers in userland). A few other OS uses the microkernel design. Each solution brings pros and cons. In the end most production OS tend to use the monolithic design for all performance critical tasks.

As far as Linux is concerned the major cons of having a driver in userland is that it's much slower. Most isolation layering brings slowdown to the system. So for example it's perfectly ok to have a fingerprint reader driver in userland (like the one I use on my laptop). Nobody cares if it takes a bit more of CPU to read a fingerprint during login into the system. On the other hand it would be very bad to pay for a kernel entry and exit every time a network packet is sent or received on a gigabit ethernet, which is also why paravirtualization pays off big for high bandwidth devices.

Most Popular LinuxPlanet Stories