Font Size: a A A

The Research Of Improving The Execution Efficiency Of Java Code In Embedded Device

Posted on:2005-02-12Degree:MasterType:Thesis
Country:ChinaCandidate:F LiuFull Text:PDF
GTID:2168360125955979Subject:Computer software
Abstract/Summary:PDF Full Text Request
Sun is the creator and propellent of Java language. Because of the security and cross-platform (so called "Write Once, Run Anywhere").From 1995's,the upsurge of using Java was never stopped. Because of the speed limitation and code size constraint, it was not suitable for those embedded systems which have some particular requirement such as function, price, volume, power-consume. Sun made some improvement and released J2ME. It was designed for embedded systems which have the restriction to memory. Some excellent characteristic such as lack of pointer, difficult to operating on hardware, automatic garbage-collecting are blocks in embedded systems.This dissertation first talks about the evolution history of Java language and the 12 characteristics which were introduced in White Paper of Java language, such as Object-Oriented, auto Memory Management and so on. Then I analyse the possible impact on the future software engineering and software development.Next, I introduce the architecture of J2ME,therelationship of CLDC and CDC .It is the theoretics fundament of J2ME especially the 3 layer: Profi. Configuration and Virtual Machine. I sum up the differences of CLDC and J2SE,and recommend another platform-SuperWaba, which produce optimized bytecode and optimized the JVM .With the introduction of Ahead-of-time and just-in-time technology of Wind River's TurboJ ,the efficiency of Java code execution is greatly enhanced .The community have taken great effort to improve the efficiency of Java code execution.Because of the purpose of language design, Java has the disadvantages of low efficiency of Java code execution. I analyse the three compilation method which have some impact on Java code execution efficiency: Just-in-time, Ahead-of-time and Dynamic adaptive and the improved algorithm of Garbage Collector in KVM: generational mark-sweep-compact.The newly released J2ME Wireless Toolkit has the ability to analyse the source code from 4 aspects: method invoke, memory, networkcollection, environment simulation and find out the bottleneck. With the method I introduced in this dissertation, you can optimize it. I present an example which manifests the impact on code execution efficiency which include method invoke, array accessibility, substitution of bitwise to multiplication and division, variable announcement, Switch conditional jump, string manipulation, inner class, data exchange based on XML and after processing, you can use JAX and ProGuard to obfuscate the bytecode. The process includes deleting debug information, deleting unused class and method, deleting inner class and optimize bytecode and last compressing all the class file to a single jar file to decrease the code size.Furthermore, you can adopt some methods which can diminish cross-platform characteristic to improve the efficiency of Java code execution such as Java code native compiling, using C code through JNI, ultimate weapon-Java accelerating CPU. With all those methods above, the efficiency of Java code execution will reach the level of the efficiency of C/C++ code execution.Because the restriction of language design, Java is inferior to C/C++ in execution efficiency. For the competition in embedded environment development, Sun and JCP take great effort to improve it. It has no end of improving the efficiency of Java code execution .1 wish it can help the Java developer a little.
Keywords/Search Tags:embedded device, execution efficiency, J2ME Waba, JIT, Obfuscation
PDF Full Text Request
Related items