A New Java Runtime for a Parallel World Christoph Reichenbach, - - PowerPoint PPT Presentation

a new java runtime for a parallel world
SMART_READER_LITE
LIVE PREVIEW

A New Java Runtime for a Parallel World Christoph Reichenbach, - - PowerPoint PPT Presentation

A New Java Runtime for a Parallel World Christoph Reichenbach, Yannis Smaragdakis University of Massachusetts, Amherst 1 P ARALLELIZABILITY ACCORDING TO C OMPLEXITY T HEORY Serial Code degree of parallelizability . . . FOL + transitive


slide-1
SLIDE 1

A New Java Runtime for a Parallel World

Christoph Reichenbach, Yannis Smaragdakis

University of Massachusetts, Amherst

1

slide-2
SLIDE 2

PARALLELIZABILITY ACCORDING TO COMPLEXITY THEORY

Serial Code . . . FOL + transitive closure FOL + simple reduce (count, majority...) FOL (First-Order Logic): parallel map degree of parallelizability

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

2

slide-3
SLIDE 3

OUR GOAL: ULTIMATE PARALLEL LANGUAGE

  • Declarative language to express

– “everything” efficiently parallelizable – only programs that are efficiently parallelizable

  • Seamlessly integrated in Java

List<Person> ps = forall Area a. find p: p in a.people && p.name == "Waldo"; int AB[i][j] = reduce(+) (forall k. A[i][k] ∗ B[k][j]);

  • Program consists of parallel and sequential “phases”

– over same data

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

3

slide-4
SLIDE 4

OUR GOAL: ULTIMATE PARALLEL LANGUAGE

  • Declarative language to express

– “everything” efficiently parallelizable – only programs that are efficiently parallelizable

  • Seamlessly integrated in Java

List<Person> ps = forall Area a. find p: p in a.people && p.name == "Waldo"; int AB[i][j] = reduce(+) (forall k. A[i][k] ∗ B[k][j]);

  • Program consists of parallel and sequential “phases”

– over same data

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

4

slide-5
SLIDE 5

OUR GOAL: ULTIMATE PARALLEL LANGUAGE

  • Declarative language to express

– “everything” efficiently parallelizable – only programs that are efficiently parallelizable

  • Seamlessly integrated in Java

List<Person> ps = forall Area a. find p: p in a.people && p.name == "Waldo"; int AB[i][j] = reduce(+) (forall k. A[i][k] ∗ B[k][j]);

  • Program consists of parallel and sequential “phases”

– over same data

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

5

slide-6
SLIDE 6

FOR RANDOM-ACCESS STRUCTURES, PARALLELIZING IS EASY ArrayList<...> people; ... = ... find p: p in people ...

people

Core #1 Core #0 Core #2 Core #3

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

6

slide-7
SLIDE 7

FOR RANDOM-ACCESS STRUCTURES, PARALLELIZING IS EASY ArrayList<...> people; ... = ... find p: p in people ...

people

Core #1 Core #0 Core #2 Core #3

  • NEW JAVA RUNTIME FOR PARALLEL WORLD
  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

7

slide-8
SLIDE 8

CHALLENGE: PARELLELIZE PROCESSING OF ALL JAVA DATA

Support any user-defined data structure

  • Arbitrary object references
  • “Sequential” library structures (e.g., linked lists)

. . . Core #1 Core #0 Core #2 Core #3 ?

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

8

slide-9
SLIDE 9

IDEA: FROM OO HEAP TO RELATIONAL HEAP

e3 "Werner" e0 "Waldo" e1 "Waldina" e2 "Wilma"

class E { String name; E boss; E partner; }

name e0 "Waldo" e1 "Waldina" e2 "Wilma" e3 "Werner" . . . boss e0 e3 e1 e3 e2 e1 e3 — . . . partner e0 e1 e1 e0 e2 e5 e3 e17 . . . NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

9

slide-10
SLIDE 10

IDEA: FROM OO HEAP TO RELATIONAL HEAP

e3 "Werner" e0 "Waldo" e1 "Waldina" e2 "Wilma"

class E { String name; E boss; E partner; }

name e0 "Waldo" e1 "Waldina" e2 "Wilma" e3 "Werner" . . . boss e0 e3 e1 e3 e2 e1 e3 — . . . partner e0 e1 e1 e0 e2 e5 e3 e17 . . . NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

10

slide-11
SLIDE 11

IDEA: FROM OO HEAP TO RELATIONAL HEAP

e3 "Werner" e0 "Waldo" e1 "Waldina" e2 "Wilma"

class E { String name; E boss; E partner; }

name e0 "Waldo" e1 "Waldina" e2 "Wilma" e3 "Werner" . . . boss e0 e3 e1 e3 e2 e1 e3 — . . . partner e0 e1 e1 e0 e2 e5 e3 e17 . . . NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

11

slide-12
SLIDE 12

IDEA: FROM OO HEAP TO RELATIONAL HEAP

e3 "Werner" e0 "Waldo" e1 "Waldina" e2 "Wilma"

Migrate class E { String name; E boss; E partner; }

name e0 "Waldo" e1 "Waldina" e2 "Wilma" e3 "Werner" . . . boss e0 e3 e1 e3 e2 e1 e3 — . . . partner e0 e1 e1 e0 e2 e5 e3 e17 . . . NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

12

slide-13
SLIDE 13

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

– ask us for our preliminary numbers

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

13

slide-14
SLIDE 14

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

– ask us for our preliminary numbers

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

14

slide-15
SLIDE 15

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

– ask us for our preliminary numbers

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

15

slide-16
SLIDE 16

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

– ask us for our preliminary numbers

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

16

slide-17
SLIDE 17

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

– ask us for our preliminary numbers

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

17

slide-18
SLIDE 18

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

– Ask us for our preliminary numbers!

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

18

slide-19
SLIDE 19

CHALLENGE: REPRESENTATION MIGRATION Ideas:

  • Migrate dynamically between representations at

sequential-parallel switch – cost comparable to GC per switch

  • Maintain relational heap throughout execution

– incurs > 10× overhead for sequential execution ...

  • Hybrid representation (relational+cache)
  • Hybrid + incremental migration (write barrier)

Ask us for our preliminary numbers!

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

19

slide-20
SLIDE 20

CONCLUSION

  • The relational heap is a great basis for parallelism
  • Relational and traditional heaps can coexist in many

ways

NEW JAVA RUNTIME FOR PARALLEL WORLD

  • C. REICHENBACH, Y. SMARAGDAKIS (UMASS)

20