Virtualization 102

In the previous article I was talking about Emulation and Virtualization. The definitions of both of those words were made simple, hence not precisely truthful. Since you are reading this article, I assume you are interested in this topic, and it is safe for me to use technical terms once in a while. I will still try to keep it as simple as I can.

Any computer has at least two layers in its architecture. The hardware layer and the software layer. In short, hardware layer's components communicate with each other using electrical impulses, while software layer uses instructions. In other words, an electric charge or absence of it is a unit of information, it represents zero or one, in no particular order. A lot of those zeros or ones can make up a whole message, like the Morse code does. Those messages are exchanged between the hardware components and this is how they know what is asked of them at any given time. The software layer can understand the whole words, but to do anything it needs the help of hardware components, therefore, each of those words are translated into electrical impulses and are transmitted by hardware for processing. Somewhat similarly emulation converts user's instructions into a computer native architecture, process it, converts back to the form of the initial instruction and produces the output to the user. This allows a user to run application made for the computer architectures that differs from the one the user currently has. For example, emulation allows to run PowerPC architecture's programs on an Intel's IA-32 architecture computer. In other words, an old Apple operating system (before Mac OS X) could be emulated on computers with Intel or AMD processors. Without an emulator, you cannot run Mac OS 9 and previous Apple operating systems on a regular personal computer. Otherwise the hardware would not understand anything that Mac OS is “saying”.

Virtualization does not have to convert any instructions into a different subset of instructions as it uses native architecture for an operation. However, you can only emulate systems made for that native architecture – that is, operating system of the same architecture will only be supported. For example, IA-32 supports DOS, Windows, many Linux distributions, and other code that was written for that architecture. You cannot run ARM applications without an emulator, as it was said earlier, just Intel based code. Virtualization is faster than emulation, as the commands are executed without conversion from one subset of instructions to another then back. It is the same set of instructions that is understood by the processor. What am I trying to say is that: virtualization is like talking to someone who speaks in your native language, while emulation requires an expensive interpreter, so you can understand what the other person is saying in a foreign language.

In the old days, the hardware could only handle one source of instructions, a second source would always create a bottleneck of instructions, making both the host and the guest systems slow or hang. Modern processors can handle two, three, four or more sources of instructions at the same time, so the chance of bottleneck problem is greatly reduced. Moreover, some hardware is so advanced and powerful that it could easily be used by two computers at the same time without loss in performance for both. Most of us are using the computer as a typewriter anyway (emails, documents), and a web browsing tool. Unless you are a hardcore gamer, then you do not need an advanced video card, but it comes with your computer anyway. The bad news is you are wasting your resources; the good news is your computer can probably run the latest and baddest games.

So what kind of hardware do you need to have on your host computer to be able to run operating systems inside the virtual machines? It seems to be a simple question, but not so much. There are a lot of literature and theorems as to what would be considered an efficient virtual machine. For example, do the programs exhibit the same behavior in the virtual environment as they do on the native hardware, or is the guest operating system able to use the hardware resources in the same way as if it is not used in a virtual environment? These are just some of the questions that are asked when identifying the perfect set of hardware for virtualization. However, we are not going to discuss any of those theories, I will just tell you what is available today and what you should get if you want to run a guest operating system without hassles.

If you bought a computer within the last five years, then it should support virtualization on some level. However, if you are buying a new computer then you should get the one that has VT-x or AMD-V in its description. Those letters identify processors that assist with virtualization on the hardware level, making the whole process of virtualization run smoothly. You will also need substantial system memory (RAM). Two gigabytes would do just fine, but three to four will make everything even better. My rule of thumbs is at least 1.5 GB per operating system. Selecting a video card is a very important question when choosing your future machine that is going to be used for virtualization. From my experience, the built-in video cards have a lot of problems when you run guest operating systems on your machine, while decent PCIe cards handle all the graphics perfectly. Do not go for the newest card, as perhaps the software does not support its full functionality just yet. I say, go for a card that is one to two years old and that has at least 512 megabytes of memory. The amount of shaders, flops or other information for the card is not that important since your purpose is not the gaming computer. Just make sure it is PCIe and has a VGA and/or DVI port(s), depending on what kind of monitor you have. Some people find it to be convenient using two monitors, so one can have a host, and the other a guest operating system. Finally, make sure your new machine has enough USB ports available. Wireless input/output devices may not work in many operating systems, so try to avoid getting those. And I guess that's it for the hardware. You should be able to run your virtual machines without significant problems now.

In the next article, and the final one in the series about Virtualization, I will get into software for virtualization – the programs that are used to manage virtual machines, such as VMWare, VirtualBox, Windows Virtual PC, Parallels, and some others. I will also tell you which one is my favorite. It should be a good read.

Comments

0 comments
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <em> <i> <q cite=""> <s> <strike> <strong>