19.05.2013 Views

Facoltà di Ingegneria Tesi di laurea ANALISI DELLE TECNOLOGIE ...

Facoltà di Ingegneria Tesi di laurea ANALISI DELLE TECNOLOGIE ...

Facoltà di Ingegneria Tesi di laurea ANALISI DELLE TECNOLOGIE ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

applicazioni “user mode” sono eseguite <strong>di</strong>rettamente come girassero in modo nativo (cioè<br />

<strong>di</strong>rettamente sull’hardware).<br />

Figura 2.13: Binary Translation - user applications are not translated, but run <strong>di</strong>rectly. Binary Translation<br />

only happens when the guest OS kernel gets called.<br />

Il co<strong>di</strong>ce kernel, invece, deve attraversare il passaggio <strong>di</strong> traduzione del BT: si può <strong>di</strong>re che il<br />

kernel dell’OS guest non venga più eseguito e che il kernel tradotto dal BT giri effettivamente<br />

nel ring 1. In alcuni casi il co<strong>di</strong>ce kernel tradotto è una copia esatta del co<strong>di</strong>ce originale, ma ci<br />

sono parecchi casi in cui il BT deve rendere il co<strong>di</strong>ce tradotto un po’ più lungo <strong>di</strong> quello<br />

originale. Se il kernel dell’OS guest deve eseguire un’istruzione privilegiata, il BT cambia<br />

questo tipo <strong>di</strong> co<strong>di</strong>ce in un co<strong>di</strong>ce utente “più sicuro” (sicurezza intesa per gli altri sistemi<br />

operativi guest e per il VMM); se il kernel deve prendere il controllo dell’hardware fisico, il<br />

BT sostituisce il co<strong>di</strong>ce binario associato con un co<strong>di</strong>ce che manipola l’hardware virtuale<br />

[19].<br />

Per illustrare più dettagliatamente il processo <strong>di</strong> traduzione, si può fare un piccolo esempio<br />

[20]: consideriamo la funzione isPrime (in linguaggio C, verifica se il suo argomento è un<br />

numero primo),<br />

31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!