Tuesday, July 7, 2009

virtual machines

implementation-A virtual machine was originally defined by Popek and Goldberg as "an efficient, isolated duplicate of a real machine". Current use includes virtual machines which have no direct correspondence to any real hardware.Virtual machines are separated into two major categories, based on their use and degree of correspondence to any real machine. A system virtual machine provides a complete system platform which supports the execution of a complete operating system (OS). In contrast, a process virtual machine is designed to run a single program, which means that it supports a single process. An essential characteristic of a virtual machine is that the software running inside is limited to the resources and abstractions provided by the virtual machine -- it cannot break out of its virtual world.

  • benefits-So what does this mean to developers and testers. Let's look at a few scenarios that developers and testers find themselves in. For testers it is important that they test software against the various supported operating systems that an application runs against. The traditional approach is to run multiple physical machines, each with a different operating system. This is bad for several reasons. Space, maintenance, power and feasibility come to mind. Deployment of the software to these various machines can also be an issue. Instead a tester can run multiple virtual machines on one physical machine. Each virtual machine could have a different operating system. The application can be deployed to the virtual machines and tested.
    Another advantage of virtual machines is reproducibility. Build and test environments generally need to be well controlled. It would be undo work to have to wipe out a machine and rebuild it after each build or test run. A virtual machine allows the environment to be set up once. The environment is then captured. Any changes made after the capture can then be thrown away after the build or test run. Most emulation software packages offer this in some form or another.
    Another scenario, your application is currently released as version 1. Because of how the application is written you can only run a single version of your application on a machine. When you start development on version 2 you have to remove version 1. Part way through development an issue is found in the version 1 software that you need to replicate and fix. You can uninstall version 2 and install version 1, find and fix the issue and then revert back but that is a lot of work. A nicer approach is to have a virtual machine with version 1 installed. When you need to go back to version 1 you just start up the virtual machine. Even better is that you can easily compare the behavior of the two versions side by side rather than having to switch between two computers.
    IT departments have already found the benefits of running virtual servers over having multiple physical servers. Development and testing share many of the same benefits. Virtualization has become a buzzword in the industry. Windows is becoming more virtualized so even if you aren't using virtual machines today you may be in the future.

  • Example: A program written in Java receives services from the Java Runtime Environment (JRE) software by issuing commands to, and receiving the expected results from, the Java software. By providing these services to the program, the Java software is acting as a "virtual machine", taking the place of the operating system or hardware for which the program would ordinarily be tailored.

No comments:

Post a Comment