Beruflich Dokumente
Kultur Dokumente
Computing
Sorav Bansal
Administrivia
• Webpage:
http://www.cse.iitd.ernet.in/~sbansal/csl862
• Syllabus: Lectures + Papers discussed in class
• Assignments:
– First time students
• Assignments to introduce to concepts of virtualization
and cloud
– Second time students
• Research Project
What to Expect
• Deep Understanding of Virtualization Internals
• Heavy Programming
– Pre-requisite: Must have done significant
programming in OS course
– Many new concepts and a new environment
• Understanding of Cloud Computing and Related
Technologies
• Systems Research Papers
– Expect you to read the paper before attending lecture
– Often, the lecture will be organized as a discussion
based on your understanding of the paper
History of Computing
Disk Size
Hardware Trends: Power
2020 IT Carbon Footprint
2007 Worldwide IT
carbon footprint:
2% = 830 m tons CO2
Comparable to the
global aviation
industry
Capacity $
Machines
Demand Capacity
Demand
Time Time
“Statically provisioned” “Virtual” data center
data center in the cloud
Unused resources
Risk of Under-utilization
• Underutilizations occur if “peak” predictions
too optimistic
Capacity
Unused resources
Resources
Demand
Time
Resources
Capacity
Demand
Resources
Capacity 1 2 3
Time (days)
Demand Lost revenue
1 2 3
Resources
Time (days)
Capacity
Demand
1 2 3
Time (days)
Lost users
20
“Risk Transfer” to Cloud
• Not (just) Capital Expense vs. Operation Expense!
• “Cost associativity”: 1,000 CPUs for 1 hour same
price as 1 CPUs for 1,000 hours (@$0.08/hour)
• Major enabler for SaaS startups
– Animoto traffic doubled every 12 hours for 3 days when
released as Facebook plug-in
– Scaled from 50 to >3500 servers
– ...then scaled back down
• Gets IT gatekeepers out of the way
– not unlike the PC revolution
Classifying Clouds
• Instruction Set VM (Amazon EC2)
• Managed runtime VM (Microsoft Azure)
• Framework VM (Google AppEngine)
• Tradeoff: flexibility/portability vs. “built in”
functionality
Lower-level, Higher-level,
Less managed More managed
Application
1 Application
2
OS
Hardware
Virtualized Picture
Guest OS 1 Guest OS 2
Virtual Hardware Virtual Hardware
• How?
– Binary translation
– Memory virtualization
– Device emulation (Disk, NIC, …)
• Looking ahead…
Advantages of Virtualization
• Server consolidation
OS OS OS
VMM
Hardware
MMU Controller
Local Bus
Interface
High-Speed
I/O Bus
Frame
NIC Controller Bridge
Buffer
LAN
Low-Speed
I/O Bus
CD-ROM USB
Condition Codes
Integer
Fetch Decode Registers Issue
Memory
FP
Instruction Groupings
– Hardcoded Vectors
– Dispatch Table
• System Clock User
• MMU Extension
– TLB Level 1
e’(Si’)
Si ’ Sj ’
Host
if (CPUState.IRQ
&& CPUState.IE) {
CPUState.IE = 0;
CPU_Vector(EXC_INT);
}
}
}
Unprivileged
Page Undef
Fault Instr
vIRQ
Privileged
MMU CPU I/O
Emulation Emulation Emulation
Translator
CPU
TC Translation Callouts Emulation
Index Cache Routines
return start;
}
CPU_STI();
CPUState.PC += 4;
if (CPUState.IRQ
&& CPUState.IE) {
CPUVector();
BT_Continue();
/* NOT_REACHED */
}
return;
}
eax == 0
eax == 0
• Is it always possible?
– When is it possible?
x: Original
tx:
Binary Translated
code code
fragment Translator fragment
Use a Cache
x: Original
tx:
Binary Translated
code code
fragment Translator fragment
Translation
Cache
not-found
Direct Jump Chaining
Ta
a
lookup(b) lookup(c)
b c
Tb Tc
d
lookup(d) lookup(d)
Td
Indirect Jumps
push b
jmp Tf
call
Ta
a
Tf
f
b tmp JTABLE[retaddr & MASK]
if (tmp.src == retaddr)
ret goto tmp.dst
pop retaddr
lookup(retaddr)
Tb
Binary Translation Example
f(x) = -1 if x < 0
0 ow Translated:
Guest
OS
+App
VMM sets up the
VA Page
translation tables from
Page Tables VA to PA
VMM
(S/W)
PA Page
Page Tables
(H/W)
MA Page SLOW!!
Physical Memory Each memory access needs to
be translated in software
Memory Virtualization
• Better Option
•VMM sets up the translation
tables from VA MA directly.
Guest
OS •VMM maintains separate page
+App tables from VAPA to perform
bookkeeping (also called shadow
page tables)
VA Page
Linux
Linux XP Vista MacOS
(devel)
Hardware
Hosted Monitor Architecture
User
app
Guest OS (Linux)
Kernel
Virtual Machine Monitor
module
Host OS (Windows XP)
Hardware
VMware ESX 2.0
Source: http://www.vmware.com/pdf/esx2_performance_implications.pdf
Xen 3.0
• Mobile desktops
– USB stick (Moka5)
– Leverage the cloud to de-couple data from devices
• Enterprise IT infrastructure
– Use secured/restricted-use company VMs on employee laptops
Cloud Computing Synonyms
• Platform-as-a-service
• Software-as-a-service
• Grid Computing (Sun)
• Utility Computing (IBM)
• Ubiquitous computing
• IBM Mainframes
What has changed?
• Connectivity
• Many small-to-medium sized users
• Maintenance cost
• Device Variety
• Cost model
• Pricing model
OS OS OS
VMM
IBM Mainframe
OS OS OS
“Cloud-OS”
“Cloud-OS”
• Infrastructure Layer (slave) + Management
layer (master)
• Unit of abstraction = VM
• Divide hardware into resource pools
• Efficient
• Effective Isolation
• Dynamic
• Fault-Tolerant
Virtualization “Add-ons”
Addons:
• Record/Replay
• Monitoring
• Security
• Software Version Control
• Virtual Appliances