<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-19089662</id><updated>2011-04-21T15:54:23.621-07:00</updated><title type='text'>OpenDOS</title><subtitle type='html'>An Open Source Dynamic Optimization System.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19089662.post-114749866720191346</id><published>2006-05-12T22:36:00.000-07:00</published><updated>2006-05-12T22:37:47.266-07:00</updated><title type='text'>Verge of Release</title><content type='html'>Hi frens,&lt;br /&gt;Finally OpenDos is on its verge to realease. And will available for downloads soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-114749866720191346?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/114749866720191346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=114749866720191346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/114749866720191346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/114749866720191346'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2006/05/verge-of-release.html' title='Verge of Release'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-114249949969859387</id><published>2006-03-16T00:58:00.000-08:00</published><updated>2006-03-16T01:01:30.266-08:00</updated><title type='text'>Abstract &amp; Synopsis</title><content type='html'>OpenDos&lt;br /&gt;An&lt;br /&gt;Open Source&lt;br /&gt;Dynamic Optimization System&lt;br /&gt;&lt;br /&gt;ABSTRACT&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;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.&lt;br /&gt;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.&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Project name : OpenDos – Dynamic Optimization System&lt;br /&gt;College :Maharashtra Academy Of Engineering.&lt;br /&gt;&lt;br /&gt;Project group&lt;br /&gt;&lt;br /&gt;1.Poornima.P.Kamath . email-id: kamath.poornima@gmail.com.&lt;br /&gt;2.Divya Sasidharan email-id: divya.in@gmail.com&lt;br /&gt;3.Sumit Kumar email-id: sumit.pmb@gmail.com.&lt;br /&gt;4.Sandeep Kumar email-id: sandeepksinha@gmail.com.&lt;br /&gt;&lt;br /&gt;Project Guides:&lt;br /&gt;Internal guide: Prof Pallavi Talegaonkar.&lt;br /&gt;External guide: Mr Saurabh Verma (Codito technologies)&lt;br /&gt;Sponsored by: Codito Technologies, Pune.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SYNOPSIS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.1 Problem Statement:&lt;br /&gt;Static optimization techniques do not perform optimization across shared libraries. Also legacy code where code is unavailable cannot be optimized using static techniques .&lt;br /&gt;1.2 Soultion:&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;1.3 Functional Description:&lt;br /&gt;1.Region selection.&lt;br /&gt;The optimizer observes the execution and generates a series of traces (code which is executed frequently) that represent the common dynamic sequencing of instructions.&lt;br /&gt;2.Optimization.&lt;br /&gt;It applies optimizations or transformations to the generated code traces.&lt;br /&gt;3. Optimized region storage(fragment cache)&lt;br /&gt;It stores the optimized code traces in a software based code cache.&lt;br /&gt;4.Dispatch of optimized code.&lt;br /&gt;It intercepts execution and directs it to code cache for all future executions of the optimized code traces until program termination.&lt;br /&gt;&lt;br /&gt;2.1 OUR SYSTEM DESIGN&lt;br /&gt;&lt;br /&gt;The Image Cannot be Displayed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MAIN COMPONENTS&lt;br /&gt;1. Bootstrapper:&lt;br /&gt;This module intercepts control from the running binary and gives control to our interpreter.It loads and initializes all the modules of our system.&lt;br /&gt;&lt;br /&gt;2.Interpreter.&lt;br /&gt;This module does the job of profiling the executable.&lt;br /&gt;It performs two tasks, a).It disassembles the binary till it gets a control transfer instruction.&lt;br /&gt;b).It simulates control transfer instructions and processes and records the frequently executed hot regions.&lt;br /&gt;&lt;br /&gt;3.Epilog-Prolog adder.&lt;br /&gt;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.&lt;br /&gt;So the epilog and prolog code saves the register context&lt;br /&gt;&lt;br /&gt;4.Optimizer.&lt;br /&gt;The optimizer optimizes the hot code. The optimizer performs optimizations like constant propagation. Copy propagation, etc.&lt;br /&gt;&lt;br /&gt;5.Fragment cache manager.&lt;br /&gt;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.&lt;br /&gt;This is managed by fragment manager.&lt;br /&gt;2.2 Software Process Life Cycle&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;2.3 Platforms&lt;br /&gt;The dynamic optimizer we are developing is a user level software on linux platform. It is for i386-Elf executables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.4 Area of work&lt;br /&gt;&lt;br /&gt;Main category&lt;br /&gt;Software&lt;br /&gt;Subcategory:&lt;br /&gt;System applications&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.5 Function point analysis&lt;br /&gt;&lt;br /&gt;Measurement parameter Count Complex Count*average&lt;br /&gt;Number of user input 1 6 6&lt;br /&gt;Number of user output 1 7 7&lt;br /&gt;Number of files 21 15 315&lt;br /&gt;Count-total 328&lt;br /&gt;&lt;br /&gt;FP= 328*(0.65+0.01*sum(Fi)) ,Fi=8&lt;br /&gt;FP=239.44&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.6 Test Suites:&lt;br /&gt;&lt;br /&gt;SPEC 2000 benchmarks&lt;br /&gt;1.wc&lt;br /&gt;2.bzip2&lt;br /&gt;3.gzip&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.7 References:&lt;br /&gt;&lt;br /&gt;[1] Sanjeev Banerjia Vasanth Bala, Evelyn Duesterwald. Dynamo: A transparent dynamic optimization system.&lt;br /&gt;http://www.hpl.hp.com/techreports/1999/HPL-1999-78.pdf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[2] Trek Palmer. Design and implementation of SIND, A Dynamic Binary Translator.&lt;br /&gt;http://www.cs.unm.edu/~darko/papers/palmer-ms-thesis.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-114249949969859387?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/114249949969859387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=114249949969859387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/114249949969859387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/114249949969859387'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2006/03/abstract-synopsis.html' title='Abstract &amp; Synopsis'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113628251174027320</id><published>2006-01-03T02:00:00.000-08:00</published><updated>2006-01-03T02:03:54.926-08:00</updated><title type='text'>SOFTWARE REQUIREMENT SPECIFICATION</title><content type='html'>&lt;span style="font-weight: bold;"&gt;                          OpenDos&lt;br /&gt;               The OpenSource&lt;br /&gt;    Dynamic Optimization System&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;&lt;br /&gt;1.1Purpose.&lt;br /&gt;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.&lt;br /&gt;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.&lt;br /&gt;The lightweight dynamic binary optimizer is software that optimizes the executables at run-time. This optimizer is aimed to optimize i386 executables .It is an entirely a user-level software which works on the native binaries.&lt;br /&gt;This SRS describes the functions and performance requirements of the optimizer.&lt;br /&gt;1.2Document Conventions&lt;br /&gt;&lt;br /&gt;1.3 Intended audience&lt;br /&gt;This SRS is intended for the developers and users.&lt;br /&gt;&lt;br /&gt;1.4 Scope of the Development Project&lt;br /&gt;&lt;br /&gt;Context:&lt;br /&gt;The aim of our project is to develop a Dynamic optimization system. The function of this system will be to generate a more optimized version of the executable at the run time and gain performance. We bootstrap into the executable by compiling the system as a pre-loadable library and finally integrate it with the executable.&lt;br /&gt;&lt;br /&gt;Information Objective:&lt;br /&gt;Our project doesn’t accept anything as input; it is transparent enough to integrate itself to the binary, which is going to be executed. We actually find the hot codes in the executable and after converting them into an optimized version; we execute it natively on the machine. The output is the performance gain that we achieve by optimizing those fragments, which are optimized.&lt;br /&gt;&lt;br /&gt;Function and performance:&lt;br /&gt;Our software will first be loaded into the address space of the executable, which is going to be executed. Then it tries to bootstrap into the executable and take the control from it and then interpret the code that was going to be executed.&lt;br /&gt;No performance gain will be achieved in the initial phase of execution but later on, once most of the hot regions are identified, there will be gain in the performance.&lt;br /&gt;&lt;br /&gt;Limitations:&lt;br /&gt;&lt;br /&gt;1. Takes away cycles from program.&lt;br /&gt;2. Especially slow at start.&lt;br /&gt;3. Debugging can be difficult:&lt;br /&gt;&lt;br /&gt;1.5. Definitions, Acronyms, and Abbreviations&lt;br /&gt;&lt;br /&gt;DOS : Dynamic optimizer system .&lt;br /&gt;&lt;br /&gt;1.6 Refernces&lt;br /&gt;&lt;br /&gt;1.7 Overview of document&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Overall description&lt;br /&gt;&lt;br /&gt;2.1 Product perspective&lt;br /&gt;&lt;br /&gt;The dynamic optimizer is a user level system. It consists of various shared library modules. These are invoked as soon as the executable is loaded. They are loaded before the other DLLs. The system intercepts the control from the executable and control is given to the dynamic optimizer system (DOS).&lt;br /&gt;The DOS executes the executable by monitoring it that is executable executes under the control of the DOS. As the 90-10 rule 90% of the program execution time is used for 10% of the program region. The main aim of the DO is to identify this 10% and optimize it.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.&lt;br /&gt;Also DOS exploit the runtime information available to them. This includes information about the taken branches, frequently executed path etc., which allows the DOS to perform path specific optimizations. Using this information we can apply certain optimizations, which are termed aggressive during static compilation.&lt;br /&gt;&lt;br /&gt;2.2 Product functions&lt;br /&gt;&lt;br /&gt;The functions of the DOS are&lt;br /&gt;1.Find the hotspots in the program.&lt;br /&gt;2.Optimize these hotspots using appropriate optimization techniques.&lt;br /&gt;3.Cache these optimized hotspots in a software code cache.&lt;br /&gt;4.On subsequent encounter of the same hot code execute from the code cache.&lt;br /&gt;&lt;br /&gt;2.3 User classes.&lt;br /&gt;&lt;br /&gt;This optimizer is user level software and intended to make the executable run faster.&lt;br /&gt;It can be used&lt;br /&gt;1.  To run application software.&lt;br /&gt;2. To run legacy applications where recompiling is very costly which thus provides    ample opportunities for optimizations.&lt;br /&gt;&lt;br /&gt;2.4 Operating environment.&lt;br /&gt;&lt;br /&gt;The optimizer works in user space.&lt;br /&gt;It is designed for the i386 architecture to run Linux executables.&lt;br /&gt;&lt;br /&gt;2.5 Design and Implementation Constraints&lt;br /&gt;&lt;br /&gt;The executable should be an i386 executable.&lt;br /&gt;&lt;br /&gt;2.6 User Documentation&lt;br /&gt;&lt;br /&gt;2.7 Assumptions and Dependencies&lt;br /&gt;&lt;br /&gt;2.8 Overview of Data Requirements&lt;br /&gt;&lt;br /&gt;2.9 General Constraints, Assumptions, Dependencies, Guidelines&lt;br /&gt;&lt;br /&gt;2.10 User View of Product Use&lt;br /&gt;&lt;br /&gt;The user will be provided with an option whether he wants to run the application under our DOS (Dynamic Optimizer System). This the user can do by specifying as the command line argument –DOS if he intents to run his application under DOS.&lt;br /&gt;&lt;br /&gt;3   External interface requirements&lt;br /&gt;&lt;br /&gt;3.1 User interfaces (not applicable)&lt;br /&gt;&lt;br /&gt;3.2 Hardware interfaces (not applicable).&lt;br /&gt;&lt;br /&gt;3.3 Software interfaces&lt;br /&gt;&lt;br /&gt;We use the Binary File Descriptor (BFD) library for handling the executable.&lt;br /&gt;BFD is a library, which provides a single interface to read and write object files, the other DLLs. It makes changes in the ELF header so that control transfers to DOS after all DLLs are loaded and initializations are made.&lt;br /&gt;&lt;br /&gt;Inputs.&lt;br /&gt;The input to this preload library is the handle to the executable.&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;After this function the control will be with the next module.&lt;br /&gt;&lt;br /&gt;4.System Features&lt;br /&gt;&lt;br /&gt;4.1. Hot path (trace) selection.&lt;br /&gt;&lt;br /&gt;Once we get control, we have to execute the executable.&lt;br /&gt;For this we require 2 functions&lt;br /&gt;1.Disassembling&lt;br /&gt;2.Hot path selection.&lt;br /&gt;&lt;br /&gt;1. Disassembly&lt;br /&gt;Disassembler disassembles each instruction of the object code selectively.&lt;br /&gt;&lt;br /&gt;2.Hot path selection.&lt;br /&gt;&lt;br /&gt;The disassembled instruction is examined for control transfer instructions and hot path selector maintains this information. The non-control transfer instructions are copied as they are without disassembling to a page. A block of sequential instructions between two control transfer instructions is executed natively. Whenever there is a back edge the target of the back edge to the origin of the back edge itself is considered as candidate for a hot trace as it forms a loop. Then a count is maintained for this trace, which when exceeds the threshold level is considered as a hot trace and given for further optimization.&lt;br /&gt;&lt;br /&gt;Inputs&lt;br /&gt;The input is the start address of the main function of the executable. This address is obtained from the ELF header.&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;The output is selected hot path.&lt;br /&gt;Also each disassembled instruction is executed.&lt;br /&gt;&lt;br /&gt;4.2.Optimization.&lt;br /&gt;&lt;br /&gt;Purpose&lt;br /&gt;This function is to optimize the hot path obtained. The trace is analyzed and suitable optimization techniques are used to optimize it. Here a cost-benefit analysis is performed to select the appropriate optimization techniques to be applied.&lt;br /&gt;&lt;br /&gt;Input&lt;br /&gt;The input is selected hot trace.&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;The output is optimized trace, which is emitted into the code cache.&lt;br /&gt;&lt;br /&gt;4.3.Caching the trace in code cache.&lt;br /&gt;&lt;br /&gt;Purpose:&lt;br /&gt;The optimized trace is assembled and put into software code cache. This is to ensure that the next reference to this trace is executed from the code cache. The code cache is located in the same address space as the executable and is allocated during initialization of DOS.&lt;br /&gt;The main aim is to bring the whole 10% path frequently executing code inside the code cache so that the execution remains in the code cache for most of its time.&lt;br /&gt;&lt;br /&gt;Input&lt;br /&gt;The input is optimized hot trace.&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;The output is the cached trace.&lt;br /&gt;5.6 Special User Requirements&lt;br /&gt;5.6.1 Backup and Recovery&lt;br /&gt;5.6.2 Data Migration&lt;br /&gt;5.6.3 Data retention&lt;br /&gt;5.6.4 User Training&lt;br /&gt;5.6.5 Installation&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113628251174027320?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113628251174027320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113628251174027320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113628251174027320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113628251174027320'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2006/01/software-requirement-specification.html' title='SOFTWARE REQUIREMENT SPECIFICATION'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113628102862681328</id><published>2006-01-03T01:36:00.000-08:00</published><updated>2006-01-03T01:37:08.693-08:00</updated><title type='text'>Data structures and algorithms Part - I (all except Interpreter )</title><content type='html'>1.Bootstrapper.&lt;br /&gt;&lt;br /&gt;Data structures:&lt;br /&gt;1.Buffer to hold elf-header&lt;br /&gt;2. Location for address of start-up code where control has to go .&lt;br /&gt;3. START_ADDR: location for storing address of _start .&lt;br /&gt;4. Pointers for storing handles of shared libraries.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Algorithm&lt;br /&gt;1.Load the modules of DOS using dlopen.&lt;br /&gt;2.Store the handles.&lt;br /&gt;3.mmap the ELF header and mprotect it.&lt;br /&gt;4.Get address of startup code using dlsym on module containing it.&lt;br /&gt;5.Save the address of start in START_ADDR.&lt;br /&gt;6.Overwrite this address with address of startup code.&lt;br /&gt;7.Unmap the header.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.Startup-code&lt;br /&gt;&lt;br /&gt;Data structures.&lt;br /&gt;&lt;br /&gt;1.Context save area for the registers (array of structures).&lt;br /&gt;2.Buffer to be used as stack.&lt;br /&gt;3.Buffer to hold complete text segment.&lt;br /&gt;4.PROG_CTR to hold linear virtual address.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Algorithm&lt;br /&gt;1.Save the context into context save area.&lt;br /&gt;2.Initialize PROG_CTR to 0.&lt;br /&gt;3.Open the executable using bfd and get canonical form into buffer.&lt;br /&gt;4.Give control to interpreter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interpreter&lt;br /&gt;Data structures&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Algorithm&lt;br /&gt;It will get control from the startup code.&lt;br /&gt;&lt;br /&gt;It will call disassember to disassemble the instructions from PROG_CTR.&lt;br /&gt;The disassembler will return the no of bytes of sequential code and the next control transfer instruction..&lt;br /&gt;The interpreter calls linear executor and execute those sequential instructions natively.&lt;br /&gt;It then determines the type of control transfer instruction as given by disassembler.&lt;br /&gt;&lt;br /&gt;Types&lt;br /&gt;1 unconditional jump&lt;br /&gt;2.conditional jump&lt;br /&gt;3 call&lt;br /&gt;4 ret&lt;br /&gt;5 leave&lt;br /&gt;&lt;br /&gt;if unconditional and forward then change PROG_CTR to target of jump.&lt;br /&gt;Else&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Prologue and epilogue adder.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data structures.&lt;br /&gt;&lt;br /&gt;1.Buffer for trace- TRACE BUFFER.&lt;br /&gt;This will be dynamic and will be big enough to hold prologue ,epilogue&lt;br /&gt;Trace and compensation code.&lt;br /&gt;&lt;br /&gt;2..Stub lookup table.&lt;br /&gt;It will contain 3 fields.&lt;br /&gt;&lt;br /&gt;Virtual address of the exit instruction's destination.&lt;br /&gt;Stub address.&lt;br /&gt;Pointer (index) to compensation code buffer.&lt;br /&gt;no of instructions&lt;br /&gt;&lt;br /&gt;3.Next-counter NEXT_CTR.&lt;br /&gt;Gives the next free position in trace buffer.&lt;br /&gt;&lt;br /&gt;Algorithm&lt;br /&gt;&lt;br /&gt;1.Add code in trace buffer to restore the machine context.&lt;br /&gt;2.This is prologue code.&lt;br /&gt;3.Increment the NEXT_CTR  by size of above code.&lt;br /&gt;4.Add the code for trace into buffer.&lt;br /&gt;5.Increment the NEXT_CTR  by size of above code.&lt;br /&gt;6.Traverse this code and fill the stub address in the stub table with  the exit addresses i.e those coming out of trace.&lt;br /&gt;7.The optimizer will have filled some exits which have compensation code.&lt;br /&gt;8.Any remaining exits are to filled.&lt;br /&gt;9.Now in the stub-table fill in all stub address in the following way&lt;br /&gt;10.Save NEXT_CTR .&lt;br /&gt;11.The first stub address is NEXT_CTR.&lt;br /&gt;12.The next address is NEXT_CTR + sizeof(compensation code) + 2 .&lt;br /&gt;13.The 2 is for jump instruction to epilogue and saving the address from which to start interpretation.&lt;br /&gt;In this way the table is filled.&lt;br /&gt;&lt;br /&gt;14.Now we traverse the trace and change all the exit lvirtual addresses to stub addresses by stub-table lookup.&lt;br /&gt;&lt;br /&gt;15. Also add the stubs and compensation code.&lt;br /&gt;After this add the code for storing the register context in context save area and jumping to dispatch.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dispatcher&lt;br /&gt;&lt;br /&gt;Algorithm&lt;br /&gt;Adding trace&lt;br /&gt;1.Give control to optimizer&lt;br /&gt;2.It will transfer the trace to optimizer and receive the assembled trace from 3.assembler.&lt;br /&gt;4.This assembled trace is given to fragment cache.&lt;br /&gt;5.After inserting fragment cache gives control to dispatch.&lt;br /&gt;&lt;br /&gt;Fragment execution&lt;br /&gt;Trace selector or trace collector gives fragment address .&lt;br /&gt;Dispatch checks from where control has come.&lt;br /&gt;If from trace collector it saves the address to be collected next.&lt;br /&gt;It transfers control to fragment cache.&lt;br /&gt;After receiving control back it gives control to either trace collector or trace selector.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Fragment cache.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data structures&lt;br /&gt;&lt;br /&gt;1.List of buffers having the structure&lt;br /&gt;header containing size ,start address&lt;br /&gt;buffer to hold fragment&lt;br /&gt;pointer to next .&lt;br /&gt;&lt;br /&gt;2..FRAG_LOOK_TABLE&lt;br /&gt;   This will hold all the information related to the&lt;br /&gt;    fragments that are present in the fragment cache&lt;br /&gt;&lt;br /&gt;   It will have the following members&lt;br /&gt;&lt;br /&gt; *  original_vma  /* the actual vma of start_addr before relocation */&lt;br /&gt; *  frag_start_addr /* start adress inside the fragement */&lt;br /&gt; *  offset_complementary_fragement_page /* start of somplementary page */&lt;br /&gt; *  fragment_size /* size of the fragment */&lt;br /&gt; *  SOME MORE MEMBERS FOR AGING POLICIES.&lt;br /&gt;&lt;br /&gt;2.Free pointer  FREE_PTR.&lt;br /&gt;This will point to the next free buffer on list.&lt;br /&gt;&lt;br /&gt;Algorithm&lt;br /&gt;For adding a fragment&lt;br /&gt;1.Make an entry in FRAG_LOOK_TABLE.&lt;br /&gt;2.Insert fragment in position pointed by FREE_PTR.&lt;br /&gt;3. Insert the complementry fragment in next position.&lt;br /&gt;4. advance the FREE_PTR BY 2.&lt;br /&gt;5. Fill the headers of above fragments.&lt;br /&gt;6.Return control to dispatch.&lt;br /&gt;&lt;br /&gt;For execution.&lt;br /&gt;&lt;br /&gt;1.Get the fragment address.&lt;br /&gt;2.Change ip to that address.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113628102862681328?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113628102862681328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113628102862681328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113628102862681328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113628102862681328'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2006/01/data-structures-and-algorithms-part-i.html' title='Data structures and algorithms Part - I (all except Interpreter )'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113628091860195453</id><published>2006-01-03T01:31:00.000-08:00</published><updated>2006-01-03T01:35:19.066-08:00</updated><title type='text'>Data Structure &amp; Algo - part - II ( Interpreter Only)</title><content type='html'>Disassembling and trace collection function is divided into 3 parts as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1.Interpreter&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a.This will disassemble the instructions and call trace selector for all control transfer instructions to update TLT (trace lookup table).&lt;br /&gt;b.It will also simulate the control transfer instruction by checking the hardware flags thereby taking decisions whether the branch will be taken or not.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;2.Trace selector&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;a.This will update TLT (trace lookup table) for control transfer instructions and return to interpreter the next target address to interprete.&lt;br /&gt;b.If the trace is already present in the fragment cache then it will give control to the fragment cache to execute the fragment directly. In this case the control will go from:&lt;br /&gt;     Trace selector--&gt; Fragment cache --&gt; Interpreter.&lt;br /&gt;c.If not in fragment cache and the count exceeds threshold while&lt;br /&gt;After updating TLT then call trace collector.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;3. Trace collector&lt;/span&gt;&lt;br /&gt;                &lt;br /&gt;             a. It collects the trace till either of the following condition occurs:&lt;br /&gt;Trace size exceeds the MAX LIMIT.&lt;br /&gt;It encounters a return instruction.&lt;br /&gt;It gets a backedge which is outside the hot loop.&lt;br /&gt;&lt;br /&gt;                  b. It works in two modes: Pure and Interrupted.&lt;br /&gt;The idea is that if during trace collection a call instruction is                &lt;br /&gt;encountered then the called function is not included as a part of the trace instead it is executed separately and then trace collection is resumed where it was halted.&lt;br /&gt;                    So initially trace collector is in pure mode where it simply                                     &lt;br /&gt;                    copies the trace into the trace collection page.&lt;br /&gt;                    Then if a call or a trace already exising in fragment cache is&lt;br /&gt;                    encountered then trace collection is halted. And next time when&lt;br /&gt;                    it resumes, it is in interrupted  mode.In this interrupted mode&lt;br /&gt;                    instead of  starting a new trace it simply appends the remaing&lt;br /&gt;                    trace into the trace collecting page.&lt;br /&gt;      &lt;br /&gt;d.It also emits the complementary execution page which contains            &lt;br /&gt;all the code inside the loop which may or may not be included in the trace collecting page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Interpreter&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Input:&lt;br /&gt;&lt;br /&gt;1.address := Address of instruction to start interpretation.&lt;br /&gt;This will be a global variable accessible to all.&lt;br /&gt;&lt;br /&gt;Functions:&lt;br /&gt;&lt;br /&gt;1. bytes := disassemble_retbytes (address);&lt;br /&gt;  This will return the number of bytes for linear code before a control&lt;br /&gt;  transfer instruction.&lt;br /&gt;&lt;br /&gt;2.insn_buffer := disassemble_ct_insn (address); &lt;br /&gt;This will return the pointer to decoded control transfer instruction.&lt;br /&gt;&lt;br /&gt;3.tar_add :=  take_branch_decision( insn_buffer from above)&lt;br /&gt;It will simulate the control transfer instruction and then returns the taken branch address for conditional control transfer instruction.&lt;br /&gt;&lt;br /&gt;It will consist of following steps:&lt;br /&gt;If instruction is “call”&lt;br /&gt;Return( target_add in the instruction).&lt;br /&gt;If instruction is “return”&lt;br /&gt;Store the context&lt;br /&gt;Return( top of dos’s stack)&lt;br /&gt;If insruction is “unconditional jump”&lt;br /&gt;Return( target add in the instruction);&lt;br /&gt;If instruction is ”conditional jump”&lt;br /&gt;Flag = simulate(opcode of instruction)&lt;br /&gt;If(flag) // the branch is taken&lt;br /&gt;Then return (tar add in the instruction)&lt;br /&gt;Else return (add of  instruction below CT insn)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. copy_exec_LEP(bytes);&lt;br /&gt;   In this the linear code from (address) to (address + bytes) will be copied&lt;br /&gt;    and then executed after adding the prolog and epilog.&lt;br /&gt;&lt;br /&gt;5. trace_selector( tar_add)           &lt;br /&gt;   call to a trace selection to update the TLT.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Algorithm:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.bytes := disassemble_retbytes (address);&lt;br /&gt;2.  copy_exec_LEP(bytes);&lt;br /&gt;3.  add_CT_insn = bytes + address;&lt;br /&gt;4.  insn_buffer := disassemble_ct_insn (address); &lt;br /&gt;5.  tar_add :=  take_branch_decision( insn_buffer from above)&lt;br /&gt;6.  trace_selector( insn_buffer,tar_add)           &lt;br /&gt;// trace selector will update address variable also so the loop can be continued.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;             Trace selector&lt;br /&gt;&lt;br /&gt;Input:&lt;br /&gt;&lt;br /&gt;1. insn_buffer := which is a pointer to decoded instruction of the control   transfer instruction.&lt;br /&gt;2.tar_add := next instruction to interprete / target address in insn&lt;br /&gt;&lt;br /&gt;Functions used:&lt;br /&gt;&lt;br /&gt;1.update_TLT( add )&lt;br /&gt;&lt;br /&gt;It will perform the following functions:&lt;br /&gt;search_in_TLT(add);&lt;br /&gt;if found increment counter&lt;br /&gt;if not found add_entry_TLT(add)&lt;br /&gt;if counter &gt; threshold  and already present in fragment cache then start excuting from the fragment cache&lt;br /&gt;If counter &gt; threshold and not present in fragment cache&lt;br /&gt;Call trace_collect(add);&lt;br /&gt;if counter &lt; address =" tar_add;" address =" tar_add;"&gt; curr_prog_counter // forward jump&lt;br /&gt;Address = tar_add;&lt;br /&gt;&lt;br /&gt;4.If instruction is “return”&lt;br /&gt;Address= tar_add;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Trace Collector&lt;br /&gt;&lt;br /&gt;Input:&lt;br /&gt;&lt;br /&gt;1.add := this is the start address for trace collection&lt;br /&gt;2.mode := this indicates mode of working for trace collector.&lt;br /&gt;It can be PURE or INTERRUPTED&lt;br /&gt;&lt;br /&gt;Functions used:&lt;br /&gt;&lt;br /&gt;1. bytes := disassemble_block(pointer to buffer,add)&lt;br /&gt;This function will return number of bytes of linear code and also disassembled code in the buffer.&lt;br /&gt;2. rawcode := read_from_executable(add,bytes)&lt;br /&gt;         This function returns a pointer rawcode to another buffer containing code in executable format.&lt;br /&gt;3.  copy_exec_LEP(rawcode)&lt;br /&gt;    copy the rawcode into the linear executable page and execute.&lt;br /&gt;4.  copy_DA_TCP(pointer to buffer containing DA_code)&lt;br /&gt;    It will copy the Disassembled code into the Trace collecting page.&lt;br /&gt;5. insn_buffer:= disassemble_ct_insn(address of CT instruction)&lt;br /&gt;      this will decode only the control transfer instruction into insn_buffer&lt;br /&gt;6. action_CT_insn(buffer)&lt;br /&gt;  This will perform following functions:&lt;br /&gt;a.if instruction = unconditional jump&lt;br /&gt;* check if the target_add is in fragment cache using function&lt;br /&gt;             check_in_FC(target_add);&lt;br /&gt;              if not in fragment cache then return target address&lt;br /&gt;&lt;br /&gt;* if target_add &gt; start address of trace then return tar_of_jump&lt;br /&gt;else stop collecting trace&lt;br /&gt;// this will ensure that no backedge outside the loop is collected //&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;b.If instruction is conditional jump&lt;br /&gt;&lt;br /&gt;i)&lt;br /&gt; &lt;br /&gt;Flag := Simulate(opcode)&lt;br /&gt;If(flag = true) // condition true &amp; branch is taken&lt;br /&gt;{&lt;br /&gt;TBA = (add of target in the instruction)&lt;br /&gt;NTBA = (add of instruction + length of instruction)&lt;br /&gt;}&lt;br /&gt;if(branch is not taken)&lt;br /&gt;{&lt;br /&gt;NTBA = (add of target in the instruction)&lt;br /&gt;TBA = (add of instruction + length of instruction)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;                        ii)If NTBA &gt; start_address&lt;br /&gt;Copy NTBA in complementary address table CAT                          &lt;br /&gt;&lt;br /&gt;                       iii)   if TBA &gt; start address&lt;br /&gt;                                    check_in_FC(st_add);&lt;br /&gt;                              if not in FC then return TBA&lt;br /&gt;&lt;br /&gt;iii)if TBA = start_address then stop_collecting_trace()&lt;br /&gt;&lt;br /&gt;c.If instruction = call&lt;br /&gt;&lt;br /&gt;Copy the instruction in  TCP&lt;br /&gt;Check_in_FC(call site address)&lt;br /&gt;&lt;br /&gt;If not in fragment cache then we have to execute the call natively and return back to the trace collection in interrupted mode.&lt;br /&gt;Push the address of trace collector user stack&lt;br /&gt;Set flag = INTERRUPTED&lt;br /&gt;Push (return add which is the call_site + length of call)&lt;br /&gt;&lt;br /&gt;If in the fragment cache then again the control must be given to FC and then back to trace collector in INTERRUPTED mode.&lt;br /&gt;              &lt;br /&gt;d.If instruction is “return”&lt;br /&gt;Then stop_collecting_trace()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. stop_collecting_trace()&lt;br /&gt;&lt;br /&gt;In this the  lowest address from complementary address table CAT is chosen. And all the code from lowest adress to end address is copied into the complementary executing page (CEP) .&lt;br /&gt;This CEP and TCP is then given further to optimizer.&lt;br /&gt;&lt;br /&gt;8. check_in_FC(add)&lt;br /&gt;&lt;br /&gt;It will check if the given trace is already present in the fragment cache if present it will push the trace collector address on the user stack and set flag to INTERRUPTED and push the return address on the DOS’s stack and then execute from the fragment cache.&lt;br /&gt;&lt;br /&gt;Algorithm: (add)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If mode is PURE TCP_off = 0&lt;br /&gt;Else TCP_off = INTERRUPTED_address&lt;br /&gt;&lt;br /&gt;1. bytes := disassemble_block(ptr_DA,add)&lt;br /&gt;2. rawcode := read_from_executable(add,bytes)&lt;br /&gt;3.  copy_exec_LEP(rawcode)&lt;br /&gt;4.  copy_DA_TCP(pointer to buffer containing DA_code)&lt;br /&gt;    It will copy or append the Disassembled code into the Trace collecting page depending upon TCP_off value.&lt;br /&gt;5. insn_buffer:= disassemble_ct_insn(address of CT instruction)&lt;br /&gt;      this will decode only the control transfer instruction into insn_buffer&lt;br /&gt;6. add=action_CT_insn(buffer) then loop to 1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113628091860195453?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113628091860195453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113628091860195453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113628091860195453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113628091860195453'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2006/01/data-structure-algo-part-ii.html' title='Data Structure &amp; Algo - part - II ( Interpreter Only)'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113602424702815887</id><published>2005-12-31T02:08:00.002-08:00</published><updated>2005-12-31T02:17:27.173-08:00</updated><title type='text'>Dec-16th To-Do list</title><content type='html'>Minutes of the meet on 16th Dec&lt;br /&gt;&lt;br /&gt;Following is the to do list:&lt;br /&gt;&lt;br /&gt;1. Deciding upon the data structures&lt;br /&gt;    a. Optimization specific &lt;br /&gt;    b. Others&lt;br /&gt;&lt;br /&gt;2. Algorithms    &lt;br /&gt;    a. Optimization related    &lt;br /&gt;    b. Others&lt;br /&gt;&lt;br /&gt;3. Module layout&lt;br /&gt;&lt;br /&gt;4. Relocation&lt;br /&gt;&lt;br /&gt;5. First-cut optimization&lt;br /&gt;&lt;br /&gt;6. Makefiles&lt;br /&gt;&lt;br /&gt;7. Testing and profiling&lt;br /&gt;&lt;br /&gt;8. Coding Work to be completed till Tuesday i.e 20th Dec is as below:&lt;br /&gt;    1. Relocations.&lt;br /&gt;    2. First-cut optimization (list)&lt;br /&gt;    3. Non-optimization specific data structures and Algorithms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113602424702815887?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113602424702815887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113602424702815887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113602424702815887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113602424702815887'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/12/dec-16th-to-do-list.html' title='Dec-16th To-Do list'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113602404621202501</id><published>2005-12-31T02:08:00.001-08:00</published><updated>2005-12-31T02:14:06.416-08:00</updated><title type='text'>Modules &amp; API's - PART 1</title><content type='html'>&lt;strong&gt;No. OF Modules &amp; API's for Disassembler&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;1.bootstrapper.&lt;br /&gt;2.dispatch+assembler&lt;br /&gt;3.optimizer+prologue-epilogue adder.&lt;br /&gt;4.fragment cache manager&lt;br /&gt;5. Interpreter.&lt;br /&gt;&lt;br /&gt;The api's for disassembler are&lt;br /&gt;1. function : disassemble &lt;br /&gt;input: start address of disassembling&lt;br /&gt;output:no of bytes of linear code before control transfer instruction&lt;br /&gt;&lt;br /&gt;2.function:disassemble 1 instruction&lt;br /&gt;input:address of control transfer instruction.&lt;br /&gt;output: pointer to decoded control transfer instruction.&lt;br /&gt;&lt;br /&gt;3.function : disassemble  and give disassembled code&lt;br /&gt;input: start address of disassembling&lt;br /&gt;output:1. no of bytes of linear code before control transfer instruction&lt;br /&gt;       2.pointer to buffer containing disassembled code .&lt;br /&gt;&lt;br /&gt;Here the datastructure can be an array of structures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113602404621202501?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113602404621202501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113602404621202501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113602404621202501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113602404621202501'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/12/modules-apis-part-1.html' title='Modules &amp; API&apos;s - PART 1'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113602380598910651</id><published>2005-12-31T02:08:00.000-08:00</published><updated>2005-12-31T02:10:06.846-08:00</updated><title type='text'>OpenDos - The Initial Design</title><content type='html'>THE DYNAMIC OPTIMISATION SYSTEM&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The basic idea is that while a compiler must treat every code branch as equally possible, a binary optimizer can let the program itself tell the optimizer which branches are important and likely.&lt;br /&gt;The main aim is to find hot regions in the executable binary, optimize them at run time and execute the optimized code rather than executing the native un-optimized hot code. The hot codes are mostly dominated by loops and the backward branches taken in a program.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;THE DESIGN&lt;br /&gt;&lt;br /&gt;The overall design of the system is composed of a group of inter-operating modules written as shared objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The pre-loader is responsible for loading the system initialization routine as a pre-loadable library and also taking the control over the execution of the binary. The bootstrapper loads and halts the running binary just before the execution of the execution of the mainline (but only after the library linking). Then the control is finally handed over to the interpreter.&lt;br /&gt;The interpreter in this dynamic optimization system uses a technique of “cut and paste” strategy (also known as the basic code cache scheme). It starts the interpretation of the executable binary, instruction by instruction. This allows non-invasive profiling of the binary and also allows the interpreter to gather statistics and profiling information and also to track the behavior without having to modify the source binary at all. Now, in this process of interpretation, whenever a back-edge (a backward jump, which is the essential condition for a loop) is encountered, its information is maintained in a hash table, where it has entries for the most probable candidates for being hot codes along with their number of occurrences are maintained. If the count exceeds the threshold (say 10) then this code is considered to be a hot code.&lt;br /&gt;The interpreter takes this hot code and fills it into the instruction buffer with all its subsequent instruction. These instructions are then translated into some IR (Intermediate&lt;br /&gt;Representation), which helps in the efficient optimization of this code to provide faster execution of the code.&lt;br /&gt;This instruction (IR) buffer along with the process state information is passed to the dispatcher, which is the central communication hub for the overall system. Finally the dispatcher passes this buffer to the optimizer for optimization.&lt;br /&gt;The optimizer module is a program that takes the hot code trace (IR buffer) as an input, safely optimize them into equivalent fragments (optimized equivalent piece of code) and then requests the dispatcher to pass it back to the Add Epilogue &amp; Prologue, in order to assure that all the exits from this piece of code should actually leave passing through the epilogue saving the state before exiting. Finally this fragment is passed to the fragment cache manager which inserts it into the cache. Now this fragment is later executed in place of the straight interpretation, whenever that particular trace (a hot code) is encountered again.&lt;br /&gt;The performance of the overall execution of the code as compared when executed natively without interpretation and optimization and when executed through the optimization system, slows down in the initial period but gains high speed up later when most of the hot codes in the binary are found and fragmented. The theory is that, after enough time, the majority of the executed program text will have been converted into fragments, and so the execution will occur mainly in the fragment cache. Execution within the cache will be faster than the execution of the statically optimized binary and will eventually offset the initial cost of the profiler and optimizer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;THE IMPLEMENTAION&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pre-loader&lt;br /&gt;&lt;br /&gt;The primary function of the pre-loader is to bootstrap the system and gain the control over the execution. It is done primarily by compiling the system as a pre-loadable library and then use of the UNIX environment variable LD_PRELOAD, in which we can add paths to any pre-loadable libraries. Now, whenever any executable is executed, these libraries are loaded before any other libraries and their initialization routines are executed then. The function of the pre-loader is to do this task as a wrapper routine and also once this library is loaded, call the Bootstrapper as its initialization routine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bootstrapper&lt;br /&gt;&lt;br /&gt;The Bootstrapper runs as the initialization routine for the system which is loaded is a pre-loadable library and is basically responsible for the further loading of all the other modules of the system and also it locates the _start symbol from the current executable and overwrites the next two instruction, which are basically call to the main ( ) of a normal program, with call to startup ( ) routines whose primary job is to save the context just at the time of entering the _start symbol and also to transfer control to the interpreter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interpreter&lt;br /&gt;&lt;br /&gt;The interpreter’s main function is to gather profiling information and code execution traces. The design of the interpreter was typically based on the some of the above factors.&lt;br /&gt;The overall system runs in non-privileged mode, so the interpreter is primarily a non-privileged instruction interpreter; second, the interpreter only needs to be functionally correct, therefore no complicated hardware structure needs to be emulated. Also the interpreter has to fetch and decode the instruction and doesn’t have to emulate since the system’s design is architecture dependent (x86 to x86) meaning this system is designed for x86 binaries and will produce a final code, which can be executed only on x86 machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A trace is simply a sequence of instructions gathered after encountering a trace head. There are no restrictions placed on the termination conditions for a trace, however the system can stop gathering instructions if a certain numerical limit is reached. A trace once found, also includes an array of registers that contain the machine state when the trace head was encountered. This information is then passed on to the Dispatcher for subsequent optimization and finally insertion into the fragment cache.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Optimizer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The systems optimizer has a simple interface: it accepts a trace (as a low-level intermediate representation) and returns a trace. In this way optimizers can not only optimize a particular machine code trace, but can be used to convert a trace from one machine to another, or to convert a trace from machine-level to an intermediate form more appropriate for optimization (This part is expected to be one of the advancements to the system).&lt;br /&gt;The type of optimization techniques still depends totally upon the IR that is provided by the Interpreter. No details are being mentioned as the implementation of various modules are still to be done, so the optimization still remains a part to which most of work is to be done.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Translator&lt;br /&gt;&lt;br /&gt;The function of the translator is to take the fragment from the optimizer through the dispatcher and convert it back from the intermediate representation to the native binary code, which is required for the execution of the code. This is passed to the prologue and epilogue adder for further instrumentation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Epilogue &amp;amp; Prologue Adder&lt;br /&gt;&lt;br /&gt;The job of the prologue is call a procedure which will load the saved context to the native CPU registers and then transfer control to the fragment for execution. The epilogue serves as the fragment’s only exit point. All possible exit points (such as branches, calls, and jumps) have their target addresses changed so that on exit from the fragment code, they jump to the epilogue. The epilogue’s job is then to clean up after the fragment, capture the processor’s state, and then jump to the fragment cache’s function to return control to interpreter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dispatcher&lt;br /&gt;&lt;br /&gt;The Dispatcher’s main purpose is to serve as a common interface through which all the system modules can interact. In particular the dispatcher coordinates all the details of trace processing. It takes the trace if form of IR from the Interpreter and then passes it over to the optimizer, which converts it into fragment. This fragment is finally returned to the dispatcher which in turn gives it to the translator for converting it back to the native binary.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;REFRENCES&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[1] Dino Dai Zovi, Trek Palmer, SIND: SIND is not DYNAMO, March 9, 2001.&lt;br /&gt;&lt;br /&gt;[2] Trek Palmer, Darko Stefanovic. Experiences Constructing a Lightweight SPARC Interpreter for a Dynamic Binary Translator, March 14, 2001.&lt;br /&gt;&lt;br /&gt;[3] Trek Palmer. Design and implementation of SIND, A Dynamic Binary Translator.&lt;br /&gt;&lt;br /&gt;[4] Derek Bruening and Saman Amarasinghe. The DynamoRIO Collaboration.&lt;br /&gt;http://www.cag.lcs.mit.edu/dynamorio/.&lt;br /&gt;&lt;br /&gt;[5] Eric Feigin. A Case for Automatic Run-Time Code Optimization. PhD thesis.&lt;br /&gt;&lt;br /&gt;[6] David Keppel Robert F. Cmelik. Shade: A fast instruction set simulator for execution&lt;br /&gt;profiling.&lt;br /&gt;&lt;br /&gt;[7] Smith Traub, Schechter. Ephemeral instrumentation for lightweight program profiling.&lt;br /&gt;&lt;br /&gt;[8] Sanjeev Banerjia Vasanth Bala, Evelyn Duesterwald. Dynamo: A transparent dynamic optimization system.&lt;br /&gt;&lt;br /&gt;[9] Sanjeev Banerjia Vasanth Bala, Evelyn Duesterwald. Transparent dynamic optimization: The design and implementation of dynamo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113602380598910651?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113602380598910651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113602380598910651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113602380598910651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113602380598910651'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/12/opendos-initial-design.html' title='OpenDos - The Initial Design'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113263964276865735</id><published>2005-11-21T22:03:00.005-08:00</published><updated>2005-11-21T22:20:33.216-08:00</updated><title type='text'>PROJECT : 21st NOV</title><content type='html'>&lt;strong&gt;&lt;span style="color:#ff6666;"&gt;Agenda: Deciding upon the Data structures Required&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are some the Data structures that we have thought as per the&lt;br /&gt;initial design of the system:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff6666;"&gt;1. Structure used for saving the register context of the CPU&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;It will have the following members&lt;br /&gt;all the CPU registers&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff6666;"&gt;&lt;strong&gt;2. An array of the above declared structured for saving the&lt;br /&gt;registers/contexts.&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;* The size of this array will be static&lt;br /&gt;* 25 will be an average value&lt;br /&gt;* This value will generally depend upon the&lt;br /&gt;application. If it has lots of system calls and library&lt;br /&gt;routines then this number has to be increased.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;3. A buffer which will contain the complete text segment&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* This segment of the code will be provided by the&lt;br /&gt;bfd library.&lt;br /&gt;* The size of this buffer can be static or dynamic.&lt;br /&gt;but dynamic is more preferable, as bfd is capable&lt;br /&gt;of providing us with the size of this segment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;4. START_ADDR, which will be taken from the e_entry of the elf header&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* This variable will hold the address from where the&lt;br /&gt;actual interpretation of the code will start, once&lt;br /&gt;the control comes to our system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;5. PROG_CTR , it will hold the linear virtual address for the interpreter&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;* The interpreter always assumes that it has to start&lt;br /&gt;its interpretation from this address only. So whenever&lt;br /&gt;control changes, this value must be updated.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;6. LINEAR EXECUTABLE PAGE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* The sizeof this page can be static as well as dynamic.&lt;br /&gt;* Dynamic : The number of bytes to be executed linearly&lt;br /&gt;can be obained. This functionality is provided by our&lt;br /&gt;/binutils/opcodes or say our disassembler.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;7. TRACE LOOKUP TABLE&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;* A sturucture holding the information about the&lt;br /&gt;entries of the traces that have been encountered.&lt;br /&gt;It has the following members,&lt;br /&gt;&lt;br /&gt;* flag ; /* indictaing wether a function or a loop */&lt;br /&gt;* validity /* To inform wether its still in the fragement, if&lt;br /&gt;was present */&lt;br /&gt;* head_trace /* head of the trace */&lt;br /&gt;* end_trace /* end of the trace */&lt;br /&gt;* start_frag /* Its only valid if validity is TRUE */&lt;br /&gt;* count /* number of hits of start_trace */&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;8. HIST_BUFFER&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;* A strcuture holding information about the various basic blocks&lt;br /&gt;which have been encountered previously. It saves the overhead&lt;br /&gt;re-interpretation of the code that has already been interpreted.&lt;br /&gt;Also, It contains an extra member insn, which contains the&lt;br /&gt;control transfer insn, which follows this basic block.&lt;br /&gt;&lt;br /&gt;* The member of this structure are :&lt;br /&gt;* vma_start_addr /* It is the start of the basic block */&lt;br /&gt;* linear_byt_count /* number of linear bytes in this basic block */&lt;br /&gt;* char insn[30] /* holds the next insn */&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;1000 : mov eax,abx&lt;br /&gt;1002 : addl eax,#30&lt;br /&gt;1004 : nop&lt;br /&gt;1005 : ....some linear inmstructions&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;1020 : cmp eax,#400&lt;br /&gt;1023 : jnz 1020&lt;br /&gt;&lt;br /&gt;Now, in this case,&lt;br /&gt;vma_start_addr = 1000;&lt;br /&gt;linear_byt_count = 1022&lt;br /&gt;insn = "jnz 1020"&lt;br /&gt;&lt;br /&gt;Now when we encounter this start_addr again for interetation, we simply copy&lt;br /&gt;linear_byt_count number of bytes from the text segment starting from&lt;br /&gt;vma_start_addr into a linear executable page and execute it. Now we&lt;br /&gt;have the next control transfer insn also, so removed the overhead of&lt;br /&gt;decoding the control transfer insn.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;9. COMPLEMETARY_ADDR_TABLE&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;/* This would simply be an array, which will store the start address of all&lt;br /&gt;the non taken branches during trace collection . So that after collection&lt;br /&gt;we can select the lowest value from this array and move the code lying&lt;br /&gt;between this selected value and the end of trace.&lt;br /&gt;&lt;br /&gt;* The basic motto is to move the complete loop in the fragment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;10. COMPLY_FRAG_PAGE&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;* This will be just a page that will be allocted by malloc. It will&lt;br /&gt;actually contain the complimentary piece of code that we will get&lt;br /&gt;from the point No . 9.&lt;br /&gt;&lt;br /&gt;* This page will also be finally moved into the fraagement cache,&lt;br /&gt;along with the fragement.&lt;br /&gt;&lt;br /&gt;* The size of this page cannot be known before hand.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;11. IR&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;* This structure will actually hold the IR that we are gonna get&lt;br /&gt;from the disasembler.&lt;br /&gt;&lt;br /&gt;* It will have the following members :&lt;br /&gt;* menmonics /* menmonics of the insn */&lt;br /&gt;* opnd1&lt;br /&gt;* opnd2&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;12. An array of the above structure will be used to pass to the optimizer for optimization.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;13. FRAG_LOOK_TABLE&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;* This will hold all the information related to the&lt;br /&gt;fragments that are present in the fragment cache&lt;br /&gt;&lt;br /&gt;* It will have the following members&lt;br /&gt;&lt;br /&gt;* original_vma /* the actual vma of start_addr before relocation */&lt;br /&gt;* frag_start_addr /* start adress inside the fragement */&lt;br /&gt;* offset_complementary_fragement_page /* start of somplementary page */&lt;br /&gt;* fragment_size /* size of the fragment */&lt;br /&gt;* SOME MORE MEMBERS FOR AGING POLICIES.&lt;br /&gt;&lt;br /&gt;These were some of the most important data structures that would be&lt;br /&gt;required as per the initial design of the system.&lt;br /&gt;&lt;br /&gt;We are still deciding on :&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;1. Fragement&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;a. Memory Alloctaion policies&lt;br /&gt;b. Placement policies ( procedure sorting )&lt;br /&gt;c. Relocation Policies&lt;br /&gt;d. Eviction policies ( based on aging, count etc ).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;2. Data structures required for the optimizer.&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;3. Study on how many shared object would make our system&lt;br /&gt;flexible as well as robust. Currently discussing on keeping it two. &lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;a. The first consists of&lt;br /&gt;i&gt; preloader&lt;br /&gt;ii&gt; boostrapper&lt;br /&gt;iii&gt;interpreter&lt;br /&gt;iv&gt;disassembler&lt;br /&gt;&lt;br /&gt;b. The second consists of&lt;br /&gt;i&gt; Relocator&lt;br /&gt;ii&gt;optimizer&lt;br /&gt;iii&gt;epilog &amp;amp; prolog adder&lt;br /&gt;iv&gt;fragment&lt;br /&gt;&lt;br /&gt;We will have a DISPATCHER, which is responsible for the communication&lt;br /&gt;between these shared objects.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;4. The Relocation&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Not much work is required for direct jumps as we are removing direct jumps from the trace.&lt;br /&gt;&lt;br /&gt;Relocation during the optimization is a mojor issue.&lt;br /&gt;i&gt; When a piece of code is inserted.&lt;br /&gt;ii&gt; When a piece of code is removed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113263964276865735?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113263964276865735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113263964276865735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113263964276865735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113263964276865735'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/11/project-21st-nov.html' title='PROJECT : 21st NOV'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113230700952622903</id><published>2005-11-18T01:40:00.000-08:00</published><updated>2005-11-18T01:43:29.526-08:00</updated><title type='text'>PROJECT : 9th SEP</title><content type='html'>&lt;strong&gt;Design of various modules of the system&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;OpenDOS&lt;/strong&gt;- Open dynamic optimization system&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The different modules are&lt;br /&gt;1.Preloader&lt;br /&gt;2.Bootstrapper&lt;br /&gt;3.Interpreter&lt;br /&gt;4.Dispatcher&lt;br /&gt;5.Linear code executer&lt;br /&gt;6.Fragment cache manager&lt;br /&gt;7.Prologue &amp;amp;epilogue adder&lt;br /&gt;8.Translator&lt;br /&gt;9.Optimizer.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1.Preloader&lt;/strong&gt;&lt;br /&gt;This module will be preloaded using the LD_PRELOAD variable.&lt;br /&gt;This will load the bootstrapper ans call it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2.Bootstrapper&lt;/strong&gt;&lt;br /&gt;The bootstrapper will load and initialize all the modules.&lt;br /&gt;It will get the address of _start using dlsym.&lt;br /&gt;It will save the address of main&lt;br /&gt;It will mprotect the text segment.&lt;br /&gt;It will overwrite the next two lines after _start by a call to startup routine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3.Startup module&lt;/strong&gt;&lt;br /&gt;It will save the context of the process.&lt;br /&gt;It will allocate a new stack for the dbo(dynamic binary optimizer system).&lt;br /&gt;It will store a pointer to this stack.&lt;br /&gt;It will call the interpreter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4.Interpreter&lt;br /&gt;&lt;/strong&gt;The input to this is address of main.&lt;br /&gt;It will fetch instructions from this address and decode them.&lt;br /&gt;&lt;br /&gt;If the instruction is a not a control transfer instruction the it will copy it to a page.&lt;br /&gt;Otherwise it will check if it is backward taken branch (if pc&gt;target addr)&lt;br /&gt;&lt;br /&gt;If it is it will record the target addr as start of trace and&lt;br /&gt;The current pc -1 as end of trace in variables&lt;br /&gt;&lt;br /&gt;There are 3 conditions possible:&lt;br /&gt;&lt;br /&gt;1.If no entry for this trace then&lt;br /&gt;Store both these addresses in trace lookup table.&lt;br /&gt;Initialize the counter to 1.&lt;br /&gt;&lt;br /&gt;2.If trace is present and counter is less than threshold increment the counter.&lt;br /&gt;&lt;br /&gt;3.If trace is present and the counter exceeds the threshold value we convert it into IR.&lt;br /&gt;And give it to dispatcher.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5.Dispatcher&lt;/strong&gt;&lt;br /&gt;It acts as a communicating module between all the modules.&lt;br /&gt;It will accept the IR from interpreter and give it to optimizer.&lt;br /&gt;it will accept optimized IR and give it to translator.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6.Optimizer&lt;/strong&gt;&lt;br /&gt;It will perform various optimizations depending on IR.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7.Epilogue and prologue adder&lt;br /&gt;&lt;/strong&gt;It basically adds stubs at the start and end of each process’s fragment we want to execute natively.&lt;br /&gt;The prologue saves the process context to cpu registers.&lt;br /&gt;The epilogue saves the context from cpu registers to the page where previously we had saved the context.&lt;br /&gt;There is a separate epilogue for each exit.&lt;br /&gt;It transfers control to the interpreter to the next instruction after the end of trace.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8.Fragment cache manager&lt;/strong&gt;&lt;br /&gt;It inserts the fragment into the software code cache at appropriate location.&lt;br /&gt;It records the address of this location and puts it into trace lookup table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;9.Translator&lt;br /&gt;&lt;/strong&gt;It will convert the IR to binary and give it to prologue and epilogue adder.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Points to be discussed.&lt;br /&gt;1.Heuristics for cache replacement .&lt;br /&gt;2.Handling aging of traces.&lt;br /&gt;3.using API of libbfd for IR.&lt;br /&gt;4.deciding optimization techniques.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113230700952622903?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113230700952622903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113230700952622903' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230700952622903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230700952622903'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/11/project-9th-sep_18.html' title='PROJECT : 9th SEP'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113230663969426320</id><published>2005-11-18T01:33:00.000-08:00</published><updated>2005-11-20T00:42:36.683-08:00</updated><title type='text'>PROJECT :  27th SEP</title><content type='html'>&lt;strong&gt;Agenda : Trace selection &amp;amp; collection&lt;br /&gt;Codito TEchnologies, Pune.&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;1. Definition&lt;/strong&gt; &lt;strong&gt;of a trace&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- When it becomes hot.&lt;br /&gt;- When it's not a hot code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. What is a hot code?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- exact definition of a hot code&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. How to handle procedure calls&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- in linear sequential code&lt;br /&gt;- in the hot codes&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. How to handle forward jumps&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- in linear codes. ( As our earlier definition said : A linear sequential code is, a piece of code till we get a jump. )&lt;br /&gt;- A solution ( if we get a forward jump ): we can just change the fetch address of the interpreter and proceed as usual till we get a call or a backward jump and also remove the forward jump from the buffer where the linear sequential code is collected for execution.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;5. Over-lapping of the traces .&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- finding out a strategy to decide, how to co-alias two fragments.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6.what optimizations to perform&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;- what optimization has to be carried out .&lt;br /&gt;- what info is required for them.&lt;br /&gt;- What they give&lt;br /&gt;- what libdisasm provides and libfd doesn't or vice versa&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7..how to handle the relocation of the addresses.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- a module, with its properties and behavior has to be decided.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8. find API provided from libopcodes.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;9.find where we can piggy back the data structures returned by libopcodes.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- according to the requirements for optimization.&lt;br /&gt;- Also, find out whether it is possible to convert it into an IR using some callback function at the time of disassembling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113230663969426320?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113230663969426320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113230663969426320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230663969426320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230663969426320'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/11/project-27th-sep.html' title='PROJECT :  27th SEP'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113230609149889223</id><published>2005-11-18T01:26:00.000-08:00</published><updated>2005-11-18T01:45:40.936-08:00</updated><title type='text'>PROJECT : 9th OCT</title><content type='html'>&lt;strong&gt;Agenda : Trace selection and Trace collection&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Global table&lt;/strong&gt; : table which hold the info about the traces.&lt;br /&gt;&lt;br /&gt;1. &lt;strong&gt;Start of Trace.&lt;/strong&gt;&lt;br /&gt;- destination of backward jump.&lt;br /&gt;- exits from fragments already present.&lt;br /&gt;- all function calls destination&lt;br /&gt;&lt;br /&gt;2&lt;strong&gt;. End of Trace.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- two possibilities&lt;br /&gt;- trace is a loop&lt;br /&gt;- no of insn &gt; Threshold&lt;br /&gt;- encountering start of trace&lt;br /&gt;- begining of fucntion definition&lt;br /&gt;- no of insn &gt; Threshold&lt;br /&gt;- ret insn is encountered&lt;br /&gt;&lt;br /&gt;Now, We just take a look at how the control flow is gonna take place.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Interpretation Starts.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- from begining of code.&lt;br /&gt;- a branch tranfer insn is encountered.&lt;br /&gt;&lt;br /&gt;- forward jump&lt;br /&gt;- change the fetch addr for interpreter.&lt;br /&gt;&lt;br /&gt;- backward jump&lt;br /&gt;- its a special case.&lt;br /&gt;- exect'n of collected linear code.&lt;br /&gt;- making an entry in global table.&lt;br /&gt;- check count, perform reqd. operation.&lt;br /&gt;- function calls&lt;br /&gt;- exect'n of collected linear code.&lt;br /&gt;- entry made in global table.&lt;br /&gt;- if already present, increment the count.&lt;br /&gt;- and check for threshold.&lt;br /&gt;&lt;br /&gt;Once you find trace crossed the threshold :&lt;br /&gt;&lt;br /&gt;- start collecting the trace&lt;br /&gt;- start of trace already defined&lt;br /&gt;- end of trace alreay defined&lt;br /&gt;&lt;br /&gt;Contents of trace can be :&lt;br /&gt;&lt;br /&gt;- forward jumps inside fragments&lt;br /&gt;- backward jumps inside fragments&lt;br /&gt;- jumps to outside the fragment&lt;br /&gt;- instructions - calls to functions&lt;br /&gt;&lt;br /&gt;Actions taken for these above mentioned cases :&lt;br /&gt;- forward jump inside fragments&lt;br /&gt;- care taken during relocation.&lt;br /&gt;&lt;br /&gt;- backward jump inside fragments&lt;br /&gt;- care taken during relocation.&lt;br /&gt;&lt;br /&gt;- jump outside fragments&lt;br /&gt;- control transferred to epilogue.&lt;br /&gt;- an entry is present for desti'n of exits.&lt;br /&gt;as all exits from fragments are probabale&lt;br /&gt;candidates for trace.&lt;br /&gt;- incrementaing the count in the global table.&lt;br /&gt;- control finally transferred to epilogue.&lt;br /&gt;&lt;br /&gt;- function calls&lt;br /&gt;- should be replaced by exit stubs.&lt;br /&gt;- if this exit stub crosses the threshold ,&lt;br /&gt;  it is optimised and linked into fragment cache.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Some important considerations :&lt;br /&gt;&lt;/strong&gt;- Every fragment will have a unique fragment id.&lt;br /&gt;- Also in the global table, there will be a field for this _frag_id.&lt;br /&gt;- The use of this fragment id :&lt;br /&gt;&lt;br /&gt;- If two or more fragments have same exit destinations&lt;br /&gt;from the fragment, we willtwo separate entries for&lt;br /&gt;that in the gloabal table.&lt;br /&gt;&lt;br /&gt;- If sometime later, an exit is made through the&lt;br /&gt;exit stub, the corrseponding entry in the global&lt;br /&gt;table will be bumped.&lt;br /&gt;&lt;br /&gt;- This is to help, the linking of fragments, e.g. if&lt;br /&gt;siometimes later the exit path's counter execeeds&lt;br /&gt;the threshold, we can optimise it and link it to the&lt;br /&gt;existing fragments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113230609149889223?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113230609149889223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113230609149889223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230609149889223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230609149889223'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/11/project-9th-oct.html' title='PROJECT : 9th OCT'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113230579607101852</id><published>2005-11-18T01:19:00.000-08:00</published><updated>2005-11-18T01:23:16.076-08:00</updated><title type='text'>PROJECT : 9th SEP</title><content type='html'>&lt;strong&gt;Agenda : Detailed discussion of the Dynamic optimization system&lt;br /&gt;Codito Technologies, Pune.&lt;/strong&gt;&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;crt0:&lt;/strong&gt; overwrite text mprotect&lt;br /&gt;-----------------------------&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;preloaded+bootstrapper:&lt;/strong&gt;&lt;br /&gt;-----------------------&lt;br /&gt;- loads all other modules&lt;br /&gt;- mprotect&lt;br /&gt;- changes the text section (_start contents)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;startup module:&lt;br /&gt;&lt;/strong&gt;---------------&lt;br /&gt;- ctrl comes in from crt0&lt;br /&gt;- page allocated for storing reg contents, sind stack&lt;br /&gt;- register state saved&lt;br /&gt;- sind_sp var set to the virtual stack&lt;br /&gt;- j to interpreter&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;interpreter:&lt;br /&gt;&lt;/strong&gt;------------&lt;br /&gt;(e.g. valgrind, bochs, plex86, vdebug0&lt;br /&gt;- allocate page for app execution&lt;br /&gt;- finds hot region and give the IR of that&lt;br /&gt;- in: address of main&lt;br /&gt;- find sequential code till the first jump&lt;br /&gt;- copy the seq code into a trace/code region&lt;br /&gt;- detect back-edges for identifying hot regions&lt;br /&gt;- check that the back edges are in the cached address space&lt;br /&gt;- Copy the hot code and reg state to the dispatcher&lt;br /&gt;- no machine emulator&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;dispatcher&lt;/strong&gt;&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;- communicates betn all modules&lt;br /&gt;- input: IR&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;fragment cache manager&lt;/strong&gt;&lt;br /&gt;-----------------------------&lt;br /&gt;&lt;br /&gt;- put optimized hot regions into the cache&lt;br /&gt;- heuristic for cache and trace replacement&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;prologues/epilogue instrumenter:&lt;/strong&gt;&lt;br /&gt;----------------------------------&lt;br /&gt;- add pro/epilog&lt;br /&gt;- xfer saved reg state back into hard regs&lt;br /&gt;- save reg state back, retrun address into the interpreter,&lt;br /&gt;to the pt in app address space&lt;br /&gt;- thread the return stmts to the epilog&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Data Structures: &lt;/strong&gt;&lt;br /&gt;--------------------&lt;br /&gt;1. start of trace, end of trace, count, address in fragment cache,&lt;br /&gt;if already present (for jumping the next time)&lt;br /&gt;2. cache table (need heuristic for replacement here)&lt;br /&gt;3. trace table (need heuristic for replacement here)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Deliverables:&lt;/strong&gt;&lt;br /&gt;----------------&lt;br /&gt;- Detailed meeting minutes: Monday 12 Sep 2005&lt;br /&gt;- Schedule (first cut) : Wednesday 14 Sep 2005&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113230579607101852?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113230579607101852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113230579607101852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230579607101852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230579607101852'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/11/project-9th-sep.html' title='PROJECT : 9th SEP'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19089662.post-113230520450403894</id><published>2005-11-18T01:12:00.000-08:00</published><updated>2005-11-18T01:24:42.486-08:00</updated><title type='text'>PROJECT : NOV 17</title><content type='html'>&lt;strong&gt;Dynamic Optimisation System&lt;br /&gt;Codito Technologies, Pune.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Dynamic optmization techniques&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;constant propagation&lt;/strong&gt;&lt;br /&gt;--------------------&lt;br /&gt;+ removal of one extra move&lt;br /&gt;+ detection+deletion of dead code&lt;br /&gt;+ one register freed for other optimizations&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;copy propagation&lt;br /&gt;&lt;/strong&gt;----------------&lt;br /&gt;+ one register freed for other optimizations&lt;br /&gt;+ one move instruction removed&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;redundant load/store removal&lt;/strong&gt;&lt;br /&gt;----------------------------&lt;br /&gt;+ remove one load&lt;br /&gt;- add one/two moves instead&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;code specialization&lt;/strong&gt;&lt;br /&gt;-------------------&lt;br /&gt;+ free one register&lt;br /&gt;+ new opportunities for constant propagation&lt;br /&gt;- keep two copies of code&lt;br /&gt;- extra guard code to be generated&lt;br /&gt;* goodness based&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;procedure sorting&lt;br /&gt;&lt;/strong&gt;-----------------&lt;br /&gt;* where to put a new entrant into the fragment cache&lt;br /&gt;+ cache replacement policy, in addition/sync with the LRU policy&lt;br /&gt;* i cache line size needs to be seen&lt;br /&gt;* prefetch queue size needs to be seen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19089662-113230520450403894?l=opendos.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://opendos.blogspot.com/feeds/113230520450403894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19089662&amp;postID=113230520450403894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230520450403894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19089662/posts/default/113230520450403894'/><link rel='alternate' type='text/html' href='http://opendos.blogspot.com/2005/11/project-nov-17.html' title='PROJECT : NOV 17'/><author><name>Sandeep</name><uri>http://www.blogger.com/profile/01130894720458184975</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
