Profiling Java Programs for           ParallelismAuthors: Clemens Hammacher, Kevin Streit,   Sebastian Hack and Andreas Ze...
Challenge  How to leverage the computer power ofmulticore architectures for systems that were     not built with paralleli...
The idea of article To try to measure the potential for parallelexecution in recent object-oriented programs.
Approach of authorsThree main steps:    Tracing dynamic dependencies    Detecting parallelism    Suggesting paralleliza...
Tracing dynamic dependences (1)    Trace is a program P(D) obtained by running    a program P on some input D.    The ba...
Tracing dynamic dependences (2)During tracing we define dynamic dependencies:    If instruction B of program consumes val...
Detecting parallelism (1)     The dynamic dependencies form a dynamic               dependence graph.          This graph...
Detecting parallelism (2)    In the dynamic dependence graph we canidentify parallel as well as serial computationpaths....
Detecting parallelism (3)    Ideal speed-up factor of parallelization is n/k     where n is the length of program P and k...
Suggesting parallelization            candidates    Loops placed on critical path H are the most    interesting portion o...
Example (1)Public static void main(String[] args) {            int n = Integer. parseInt(args[0]);            long[] sums ...
Example (2)
Example (3)
Example (4)
Results for exampleWe have 4 threads for parallel execution:    Thread 0: 0 2 4 5 10    Thread 1: 1 3    Thread 2: 7 8...
Thank youThe End
Upcoming SlideShare
Loading in …5
×

Profiling Java Programs for Parallelism

587 views
544 views

Published on

Presentation of the article "Profiling Java Programs for Parallelism" of C. Hammacher, K. Streit, S. Hack and A. Zeller. All Rights for text are Reserved by authors of this paper.

Date of presentation: July 2011

For preparing my slides I take pictures and some other information from the internet and I try to use only legal one. But if I did not notice something and you have Rights for any kind of this information and do not want to see it in the presentation please let me know and I will remove it from the slides as fast as possible or remove the slides themselves. Thanks for your collaboration.

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
587
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Profiling Java Programs for Parallelism

  1. 1. Profiling Java Programs for ParallelismAuthors: Clemens Hammacher, Kevin Streit, Sebastian Hack and Andreas ZellerPresented by:Anisimov Dmitry (Theoretical part)Igdalov Dimitri (Demo)
  2. 2. Challenge How to leverage the computer power ofmulticore architectures for systems that were not built with parallelism in mind?
  3. 3. The idea of article To try to measure the potential for parallelexecution in recent object-oriented programs.
  4. 4. Approach of authorsThree main steps: Tracing dynamic dependencies Detecting parallelism Suggesting parallelization candidates
  5. 5. Tracing dynamic dependences (1) Trace is a program P(D) obtained by running a program P on some input D. The basis of parallelism-detection algorithm is the execution trace of a program run on a specific input.
  6. 6. Tracing dynamic dependences (2)During tracing we define dynamic dependencies: If instruction B of program consumes values computed by A then B is data dependent on A and must be executed after A.
  7. 7. Detecting parallelism (1) The dynamic dependencies form a dynamic dependence graph. This graph describes how the individual instructions transitively depend on and influence each other.
  8. 8. Detecting parallelism (2) In the dynamic dependence graph we canidentify parallel as well as serial computationpaths. The main serial path is critical path H. Critical path H is longest path whoseinstructions must be executed sequentially.
  9. 9. Detecting parallelism (3) Ideal speed-up factor of parallelization is n/k where n is the length of program P and k is the length of critical path H.
  10. 10. Suggesting parallelization candidates Loops placed on critical path H are the most interesting portion of P w.r.t. parallelization. Loops are ranked w.r.t. the potential gain on the execution of program P.
  11. 11. Example (1)Public static void main(String[] args) { int n = Integer. parseInt(args[0]); long[] sums = new long[n] long overallSum = 0; for (int i = 0; i < n; ++i) { sums[i] = sumTo(i); } for (int i = 0; i < n; ++i) { overallSum += sums[i]; }}private static long sumTo(int n) { return n == 0 ? 0 : n + sumTo(n – 1);}
  12. 12. Example (2)
  13. 13. Example (3)
  14. 14. Example (4)
  15. 15. Results for exampleWe have 4 threads for parallel execution: Thread 0: 0 2 4 5 10 Thread 1: 1 3 Thread 2: 7 8 Thread 3: 6 9
  16. 16. Thank youThe End

×