Freeing Programmers from the Shackles of Sequentiality Thesis - - PowerPoint PPT Presentation

freeing programmers from the shackles of sequentiality
SMART_READER_LITE
LIVE PREVIEW

Freeing Programmers from the Shackles of Sequentiality Thesis - - PowerPoint PPT Presentation

Freeing Programmers from the Shackles of Sequentiality Thesis Proposal Talk Sven Stork Committee Jonathan Aldrich (CMU) Paulo Marques (UC) Todd Mowry (CMU) Ernesto Costa (UC) William Scherlis (CMU) Marco Viera (UC) 1 2 2 2 2 2 How


slide-1
SLIDE 1

Freeing Programmers from the Shackles of Sequentiality

Thesis Proposal Talk Sven Stork

Committee Jonathan Aldrich (CMU) Todd Mowry (CMU) William Scherlis (CMU) Paulo Marques (UC) Ernesto Costa (UC) Marco Viera (UC)

1

slide-2
SLIDE 2

2

slide-3
SLIDE 3

2

slide-4
SLIDE 4

2

slide-5
SLIDE 5

2

slide-6
SLIDE 6

2

slide-7
SLIDE 7

3

How to write and use frameworks and libraries correctly? How to write correct parallel/concurrent code?

slide-8
SLIDE 8

Why correctness matters?

  • Therac-25
  • race condition
  • 3 deaths
  • 3 heavy injuries

4

slide-9
SLIDE 9

Why correctness matters?

  • Blackout (2003)
  • race condition
  • 55,000,000 people

affected

5

slide-10
SLIDE 10

How to solve these problems?

6

slide-11
SLIDE 11

Step by step

  • Kevin Bierhoff check correct object usage:
  • type state to check object protocols
  • access permissions to tackle aliasing
  • Plural [sequential protocols]

7

slide-12
SLIDE 12

Step by step

  • Nels Beckman extend Bierhoff’s work to verify
  • bject protocols in concurrent settings
  • access permission to check correct

synchronization

  • access permissions to optimize STM
  • NIMBY/Sync’ or Swim [concurrent protocols]

8

slide-13
SLIDE 13

Step by step

  • So far we can check that programs
  • obey object protocols
  • are properly synchronized
  • How to write concurrent programs in first

place?

9

slide-14
SLIDE 14

How to write concurrent programs?

  • Experiment
  • Implemented a few programs in various

parallel programming abstractions

  • Observation
  • no silver bullet
  • implicit parallelism appeared better
  • no solutions for future

10

slide-15
SLIDE 15

Pushing the Envelope

  • How should we write parallel code in

20-30 years?

11

slide-16
SLIDE 16

Pushing the Envelope

  • How should we write parallel code in

20-30 years?

Don’t do it!

  • - Doug Lea

11

slide-17
SLIDE 17

Pushing the Envelope

  • make experiment
  • ÆMINIUM parallelism

garbage collector memory management

  • automatically parallelization of code
  • composable
  • modular

12

slide-18
SLIDE 18

The flow of access- and group-permissions provides a powerful abstraction to capture common programming idioms while simultaneous enabling the safe extraction of efficient concurrency.

13

Thesis Statement

slide-19
SLIDE 19

In other words ...

14

  • propose abstract concept (ÆMINIUM)
  • use permission information for automatic

parallelization of programs

  • permissions are suitable abstraction
  • can express common concurrent

programming patters

  • allow us to achieve better performance
slide-20
SLIDE 20

Hypotheses

  • The ÆMINIUM approach is
  • save (i.e., no data races)
  • efficient (i.e., achieve speedup)
  • practical (i.e., express common

programming paradigms)

15

slide-21
SLIDE 21

Approach

  • formalizing and implementation
  • f the ÆMINIUM approach

16 Plaid Runtime JVM AEminium + Plaid Compiler

slide-22
SLIDE 22

Approach

  • formalizing and implementation of the

ÆMINIUM approach

17 Plaid Runtime JVM ÆMINIUM + Plaid Compiler

slide-23
SLIDE 23

ÆMINIUM +

