Master thesis presentation July 16th, 2009 Erik van der Kouwe ...
Transcript of Master thesis presentation July 16th, 2009 Erik van der Kouwe ...
Master thesis presentationJuly 16th, 2009
Erik van der Kouwe
Computer Systems SectionDepartment of Computer Science
Faculty of ScienceVrije Universiteit Amserdam
Introduction to virtualization
Introduction to QEMU
Introduction to MINIX 3
Research questions
Porting QEMU
Testing QEMU
Performance
Conclusion
One system emulates one or more VMs• Each runs its own guest operating system
• VMs isolated from each other and from host
Uses• Security research• Server farms• Software development
Approaches• Native execution Guest code run directly in reproduced environment
Sensitive instructions are a problem
• Dynamic binary translation Guest code translated into safe host code
• Paravirtualization Guest calls hypervisor to avoid sensitive instructions
Open source virtualizer
Uses dynamic binary translation• Alternative: direct execution with kernel module
Advantages• General purpose full-system virtualization
• Portable across hosts and guests
• Entirely in user space
Disadvantages• Slower than alternatives
Open source OS, built at the VU
Microkernel• Reduce amount of high-privilege code
Advantages• Simple and structured → suitable for education
• Small and reliable → suitable for embedded systems
Disadvantages• Few applications and drivers → small community
• Many context switches → less performance
Can MINIX 3 run virtualization software? • What issues does one encounter when porting
complex software to MINIX 3?
• Is it necessary to change MINIX 3 to be able to
run QEMU?
Is the microkernel design an obstacle for
performance?
• Can bottlenecks be solved within this design?
• Is QEMU usable on MINIX in practice?
Use the right compiler
Port packages QEMU depends on
Allow QEMU to read MINIX binaries
Functionality missing in MINIX• Add if essential for QEMU to work
• Avoid using otherwise
Debugging
Simply run many operating systems• MINIX (3.1.2a, 3.1.4)
• Linux (Debian, Slackware)
• Windows (95, 98)
And browsers to test networking• Mozilla Firefox
• Internet Explorer
Findings• Clock resolution is an issue
• Performance acceptable for all but Linux
Benchmarks for various activities• Arithmetic, disk, display, interrupts, memory,
network, task switching, ...
Configurations• Tested with MINIX 3.1.2a and Linux
• Both used as host and guest (4 combinations)
• Compared with native to find slow-down
Overall slow-down just over 10ו Slightly worse than Linux
Bottlenecks in MINIX
• Floating point
FPU not supported
• Disk input/output
Small disk cache
• Graphics
No hardware acceleration
• Interrupts
Setjmp/longjmp
• Network throughput
Pauses while sending
0,5
1
2
4
8
16
ari
thm
eti
c_fl
oa
t
ari
thm
eti
c_in
t
ble
nd
ed
_c
om
pil
em
inix
flo
w_c
all
flo
w_
co
nd
itio
na
l
flo
w_e
xc
ep
tio
n
flo
w_ju
mp
tab
le
flo
w_sy
sca
ll
flo
w_ta
sksw
itc
h
io_
dis
k_
rea
d_
ran
do
m
io_d
isk
_re
ad
_se
qu
en
tia
l
io_
dis
k_
wri
te_ra
nd
om
io_
dis
k_
wri
te_
seq
ue
nti
al
io_
dis
pla
y
io_
ne
two
rk_
late
nc
y
io_
ne
two
rk_
thro
ug
hp
ut
me
mo
ry_
loa
d_ra
nd
om
me
mo
ry_
loa
d_se
qu
en
tia
l
me
mo
ry_
sto
re_ra
nd
om
me
mo
ry_
sto
re_
seq
ue
nti
al
Slow-
down of
MINIX
compar
ed to
Linux
(emulat
ing
Linux)
Slow-
down of
MINIX
compar
ed to
Linux
(emulat
ing
MINIX)
Yes, MINIX can run QEMU• But modifications are desirable
Yes, performance is comparable to Linux• Most bottlenecks are unrelated to microkernel
design
• But: comparison based on pure binary translation
Other results of research• Usable virtualization for MINIX
• Manual for porting software to MINIX
• List of additions/improvements desirable for MINIX