Thursday, March 16, 2006

Abstract & Synopsis

OpenDos
An
Open Source
Dynamic Optimization System

ABSTRACT

Dynamic optimization refers to the runtime optimization of a native program binary. Dynamic binary translation is an important area for compiler research, because additional information available at runtime can substantially improve the effectiveness of optimizations. The challenge is to monitor a process during its execution. We are building a system for monitoring and modifying a program’s behavior while it is running. The runtime environment exposes several execution paths that have not been discovered during static optimization. This gives us several opportunities for performing optimizations even though the binary is statically optimized.
As the 90-10 rule 90% of the program execution time is used for 10% of the program region. The main aim of our system is to identify this 10% and optimize it. The lightweight dynamic binary optimizer is a software that optimizes the executables at run-time. This optimizer is aimed to optimize i386 executables of ELF format. It is entirely user-level software, which works on the native binaries.
As the binaries shipped by the vendors are not fully optimized there are various opportunities for optimizing these binaries. Also as optimization is done at runtime no extra code is added to the binary. Also our system exploits the runtime information available to it. This includes information about the taken branches, frequently executed path etc.
Using this information we can apply certain optimizations, which are termed aggressive during static compilation. Also our system is an open source effort towards dynamic optimization.




Project name : OpenDos – Dynamic Optimization System
College :Maharashtra Academy Of Engineering.

Project group

1.Poornima.P.Kamath . email-id: kamath.poornima@gmail.com.
2.Divya Sasidharan email-id: divya.in@gmail.com
3.Sumit Kumar email-id: sumit.pmb@gmail.com.
4.Sandeep Kumar email-id: sandeepksinha@gmail.com.

Project Guides:
Internal guide: Prof Pallavi Talegaonkar.
External guide: Mr Saurabh Verma (Codito technologies)
Sponsored by: Codito Technologies, Pune.




SYNOPSIS


1.1 Problem Statement:
Static optimization techniques do not perform optimization across shared libraries. Also legacy code where code is unavailable cannot be optimized using static techniques .
1.2 Soultion:
A solution to above problem is dynamic optimization. Dynamic optimizers apply code to an executing application. Applying optimizations dynamically provides several benefits over static optimization, particularly for control-intensive programs. For example dynamic optimization span branches and calls including calls to dynamically linked code, which typically hinder static optimizations. In many cases, a dynamic optimizer is able to identify and optimize longer hot execution paths than a static optimization. Also because it naturally and transparently profiles during execution, a dynamic optimizer can adapt to changing program behaviour.

1.3 Functional Description:
1.Region selection.
The optimizer observes the execution and generates a series of traces (code which is executed frequently) that represent the common dynamic sequencing of instructions.
2.Optimization.
It applies optimizations or transformations to the generated code traces.
3. Optimized region storage(fragment cache)
It stores the optimized code traces in a software based code cache.
4.Dispatch of optimized code.
It intercepts execution and directs it to code cache for all future executions of the optimized code traces until program termination.

2.1 OUR SYSTEM DESIGN

The Image Cannot be Displayed.


MAIN COMPONENTS
1. Bootstrapper:
This module intercepts control from the running binary and gives control to our interpreter.It loads and initializes all the modules of our system.

2.Interpreter.
This module does the job of profiling the executable.
It performs two tasks, a).It disassembles the binary till it gets a control transfer instruction.
b).It simulates control transfer instructions and processes and records the frequently executed hot regions.

3.Epilog-Prolog adder.
This module adds the epilog and prolog code along with exit stubs and compensation code.As we execute hot code from fragment cache, there has to be a change in context between executable and fragment code.
So the epilog and prolog code saves the register context

4.Optimizer.
The optimizer optimizes the hot code. The optimizer performs optimizations like constant propagation. Copy propagation, etc.

5.Fragment cache manager.
The hot code that is frequently executed code is stored in fragment cache. This code is in binary and is stored in a software code cache.
This is managed by fragment manager.
2.2 Software Process Life Cycle
The primary tasks involved in this project is to profile the executable as well as optimize it at runtime . We can increase the optimizations in each release Hence we use the Incremental model for the development of the project.

2.3 Platforms
The dynamic optimizer we are developing is a user level software on linux platform. It is for i386-Elf executables.


2.4 Area of work

Main category
Software
Subcategory:
System applications









2.5 Function point analysis

Measurement parameter Count Complex Count*average
Number of user input 1 6 6
Number of user output 1 7 7
Number of files 21 15 315
Count-total 328

FP= 328*(0.65+0.01*sum(Fi)) ,Fi=8
FP=239.44


2.6 Test Suites:

SPEC 2000 benchmarks
1.wc
2.bzip2
3.gzip



2.7 References:

[1] Sanjeev Banerjia Vasanth Bala, Evelyn Duesterwald. Dynamo: A transparent dynamic optimization system.
http://www.hpl.hp.com/techreports/1999/HPL-1999-78.pdf


[2] Trek Palmer. Design and implementation of SIND, A Dynamic Binary Translator.
http://www.cs.unm.edu/~darko/papers/palmer-ms-thesis.pdf

0 Comments:

Post a Comment

<< Home