The virtual machine running a guest operating system no longer has the kernel as the most privileged software running. That is now the hypervisor. Before Xen, in order for the kernel to execute privileged instructions they would have to modified. Since some of these instructions could cause an error, the hypervisor could trap it and emulate the instruction and return the result. However some instructions that fail silently without a trap to the hypervisor. To handle these cases, it was necessary to scan the OS code at runtime and replacing those code sections with code that calls the hypervisor. This can hinder performance but keeps the guest OS thinking that it is still the most privileged, thus maintaining perfect compatibility.
Paravirtualization is the process that Xen uses to handle the privileged instructions. Instead of scanning the code at runtime, the operating system's code was rewritten to allow it to run in user mode. As the hypervisor is now the most privileged at the supervisor level. They also introduced a hypercall, which is like a system call to the hypervisor when the kernel is executing code that needs to be run in supervisor mode. Since all this work was all done before hand, the performance compared to the previous method is a lot better. The only problem is that they would have to convince maintainers of proprietary systems to make these changes for you. Which is another benefit for open source operating systems such as Linux.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment