Font Size: a A A

Research And Implementation Of Adaptive Dynamic Translation

Posted on:2007-04-25Degree:MasterType:Thesis
Country:ChinaCandidate:J C LiFull Text:PDF
GTID:2178360182993744Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Virtual technology of computer has always been an important branch of computer science. Part of application technologies can even be traced back to the 1960's. In the past few decades, the renovation of various processor's architecture and the continuous evolvements of the same processor's ISA, lead to emergence of abundant system software and application software, which can only be run on these specific processors. Apparently, these software are incompatible at binary level. Currently, there are three methods to address this incompatibility problem: a) rewrite some piece of the code and then recompile it to the instruction set that you need, b) make different ISAs compatible by using a various of software technologies, c) add a specific processor mode in the new processor architecture . Generally, the third method which is often found in the process of same architecture evolution, such as ARM (16 bit Thumb mode, 32 bit ARM mode), x86 (real mode, 8086 mode, protect mode), is used to address the compatibility problem of software from different epochs. Compared with first and third approach, the second approach, using software to solve compatibility problem, has great advantage. It does not need to recompile the source code and does not need the programmers to modify the source code, and also will not increase the complexity of the hardware design or its cost. But the greatest difficulty of the software solution lies in how to balance the VM's speed and portability. This is always the problem that needs to be solved when JIT (Just-in-time) technology emerged. This dissertation addresses serials of approaches to solve the problem above and get good results.Simulating all the instructions of one ISA using software is called "full instruction simulator". There are two major types of full instruction simulator: interpretation simulator (Bochs) and dynamic translation (JVM,CLR). This paper mainly focuses on the research and the implementation of dynamic translation technology. The dynamic translation compiles the binary executable file from one ISA to another at runtime without any modification. Traditionally, we call binary instructions before compilation as target instructions and simulator as target machine. After compilation we call the instructions as host instructions and host machine (Host or native). Target machine and host machine can be of the same structure or different structures. With continuous development of embedded system during recent years, the corresponding software developed for embedded system becomes more and more complex. However, due to the limitation of embedded chips, it is impossible to complete the whole process of software development on RISC chips. Providing a powerful RISC chip simulator on CISC machine can greatly help the programmers to develop embedded system's software.Based on the analysis and conclusion of advantages and disadvantages of current dynamic translation technology, this dissertation provides its own dynamic translation methods which havethe advantage of better speed and good adaptation. Unlike static compilation technology, dynamic translation will increase the executing time of the programs. Low overhead of dynamic translation itself is very important. Methods of this thesis make full use of localized theory, thus reducing the overhead of the cache management significantly. Enhance the executing speed of programs through providing an return address stack to store the return address of function. The unit of the dynamic translation changes from one basic block to one page (1KB-4KB). This change not only reduces the translation time of every target instruction, but the paper can make use of it and a completely new method was discovered: virtual machine can execute from on basic block to another with zero-overhead. The paper uses the method of intermediate host instructions/decode translate to solve the problem of one target instruction having too much combination of operands (one combination corresponds to one host implementation) instead of micro operation. The method has advantage of simplicity and good performance. A simulator (simulate MIPS on x86) was implemented based on these series of dynamic translation methods and has these advantages: light weight translators, efficient cache management, reduced memory access and so on.
Keywords/Search Tags:dynamic translation, binary translation, virtual machine, cache management
PDF Full Text Request
Related items