What is Virtual Machine in Operating System and Why use it?

134

The basic idea behind virtual machine is that the same hardware is shared between multiple operating systems and creates an illusion that each user is having a separate memory and processor. It provides an interface that the user assumes to be separate hardware.

virtual machine
virtual machine

Why use a Virtual Machine?

Using virtual machines has many benefits. One of which is abstracting the hardware and running multiple operating systems on the same machine. The other benefit of a virtual machine is protection from unknown threats. When a virus or any threat comes to an operating system, the virtual environments of the other machines remain unaffected.

The sharing of resources between virtual machines can be done through a couple of methods. The first one is to share a disk volume where the shared resources are kept and this volume can be accessed by all the virtual machines. Also, it is possible to define a network of virtual machines through which information can be shared.

Also check: Optimal page replacement algorithm

The concept of the virtual machine is widely used by operating system developers. The operating system is quite an error-prone part and while developing any problem or invalid modification can cause the problem in the whole machine. But, if virtual machines are used rather than dedicating the full machine, only the machine in which the operating system is developed or configured will be affected and reducing the risk on the whole system.

Also, it is required for program testing. The same program needs to be tested on a variety of environments so that to provide portability. Using multiple machines for testing may increase the cost so with the help of virtual machines, it can be easily done by the use of single hardware.

Simulation

This is a methodology with the help of which we can run programs that are designed to run on some other environment. We will understand this with the help of an example –

Suppose a software company wants to update its operating system with the latest available in the market so as to use the latest features that are required for certain tasks. But after upgrading, it is realized that there are some programs that run only on the old version and the new version does not support it. In this case, special programs are used that allow us to use these programs in a similar way by providing an interface similar to the previous version.

Also read: Types of system programs in os

But, this has a big disadvantage in that after simulation, the speed of the features or programs that are run on the new version will decrease significantly and it is a load for the system to run programs with simulation.

So, in this article we learned about the concept of a virtual machine through the help of which many environments can be run on a single machine and sharing of hardware takes place and the other concept of simulation that allows us to use the features of some different environment in such a way as if it were a part of the machine.

Previous QuizStructure of Operating System
Next QuizWhat is CPU : Components and Types of CPU?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.