In: Computer Science
Explain Trap-and-Emulate and Binary Translation Virtualization Implementation with neat diagrams? Also describe types of Virtual Machines and their Implementations?
Each operating system was designed to be in total control of the system, which makes it impossible for two or more operating systems to be executing concurrently on the same platform – unless ‘total control’ is taken away from them by a new layer of control-software: the VMM i.e. Virtual Machine Manager. How to seize control?
This phenomenon is called "Trap-and-Emulate" Virtualization.
One specific approach to implementing full virtualization that does not require hardware virtualization features is Binary translation. It involves examining the executable code of the virtual guest for "unsafe" instructions, translating these into "safe" equivalents, and then executing the translated code.
There are two different types of virtual machines based on their functions:
They provide full virtualization and act as a substitute for the real machine, these will provide functionalities to execute an entire operating system. Hardware resources are shared and managed, forming multiple environments on the host system. These environments are isolated from each other but exist on the same physical host. Thus, these provide time-sharing among several single-tasking operating systems.
they are also called as Application virtual machines, Managed runtime environments. This type of VM runs as a normal application inside the host’s operating system, supporting a single process. It is created with the starting of the process and is destroyed when the process ends. It is used to provide a platform-independent programming environment to the process, allowing it to execute in the same manner on any of the other platforms. These are implemented using interpreters and provides high-level abstractions.