Approach

  • formalizing and implementation of the

ÆMINIUM approach

18 Plaid Runtime JVM Plaid Compiler

ÆMINIUM Runtime

slide-24
SLIDE 24

Contributions

  • formal system of ÆMINIUM
  • proof of concept implementation
  • evaluation of feasibility

19

slide-25
SLIDE 25

The Approach Explained

20

slide-26
SLIDE 26

Access Permissions

  • abstract capabilities associated with object

references that encode

  • access rights (e.g., read/write)
  • aliasing information
  • extensively used for verification

(e.g. concurrency, protocols)

21

slide-27
SLIDE 27

Access Permissions

22

1 N RW unique shared R immutable immutable

Aliasing Access

slide-28
SLIDE 28

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-29
SLIDE 29

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-30
SLIDE 30

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-31
SLIDE 31

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-32
SLIDE 32

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-33
SLIDE 33

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-34
SLIDE 34

Access Permissions

  • linear logic (resource logic)
  • split and join

23

slide-35
SLIDE 35

unique immutable immutable

Access Permissions

  • aliases = 1
  • access= RW
  • “thread local”
  • no

synchronization

Unique Permission

Object

shared shared

24

slide-36
SLIDE 36

shared shared unique immutable immutable

Access Permissions

  • aliases = N
  • access= R
  • “constant”
  • no

synchronization

Immutable Permission

Object

25

immutable immutable

slide-37
SLIDE 37

shared shared unique immutable immutable

Access Permissions

  • aliases = N
  • access= R
  • “constant”
  • no

synchronization

Immutable Permission

Object

26

immutable immutable

slide-38
SLIDE 38

shared shared unique immutable immutable

Access Permissions

  • aliases = N
  • access= R
  • “constant”
  • no

synchronization

Immutable Permission

Object

27

immutable immutable

slide-39
SLIDE 39

unique immutable immutable

Access Permissions

  • aliases = 1
  • access= RW
  • “thread local”
  • no

synchronization

Unique Permission

Object

shared shared

28

slide-40
SLIDE 40

immutable immutable unique shared

Access Permissions

  • aliases = N
  • access= RW
  • “shared data”
  • requires

synchronization

Shared Permission

Object

shared

29

slide-41
SLIDE 41

unique immutable immutable

Access Permissions

  • aliases = 1
  • access= RW
  • “thread local”
  • no

synchronization

Unique Permission

Object

shared shared

30

slide-42
SLIDE 42

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } amount:

Permission Example

public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

immutable 31

slide-43
SLIDE 43

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } amount:

Permission Example

public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

immutable 31

Syntax: permission [>> permission] type var

BORROW: unique Account from unique >> unique Account from CHANGE: unique >> immutable Account account

slide-44
SLIDE 44

amount:

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

immutable 32

slide-45
SLIDE 45

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

33

slide-46
SLIDE 46

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

34

slide-47
SLIDE 47

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

immutable 35

slide-48
SLIDE 48

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from: amount:

immutable 36

slide-49
SLIDE 49

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

37

slide-50
SLIDE 50

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

38

slide-51
SLIDE 51

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from: amount:

immutable 39

slide-52
SLIDE 52

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from: amount:

immutable 40

slide-53
SLIDE 53

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

41

slide-54
SLIDE 54

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique

// to:

unique

from:

immutable

amount:

42

slide-55
SLIDE 55

// to: from: amount:

Permission Example

public void transfer(unique Account from, unique Account to, immutable Amount amount) { withdraw(from, amount); deposit(to, amount); } public void deposit(unique Account account, immutable Amount amount) {...} public void withdraw(unique Account account, immutable Amount amount){...}

unique unique immutable

amount:

immutable 43

slide-56
SLIDE 56

Using Permissions for Parallelization

  • infer permissions flow based on

lexical order

  • define operations can run in parallel iff

intersection of their required permissions does not contain unique permissions

44

slide-57
SLIDE 57

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable immutable

from: to: amount:

45

slide-58
SLIDE 58

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

46

slide-59
SLIDE 59

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount: deposit(to, amount)

