Automatic Parallelization Approach Based on Java Virtual Machine

2090 Words5 Pages

We propose a new approach that automatically parallelizes Java programs. The approach collects

on-line trace information during program execution, and dynamically recompiles methods that can

be executed in parallel. We also describe a cost/benefit model that makes parallelization decisions, as

well as a parallel execution environment to execute parallelized code. We implement these techniques

upon Jikes RVM. And finally, we evaluate our approach by parallelizing sequential benchmarks and

comparing the performance to manually parallelized version of those benchmarks. According to the

experimental results, our approach brings low overheads and achieves competitive speedups compared

to manually parallelized code.

1 Introduction

Multi-processor has already become mainstream in both personal and server computers. Even on em-

bedded devices, CPUs with 2 or more processors are increasingly used. However, software development

does not catch up with hardware at this time. Designing programs for multi-processor computers is still

a difficult task and requires a lot of experiences and skills. Besides, a big number of legacy programs

that are designed for single-processor computers are still running and need to be parallelized for better

performance. All these facts require a good approach for program parallelization.

Compiler that automatically parallelize source code into executable code for multi-processor comput-

ers is a very promising solution to this challenge. A lot of research works have been done in this field,

which shows the capability of compiler based parallelization, especially for scientific and numeric appli-

cations. However, There are several limitations in these approaches due to the lack of dynam...

... middle of paper ...

...es. To deal with this problem, we compact one section of contin-

uous addresses into one data record, which is proved to be able to save a lot of memory space in our

experiments.

We also try to simplify dependency analysis by introducing dependent section, which is a section

in a trace containing all instructions dependent to another trace. For instance, a single loop has 100

instructions and the 80th and 90th instructions carry dependency between loop iterations. In this case

the dependent section of loop body trace is 80 to 90 after dependency analysis. Dependent section is used

based on the observation that mostly only a small section of instructions in a trace carries dependency.

Besides, using single dependent section for each trace greatly reduces synchronization/lock overheads in

the busy-waiting mode that is used in our parallel execution model.

Open Document