Lecture_10_Fall_11

Equal clientprecomputesmacsforeachblockoflef

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview:  Can run native processes alongside VMs  Familiar environment – how much CPU and memory does a VM take? Use top! How big is the virtual disk? ls –l  Easy management – stop a VM? Sure, just kill it!  A combination  Mostly hosted, but some parts are inside the OS kernel for performance reasons  E.g., KVM   Do whatever the CPU does but in software   Fetch the next instruction   Decode – is it an ADD, a XOR, a MOV?   Execute – using the emulated registers and memory Example: addl %ebx, %eax is emulated as: enum {EAX=0, EBX=1, ECX=2, EDX=3, …}; unsigned long regs[8]; regs[EAX] += regs[EBX];   Pro:   Simple!   Con:   Slooooooooow   Example hypervisor: BOCHS   Run the VM directly on the CPU – no emulation!   Most of the code can execute just fine   E.g., addl %ebx, %eax   Some code needs hypervisor intervention   int $0x80   movl something, %cr3   I/O   Trap and emulate it!   E.g., if guest runs int $0x80, hypervisor traps it and executes guest’s interrupt 0x80 handler   Pro:   Performance!   Cons:   Harder to implement   Need hardware support   This hardware support is called VMX (Intel) or SVM (AMD)   Exists in modern CPUs   Example hypervisor: KVM   Take a block of binary VM code that is about to be executed   Translate it on the fly to “safe” code (like JIT – just in time compilation)   Execute the new “safe” code directly on the CPU   Translation rules?   Most code translates identically (e.g., movl %eax, %ebx trans...
View Full Document

This document was uploaded on 02/19/2014 for the course ECE 429 at Illinois Tech.

Ask a homework question - tutors are online