47

withdraw(from, amount)

slide-60
SLIDE 60

immutable immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

48

slide-61
SLIDE 61

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

49

slide-62
SLIDE 62

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

50

slide-63
SLIDE 63

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

51

slide-64
SLIDE 64

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

52

slide-65
SLIDE 65

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

53

join

}

slide-66
SLIDE 66

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

54

join

}

slide-67
SLIDE 67

immutable

Dataflow Example

transfer(unique Account from, unique Account to, immutable Amount amount)

unique unique immutable

from: to: amount:

split

withdraw(from, amount) deposit(to, amount) amount:

55

join

}

slide-68
SLIDE 68

amount:

Dataflow Example

immutable

transfer(unique Account from, unique Account to, immutable Amount amount)

immutable unique unique

from: to: amount:

split

withdraw(from, amount) deposit(to, amount)

56

join

}

slide-69
SLIDE 69

Shared Data Issues

57

  • causes non-determinism but sometimes order

matters

  • e.g., object that needs to follow protocol
  • all accesses to shared objects require

synchronization

  • sometimes shared permissions are

unavoidable

  • e.g., doubly linked list
slide-70
SLIDE 70

Data Groups

  • bundle shared objects into data groups
  • abstract collection of objects
  • disjoint partitions of heap

58

slide-71
SLIDE 71

Data Groups

  • bundle shared objects into data groups
  • abstract collection of objects
  • disjoint partitions of heap

58

slide-72
SLIDE 72

Data Groups

  • bundle shared objects into data groups
  • abstract collection of objects
  • disjoint partitions of heap

58

slide-73
SLIDE 73

Data Groups

  • bundle shared objects into data groups
  • abstract collection of objects
  • disjoint partitions of heap

58

slide-74
SLIDE 74

Data Groups Permissions

  • similar to access permissions for data groups
  • manual split/joining by user
  • user controlled mechanism for granularity

59

slide-75
SLIDE 75

Data Groups Permissions

  • similar to access permissions for data groups
  • manual split/joining by user
  • user controlled mechanism for granularity

59

slide-76
SLIDE 76

Data Groups Permissions

  • data groups are embedded in objects
  • strong encapsulation, ownership
  • group permissions are derived from receiver

permissions

60

slide-77
SLIDE 77

shared shared exclusive

Group Permissions

  • aliases = 1
  • access= RW
  • “thread local”
  • no

synchronization

Exclusive Permission

61

slide-78
SLIDE 78

protected exclusive shared shared

Group Permissions

  • aliases = N
  • access= none
  • “shared data”
  • requires

synchronization

Shared Permission

62

split

slide-79
SLIDE 79

shared protected exclusive shared

Group Permissions

  • aliases = 1
  • access= RW
  • “protected ”
  • is synchronized

atomic Permission

63

atomic

slide-80
SLIDE 80

protected exclusive shared shared

Group Permissions

  • aliases = N
  • access= none
  • “shared data”
  • requires

synchronization

Shared Permission

64

split

slide-81
SLIDE 81

shared shared exclusive

Group Permissions

  • aliases = 1
  • access= RW
  • “thread local”
  • no

synchronization

Exclusive Permission

65

slide-82
SLIDE 82

Data Group Example

66

