Font Size: a A A

The Construction And Optimization Of A Java Parallelization Framework Based On Dynamically Bytecode Generation

Posted on:2015-09-07Degree:MasterType:Thesis
Country:ChinaCandidate:R XinFull Text:PDF
GTID:2298330452964172Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In recent years, with the development of computer hardware technique, some newsystems has been invented to help high-performance processing, such as multi-coresystems and distributed systems. Those technique help increase the efciency of somelarge scale task, which make parallel programing a hot topic. Related usage of it hasbeen applied to other felds.Program analysis is among such felds. Traditionally, there exist some tasks ofprogram analysis which has a high complexity. These tasks, which includes symbolicexecution, point-to analysis, will consuming large amount of time for processing theanalyzing. In these cases, developers was forced to make a trade-of between accuracyand efciency.With the assistance of parallelization, this problem can somehow be reduced byexecuting the tasks simultaneously. It is found that many of the tasks in program anal-ysis do not require returning a value as well as some executing order, which gives thepossibility to parallelize them.However other trade-of are introduced in such parallelization. Particularly, insome fne-grained tasks, overhead keeps high while inter-thread communication hap-pens frequently. In extreme cases, the overhead will overwhelm the advantage of par-allelization, which make it lose its motivation.Some frameworks aim to solve this problem. Deferred Method is representativeby using a mechanism of bufering. Instead of processing such methods directly, it willfrst deposit the information of the method invocation to a thread-local bufer. Oncethe bufer is full, it will be handed it to the the processor which consists of a set of threads. Comparing to other similar frameworks, Deferred Method supports multi-threads, result aggregation and so on.In this dissertation, the implementation and optimization was performed basedon the this framework. The work contains a mechanism which allows some coarser-grained task sets to execute in order, a process strategy which allows bufers producedby the same thread to be execute in order, an optimization of the synchronization inJava to help process the bufer quickly, and a implementation of methods which havereturn values.The insights of this work include:1. High-level API. Programmers needn’t care about the low-level implementationof this framework. They just have to know the interface of this framework andfeatures, which can help them complete the confguration with a little amount ofcode.2. Dynamiccodegeneration. Themannersofthewholeframeworkistransparenttotheuser. Bytecodeparsingandmethodrewritingareperformedbytheframeworkautomatically with the confguration written by the user.The features of Deferred Method become more abundant by such optimizationand development. Programmers can use the modifed framework to complete taskswith more various manners, such as certain time order and return values. On the otherhand the synchronization optimization help increase the efciency of the framework.Experiments on such works proved that they matched the expectation. By using the or-der optimization properly, the program will introduce the overhead of just5%to12%while twice if it is used too frequently. The new strategy will introduce the overhead of16%to20%due to the limitation of both the machine and the program. Synchroniza-tion optimization can retrieve a speedup of10%to53%. In conclusion, such imple-mentation and optimization bring more choices for programmers who develop parallelprograms, hence the suitable range of parallel program analysis is widen.
Keywords/Search Tags:Parallelization, ProgramAnalysis, CodeGeneration
PDF Full Text Request
Related items