System Software Internals Advanced

Post on 09-Apr-2016

15 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Advanced Features in Anna University SSI Syllabus

Transcript

Unit – 5Advanced Features

Syllabus

Instruction Set Issues – Profiling –Migration – Grids – Code optimizations –

Garbage Collection

Book

James E. Smith and Ravi Nair, “Virtual Machines”, Elsevier, 2005.

Overview

• Instruction Set Issues

• Profiling

• Migration

• Grids

• Code Optimizations

• Garbage Collection

Instruction Set Issues

Instruction Set Issues

• Register architectures

• Condition codes

• Data formats and Arithmetic

• Memory address resolution

• Memory data alignment

• Byte order

• Addressing architecture

Instruction Set Issues

• Register architectures

• Condition codes

• Data formats and Arithmetic

• Memory address resolution

• Memory data alignment

• Byte order

• Addressing architecture

Profiling

Profiling

• Process of collecting instruction and data statistics for an executing program

• Can be used as input to code-optimization process

Static Profiling

Dynamic Profiling

Types of Profiling

• Frequency of execution of code regions

• Based on control flow predictability

• Path profile

Collecting Profiles

• Two ways• Instrumentation-based profiling

• Targets specific program-related events and counts all instances of the events being profiled

• Hardware instrumentation

• Software instrumentation

• Sampling-based profiling• Program runs unmodified and at fixed or random intervals, the

program is interrupted and an instance of a program-related event is captured

Profiling during Interpretation

• Two key points to be considered• Source instructions are actually accessed as data

• Interpreter routines are the code that is being executed

• For block profiling• Profile code should be added to all control transfer

instructions

• For edge profiling • Same control transfer instructions are profiled along

with both the PC of the control transfer instruction and the target are used (defines the specific edge)

Profiling during Interpretation

Profiling Translated Code

Profiling overhead

• More memory and time consuming

• Ways to reduce• Reduce number of instrumentation points

• Using heuristics

• And so on

Code Optimization

Code Optimizations

Code Optimizations

Code Optimizations

Code Optimizations

Code Optimizations

Inter-superblock Optimization

Instruction-set-specific Optimizations • Two examples

• Unaligned load optimization

• if conversion

Garbage Collection

Garbage Collectors

• Mark and sweep

• Compacting

• Copying

• Generational

• Incremental and concurrent

Compacting Collectors

Copy Collectors

Generational Collectors

• Two sub-heaps• Nursery

• Tenured

Incremental and Concurrent Collectors

Comparison

Migration

VM Migration

Internet Suspend/Resume (ISR)

State Encapsulation

• Stanford Collective Project

• State of the VM is sent directly to the destination computer rather than to a DFS

State Encapsulation

• Reducing memory state before migration• Balloon program

• Reducing the size of the transmitted packet• Copy-on-write

• Reducing Start-up time on a Resume• Incremental build-up on demand

• Reducing transmission time and bandwidth by exploiting redundancy in disk blocks• Hashed copy

Migration in Vmotion

• Load balancing• To improve the response time of the system through better

utilization of resources

• Security• To quarantine a virtual machine that has been attacked

• Collocation• To bring communicating virtual machines closer together

• Fault tolerance• To move a failing host to another processor

• Power management• To move the load away from an overheated processor

• Maintenance• To move the load away from some processor while it is upgraded

Migration in Vmotion

• Steps• Check if running VM is stable

• Baseline copy to the new host

• Copy VM’s changed state to new host

• Activate the VM in new host

Grids

Grid Computing

Characteristics of a grid

• Infrastructure

• Dependability of Service

• Consistency of Service

• Pervasive Access

• Inexpensive Access

• Coordinated Resource Sharing

• Dynamic Communities

Comparison with Conventional VMs• Efficient Utilization of Resources

• Sharing of Resources

• Distributed Vs Centralized Control

• Heterogeneous Nodes

• Adaptation of Applications

• Portability of Applications

Recap

• Instruction Set Issues

• Profiling

• Migration

• Grids

• Code Optimizations

• Garbage Collection

top related