class DLLItem { public Object data; public DLLItem prev; public DLLItem next; } public class DLL { private DLLItem head; public void add(Object data) { DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

I2 I3

O1 O2 O3

slide-83
SLIDE 83

Data Group Example

67

class DLLItem { public Object data; public DLLItem prev; public DLLItem next; } public class DLL { private DLLItem head; public void add( Object data) { DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

I2 l3

O1 O2 O3

slide-84
SLIDE 84

Data Group Example

68

class DLLItem { public Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add( Object data) { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-85
SLIDE 85

Data Group Example

69

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add(unique >> none Object data) { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-86
SLIDE 86

Data Group Example

70

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-87
SLIDE 87

Data Group Example

71

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-88
SLIDE 88

Data Group Example

71

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

ERROR: Access shared data

slide-89
SLIDE 89

Data Group Example

72

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add(unique >> none Object data) : unique { atomic { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } } }

I1

DLL

l2 l3

O1 O2 O3

slide-90
SLIDE 90

Data Group Example

72

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { private shared DLLItem head; public void add(unique >> none Object data) : unique { atomic { shared DLLItem li = new DLLItem(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } } }

I1

DLL

l2 l3

O1 O2 O3

Unique receiver means no aliases

slide-91
SLIDE 91

Data Group Example

73

class DLLItem { public unique Object data; public shared DLLItem prev; public shared DLLItem next; } public class DLL { group nodes; private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem li = new DLLItem (); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-92
SLIDE 92

Data Group Example

74

class DLLItem<G> { public unique Object data; public shared DLLItem<G> prev; public shared DLLItem<G> next; } public class DLL { group nodes; private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem li = new DLLItem (); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-93
SLIDE 93

Data Group Example

75

class DLLItem<G> { public unique Object data; public shared DLLItem<G> prev; public shared DLLItem<G> next; } public class DLL { group nodes; private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem<nodes> li = new DLLItem<nodes>(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-94
SLIDE 94

Data Group Example

75

class DLLItem<G> { public unique Object data; public shared DLLItem<G> prev; public shared DLLItem<G> next; } public class DLL { group nodes; private shared DLLItem head; public void add(unique >> none Object data) : unique { shared DLLItem<nodes> li = new DLLItem<nodes>(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } }

I1

DLL

l2 l3

O1 O2 O3

slide-95
SLIDE 95

Data Group Example

76

class DLLItem<G> { public unique Object data; public shared DLLItem<G> prev; public shared DLLItem<G> next; } public class DLL { group nodes; private shared DLLItem head; public void add(unique >> none Object data) : unique { unpack { shared DLLItem<nodes> li = new DLLItem<nodes>(); this.head.prev = li; li.next = this.head; li.data = data; this.head = li; } } }

I1

DLL

l2 l3

O1 O2 O3

slide-96
SLIDE 96

Data Group Example

77

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } }

unique

// this:

unique

data:

slide-97
SLIDE 97

Data Group Example

78

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } }

unique

// this:

unique

data:

slide-98
SLIDE 98

Data Group Example

79

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } }

unique unique

data:

exclusive

// this: this.nodes:

slide-99
SLIDE 99

Data Group Example

80

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } }

unique unique

data:

exclusive

// this: this.nodes:

slide-100
SLIDE 100

Data Group Example

81

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } } data:

unique

exclusive

// this: this.nodes:

unique

slide-101
SLIDE 101

Data Group Example

82

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } }

unique

// this:

unique

data:

exclusive

// this.nodes:

slide-102
SLIDE 102

Data Group Example

83

public void add(unique >> none Object data) : unique { unpack { ... li.data = data; } }

unique

// this:

unique

data:

exclusive

// this.nodes:

slide-103
SLIDE 103

Progress so far

84

slide-104
SLIDE 104

μÆMINIUM

  • core-calculus based on group permissions
  • concurrent-by-default type system
  • soundness proof for absence of race

conditions (cf. ‘safety’ hypothesis)

85

slide-105
SLIDE 105

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based runtime system for dataflow

and fork/join parallelisms

  • support for locks and STM
  • dynamic detection of deadlocks

(for the lock based approach)

86

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

slide-106
SLIDE 106

Dataflow Runtime

  • support for 3 kinds of tasks
  • Non-Blocking -- computation intensive
  • Blocking -- I/O tasks
  • Atomic -- task that require protection

87

slide-107
SLIDE 107

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

88

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

Tasks

Dependencies

slide-108
SLIDE 108

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

88

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

Tasks

Dependencies

slide-109
SLIDE 109

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

89

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

slide-110
SLIDE 110

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

90

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

slide-111
SLIDE 111

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

91

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

slide-112
SLIDE 112

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

92

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

slide-113
SLIDE 113

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

93

1 3 2 4 5 4’ 4’’ 4’’’ 4’’’

task dependency fork/join dependency

slide-114
SLIDE 114

