• No results found

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

N/A
N/A
Protected

Academic year: 2021

Share "CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization"

Copied!
33
0
0

Loading.... (view fulltext now)

Full text

(1)

CS 695 Topics in Virtualization and Cloud Computing More Introduction

(2)

Process vs. System view of “machine”

ABI – application binary interface

(3)

Process Virtual Machine

(4)

System Virtual Machine

(5)

Virtual Machine Applications

(6)

System VM benefits

Single application containers---reliability, isolation, security

Mixed OS environments (legacy apps)

Multi-platform application development

Software testing and debugging

Version transitioning

Event monitoring and checkpointing

Record-replay, migration of machines

IaaS

(7)

Scope of course (revisited)

How to provide system-level virtualization?

Common problems/approaches

Specific techniques/optimizations

Assuming VMs exist (and can be flexed) ...

How to exploit/use them to meet IaaS requirements?

(8)

Key VMM responsibilities

State management

Switch VMs

Resource control

VM has access to resources when scheduled

cpu, memory region etc.

VMM owns & controls all resources

VMM is required to control/arbitrate

hardware resources

(9)

Ex.1 : Process virtual memory example

(10)

VA to RA conversion

Each process provided with a (virtual) linear address space

Translation via a system call

Number of page tables?

When process switches what happens?

(11)

Ex.2 : The interval time

interval timer

OS (privileged) resource

Set value to timer (register) when process scheduled

Timer ticks to zero (time to deschedule process)

Interrupt on regs value zero

OS handles interrupt, schedules (new) process

How to manage interval timer with VMs?

Should OS of VM be able to read/write interval timer?

Write

Read

(12)

Processor Virtualization

Different ISAs of guest and host

Emulation

Binary translation

Same ISAs of guest and host

Direct native execution

In all cases?

(13)

Virtualizability properties

Popek & Goldberg (1974)

VMM should satisfy following properties

1. Efficiency

Innocuous instructions natively executed 2. Resource control

No direct control on physical resources for guest 3. Equivalence

Identical behavior on native and virtual environments

Performance and resource availability exceptions

(14)

Modes of execution

User mode

Guest OS

VMM

Privileged mode (System mode)

VMM

(15)

Types of instructions

Privileged instructions

Reduced functionality or no-permissions in user mode

Generate trap when executed in user mode

E.g.,

LPSW (load processor status word from memory location)

Set CPU mode, PC etc.

SPT (set cpu timer)

(16)

Types of instructions

What should be condition on guest VMs?

(17)

Does this satisfy G&P conditions?

(18)

Does this satisfy G&P conditions?

Theorem 1:

VMM can be constructed if, sensitive subset of priviliged

Theorem 2:

VMM is virtualizable

(19)

What about problem cases?

Sensitive but unprivileged instructions

Critical instructions

1. popf, pushf

no-op for interrupt enable/disable in user mode

sensitive instruction

2. %cs register

Expose CPL to process (Guest OS in ring 3)

3. lar, lsl

Load access rights, load segment limits

Answer depends on privilege level

Guest OS is at ring 3!

(20)

Handling Criticial instructions

Scan and patch

Paravirtualization

Replace criticial instructions with new 'safe' versions

New ISA exported by VMM

Guest OS needs to re-implement/re-compile

Hardware-assisted virtualization

AMD-V, VT-X

Root and non-root modes

Configure exit conditions

(21)

Resource virtualization - Memory

What do Guest VMs expect?

A linear memory address space

“Real” addressable area, staring from 0x00000000

Memory for processes

Virtual memory (and paging)

(22)

Paging on Native Systems

cr3

page directory

page table

page

(23)

Paging on Native Systems

(24)

Resource virtualization - Memory

What do Guest VMs expect?

A linear memory address space

“Real” addressable area, staring from 0x00000000

Memory for processes

Virtual memory (and paging)

How to virtualize memory to meet these requirements?

(25)

Terminology

guest virtual address

gfn : guest frame number

pseudo-physical address

pfn : physical frame number

machine address

mfn : machine frame number

(26)

(Two-level) translation

Virtual address of process in guest VM needs a real physical address

Pseudo-physical address

Guest virtual

address Machine

address

v2p p2m

Guest OS VMM

(27)

Direct Mapping

(28)

Shadow Paging

(29)

Hardware-assisted

(30)

Memory virtualization performance (1)

(31)

Memory virtualization performance (2)

(32)

What about the TLB?

Translation lookaside buffer

v2m mapping in cache

When is TLB flushed?

Virtualizing the TLB

(33)

Next class

[kvm]

Next week

[kvm]

[xen]

References

Related documents

order to contest the decisions of directors and majority shareholders: the derivative order to contest the decisions of directors and majority shareholders: the

Based on these relationships, we hypothesize that temperature is a leading control over the isotopic values of water in the Fredericksburg region, and that groundwater has

The following members voted yea, to-wit: Bieritz, Bird, Boyd, Brenneman, Butler, Fourez, Golden, Green, Haton, Mackiewicz, Mockbee, Morse, Nesbitt, O’Kane, Becky Stark, Bruce

The Electric Vehicle can be charged from a suitable outlet via an OBC the AC-DC converter or rectifier is the first stage of an OBC which converts the available AC supply into

WP 1, “The more militaristic a CEO, the more likely his/her firm will be to violate financial regulations,” is supported by seven of ten, or 70%, of cases, while six of seven, or

The procedure is made for ship to ship bunkering of LNG in a port environment, with a dedicated bunker ship rapidly delivering the fuel to client ships while cargo and

Pilot Virtualization Consolidated Virtualization Assured Computing Private Cloud Static VM deployment — manual resource reclamation Separate virtual and physical mgt tools

Topics include cloud computing, distributed storage systems, virtualization, distributed systems architectures, technologies and management; distributed system design,