Subscribe rss
You Define: Server Virtualization
brought to you by IBM Intel IBM Intel
  • Select a Category:
  • Your Definitions
  • Server Virtualization Conversation
  • Resources Center
What does server virtualization mean to you? Share your definition
« previous post
next post »
39 votes

Introduction to Virtualization

First dual-core in 2005, then quad-core in 2007: the multi-core snowball is rolling. The desktop market is still trying to find out how to wield all this power; meanwhile, the server market is eagerly awaiting the octal-cores in 2009. The difference is that the server market has a real killer application, hungry for all that CPU power: virtualization.

While a lot has been written about the opportunities that virtualization brings (consolidation, hosting legacy applications, resource balancing, faster provisioning…), most publications about virtualization are rather vague about the “nuts and bolts”.

Performance? Isn’t that a non-issue? Modern virtualization solutions surely do not lose more than a few percent in performance, right? The answer is quite a bit different from what some of the sponsored white papers want you to believe.

Every one of us has already used virtualization in some degree. In fact, most of us wouldn’t be very productive without the virtualization that a modern OS offers us. A “natively running” server or workstation with a modern OS already virtualizes quite a few resources: memory, disks, and CPUs for example. For example, while there may only be only 4GB RAM in a Windows 2003 server, each of the tens of running application is given the illusion that they can use the full 2GB (or 3GB) user-mode address space. There might only be three disks in a RAID-5 array available, but as you have created 10 volumes (or LUNs), it appears as if there are 10 disks in the machine. Although there might only be two CPUs in the server, you get the impression that five actively running applications are all working in parallel at full speed.

So why do we install a hypervisor (or VMM) to make fully virtualized servers possible if we already have some degree of virtualization in our modern operating systems? Operating systems isolate the applications weakly by giving each process a well-defined memory space, separating data from instructions. At the same time, processes share the same files, may have access to some shared memory, and share the same OS configuration. In many situations, this kind of isolation was and is not sufficient. One process that takes up 100% of the CPU time may slow the other applications to snail speed for example, despite the fact that modern OSes use preemptive multitasking. In case of pure hardware virtualization, you will have completely separate virtual servers with their own OS (guest OS), and communication is only possible via a virtual network.

A Matter of Privileges

Hyper Visor

Ring deprivileging with software virtualization: the guest OSes are no longer running in ring 0, but with less rights in ring 1.

To create several virtual servers on one physical machine, a new software layer is necessary: the hypervisor, also called Virtual Machine Monitor (VMM). The most important role is to arbitrate the access to the underlying hardware, so that guest OSes can share the machine. You could say that a VMM manages virtual machines (Guest OS + applications) like an OS manages processes and threads.

To understand how the VMM actually works, we first have to understand how a modern operating systems works. Most modern operating system work with two modes:

- A kernel mode that is allowed to run almost any CPU instructions, including “privileged” instructions that deal with interrupts, memory management, and so on. This is of course the mode that the operating system runs in.

- A user mode that allows only instructions that are necessary to calculate and process data. Applications run in this mode and can only make use of the hardware by asking the kernel to do some work (a system call).

The whole user/kernel mode arrangement is based on the fact that RAM is divided into pages. (It is also possible to work with segment registers and tables, but that is a discussion for another article.) Before a privileged instruction is executed, the CPU first checks if the page from where the instruction originates actually has the right 2-bit code. The most privileged instructions require a 00 “privilege code”. This 2-bit code allows four levels of code, with “11″ being the lowest level.

To illustrate this, this 2-bit code is graphically represented in many publications by four “onion rings” (as you can see in this article). Ring 0 is the most privileged layer, ring 1 is a bit less privileged, and ring 3 is where the user applications reside with no privileges to manage the hardware resources at all.

A technique that all (software based) virtualization solutions use is thus ring deprivileging: the operating system that runs originally on ring 0 is moved to another less privileged ring like ring 1. This allows the VMM to control the guest OS access to resources. It avoids for example one guest OS kicking another out of memory, or a guest OS controlling the hardware directly.

Next time we’ll talk a bit more about the challenges of virtualization and some of the earliest forms of it.

|  Tags: CPU, Dual-core, kernal, multi-core, octal-cores, quad-core, virtualization
  • Author Icon By Johan De Gelas on Nov 12th, 2008
  • Vote Yes
  • No Comments

Add Your Comment




  • FEATURING YOUR FAVORITE TECH BLOGGERS:
  • Posts by ars.technica
  • Posts by Dave Altavilla
  • Posts by Johan De Gelas
  • Posts by Knowledge@Wharton
  • Posts by Matthew Shaw
  • Posts by real.world.technologies
  • Posts by Steve Kovsky
  • Posts by The Insight Community
Watch The Joint Webcast

Virtualization - Moving Beyond Consolidation
Featuring Hot Hardware,
VMWare, Intel and IBM
February 10th,9 am PST

Maximize Business Value
with Virtualization

(This event is now archived & available on demand.) Featuring Ars Technica
Speakers: Iddo Kadim, Director, Virtualization Technologies at Intel & Bob Zuber of IBM December 9th, 9am PST

Economic Value of Virtualization
(This event is now archived & available on demand.) Featuring Daily Tech's Steve Kovsky
January 29th, 9am PST


REGISTER NOW

LOG IN NOW

Draw It Up

Draw your network challenge or your ideal server virtualization set-up

Graffiti Whiteboard Launch Whiteboard
benchmarking CIOs client cloud CPU data data center Dual-core energy resource enterprise environment I/O IT Management multi-core notebook octal-cores quad-core server storage technology thin client virtual virtualization VMWare

FM Brought to you by IBM, Intel and Federated Media | Terms & Conditions / Privacy Statement