4’ 4’’ 4’’’ 4’’’

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

94

1 3 2 4 5

task dependency fork/join dependency

slide-115
SLIDE 115

4’ 4’’ 4’’’ 4’’’

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

95

1 3 2 4 5

task dependency fork/join dependency

slide-116
SLIDE 116

4’ 4’’ 4’’’ 4’’’

Dataflow Runtime

  • data flow runtime system for ÆMINIUM
  • task based support for dataflow and

fork/join parallelisms

96

1 3 2 4 5

task dependency fork/join dependency

slide-117
SLIDE 117

Dataflow Runtime Performance Evaluation

  • compare performance to Java’s fork/join

framework

  • run micro benchmarks used by the

fork/join paper

  • ÆMINIUM runtime about 35% slower

97

slide-118
SLIDE 118

Dataflow Runtime “Atomic” Evaluation

  • compare worst, best and intermediate case
  • one global lock vs one lock per object
  • access single object vs multiple objects
  • read vs write
  • the locking based implementation
  • utperformed STM based implementation

in almost all cases

98

slide-119
SLIDE 119

Proof of Concept

  • Master thesis of Manuel Mohr
  • hand generated AST with type information
  • each method call becomes a task
  • showed principle feasibility

99

slide-120
SLIDE 120

Proof of Concept

  • performance

improvements

  • more optimize systems
  • dynamic/static load

balancing

100

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Speedup Number of cores n = 23 n = 25 n = 27
slide-121
SLIDE 121

Road ahead ...

101

slide-122
SLIDE 122

Language Implementation

  • implementing ÆMINIUM in Plaid
  • Plaid has built-in support for permissions
  • limited type checker for Plaid

(lambda support is still missing)

102

slide-123
SLIDE 123

Language Implementation

  • 1. add ÆMINIUM to Plaid language/parser
  • 2. extend Plaid typechecker with data groups
  • 3. extend Plaid infrastructure to compute

dataflow graph based on permission flow

  • 4. extend Plaid code generator to produce

parallel code

103

slide-124
SLIDE 124

Approach

  • 1st milestone
  • extend Plaid to compute permission flow

and parallelize code (no data groups)

  • 2nd milestone
  • extend Plaid with data groups
  • Evaluate system

104

slide-125
SLIDE 125

Evaluation

  • conducting multiple case studies
  • evaluating performance

(cf. efficiency hypothesis )

  • evaluating practicality

(cf. practical hypothesis)

105

slide-126
SLIDE 126

Evaluation

  • selection of case studies
  • use applications with known parallel/

concurrency characteristics

  • use representative applications
  • existing real-world applications
  • existing benchmarks

(SPLASH, SPEC, DaCapo, etc)

  • rewrite applications in ÆMINIUM/Plaid

106

slide-127
SLIDE 127

Time Line

107 Nov 2011 Sep 2012

1st Milestone permission only implementation

Jan 2012 March 2012 May 2012 Jul 2012

slide-128
SLIDE 128

Time Line

108

2nd Milestone data group implementation

Nov 2011 Sep 2012 Jan 2012 March 2012 May 2012 Jul 2012

slide-129
SLIDE 129

Time Line

109

Evaluation

Nov 2011 Sep 2012 Jan 2012 March 2012 May 2012 Jul 2012

slide-130
SLIDE 130

Time Line

110

writing thesis

Nov 2011 Sep 2012 Jan 2012 March 2012 May 2012 Jul 2012

slide-131
SLIDE 131

Risks

  • Slow progress in Plaid
  • omit unnecessary features
  • parallelize/overlap work
  • 2 stage approach

111

slide-132
SLIDE 132

Risks

  • Granularity issues
  • implement optimization techniques

(e.g., task merging, flattening, etc)

  • use dynamic load-balancing to avoid

generation of “useless” tasks

112

slide-133
SLIDE 133

Risks

  • Lack of parallelism
  • no silver bullet
  • ensure that we do not pay extra in the

case there is no parallelism

113

slide-134
SLIDE 134

Thanks for the Attention!

Questions?

114