One idea for this virtualization framework
is what is called full virtualization, and
in full virtualization the idea is to
leave the operating system pretty much untouched.
So you can run the unchanged binary of the operating system on top of
the hypervisor. This is called full virtualization
because the operating system is completely untouched.
Nothing has been changed. Not even a single line of code is modified in these
operating systems in order to run on the
hypervisor simultaneously. But we have to be a
little bit clever to get this to work,
however. Operating systems running on top of the
hypervisor are run as user-level processes. They're not
running at the same level of privilege as
a Linux operating system that is running
on bare metal. But if the operating system
code is unchanged, it doesn't know that it
does not have the privilege for doing certain
things that it would do normally on bare metal hardware. In
other words, when the operating system executes some privileged
instructions, meaning they have to be, in a privileged mode or kernel
mode to run on bare metal in
order to execute those instructions. Those instructions
will create a trap that goes into
the hypervisor and the hypervisor will then emulate
the intended functionality of the operating system.
And this is what is called the
trap and emulate strategy. Essentially, each operating
system thinks it is running on bare metal.
And therefore, it does exactly what it
would have done on a bare-metal processor, meaning
that it'll try to execute certain privileged instructions
thinking it has the right privilege. But it
does not have the right privilege, because
it's run as a user-level process on top
of the hypervisor. And therefore, when they try
to do something that requires. A high level
of privilege than the user level, it will result in a trap into
the hypervisor, and the hypervisor will then
emulate the intended functionality of the particular
operating system. There are some thorny issues
with this trap and emulate strategy of
full virtualization, and that is. In some
architectures, some privilege instructions may fail silently.
What that means is, you would think
that the instruction actually succeeded, but it
did not. And you may never know about it. And in order to get around
this problem, in fully virtualized systems, the hypervisor will resort
to a binary translation strategy, meaning. It knows what
are the things that might fail silently in the architecture.
Look for those gotchas in each of these individual binaries of the unmodified
guest operating systems. And through binary editing strategy. They will ensure
that those instructions are dealt with careful, so that if those instructions
fail silently, the hypervisor can catch it and take the appropriate action.
And this was a problem in early instances of Intel architecture. Both Intel and
AMD have since started adding virtualization support
to the hardware, so that such problems
don't exist any more. But in the early going, when virtualization technology was
experimented with, in the late 90's and the early 2000s. This was a problem that
virtualization technology had to overcome in order to make
sure that you can run operating systems as unchanged
binaries on a fully virtualized hypervisor. Full virtualization is
the technology that is employed in the vmware system.