Professional Documents
Culture Documents
kath.knobe@intel.com, vsarkar@rice.edu
PLDI Tutorial
June 15, 2009
*Intel and the Intel logo are registered trademarks of Intel Corporation. Other brands and names are the property of their respective owners
Outline
1.! Concurrent Collections Model and Languages
2.! Execution Semantics and Properties
3.! Implementation Approaches
4.! Patterns and Examples
5.! Research Topics
2
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
The Big Idea
3
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
<t2>
4
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Three main influences
1.! Streaming
3.! Dataflow
5
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Notation
White Board Textual Slideware
6
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Collections of dynamic instances
Static
Dynamic
( ) [ ] ( )
[ ] ( )
( ) [ ]
[ ]
( ) [ ] ( )
Influence 1: Streaming
8
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Collections of dynamic instances
<t2>
Static
(step1) (step2)
< >
< >
< >
< >
Dynamic
( )
( ) ( )
( ) ( )
( ) ( )
( )
9
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
[x: 12, 1]
(foo: 12 ) [x: 12, 2] (bar: 12)
[ x: 14, 1] (bar: 14)
(foo: 14) [ x: 14, 2] [x: 15, 1]
(foo: 15) (bar: 15)
[x: 15, 2]
<t: 1>
<t: 2>
<t: 3>
<t: 4>
(s: 1)
(s: 2) (q: 1)
(s: 3) (q: 2)
(s: 4) (q: 3)
(q: 4)
10
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Tag collections: new concept <t2>
(step1) (step2)
•! Tags are typically related to the semantics of application (indices in a loop nest, nodes in a tree or graph).
loop k = … Tag components
loop j = … are k and j
loop i = … Step
Z(i, j, k) =
= A(k, j)
end
end Step code has
end access to values of
tag components
•! Name the control and isolate controller (step1) from controllee (step2)
–! Some computation determines what widgets exist without knowing what will happen to the widgets. (step1)
produces <t2>
–! Then independently multiple computations operate on widgets. (step2) is a prescribed by <t2>
–! (step1), the widget-determining step, can be incorporated in distinct graphs that do different things with widgets.
•! Tag collection is the analog of region node in PDGs. (one controller – multiple controllees).
•! In C or Fortran (where “if” and “when” are not distinguished) you often see multiple instances of identical loop nests.
A tag collection is a way of defining the set of instances once but using them multiple times.
•! just as index used for loop iterations and for array subscripts, we use tags for tag collections and for tagging items
and steps.
11
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
•! References:
–! “Generative communication in Linda”, David Gelernter, TOPLAS, Jan 1985.
–! “Coordination languages and their significance”, David Gelernter and
Nicholas Carriero, CACM, Feb 1992
12
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Objects
Item Collections Tag Collections
–! Means of communication –! Means of communication among
among step instances step instances
(data dependence) (control dependence)
–! Dynamic single assignment –! A tag collection may control
Each instance is associated multiple step collections
with exactly one contents. –! Determines what step instances
–! Are tagged will execute
Step Collections
–! Every step collection is controlled by a tag collection
–! Functional. Only side-effects are put objects
–! Gets items. Puts tags and items. All gets before any put
–! Are tagged. A step has access to its tag value
13
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Relationships: Consumer
•! Corresponds to gets in steps
•! A step may consume multiple distinct item collections
[x], [y] -> (foo)
•! A step may consume multiple instances of items from a
given collection
[x: neighbors(i)] -> (foo: i)
•! Conservative
[x] -> (foo) means that (foo) may consume from [x]
If there is no consumer relationship between [y] and (foo) then
(foo) may not consume from [y]
14
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Relationships: producer
•! Corresponds to puts in steps
•! A step may produce multiple distinct item/tags collections
(foo) -> [x], [y]
•! A step may produce multiple instances of items/tags from
a given collection
(foo: i) -> [x: neighbors(i)]
•! Conservative
(foo) -> [x] means that (foo) may produce [x]
If there is no producer relationship between [y] and (foo) then
(foo) may not produce [y]
15
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Relationships: prescription
•! A prescription relationship between tag collection T and
step collection S means that if tag instance in T with tag
component values t1, …tn is in T then the step with
component values t1, …tn will execute.
•! The relationship is always the identity function.
•! A tag collection may prescribe multiple step collections.
16
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
An Application (simple in the extreme)
“aaa” “aaa”
“ff”
17
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
18
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Make it precise enough to execute
How do we distinguish among the instances?
<spanTag: j, s>
19
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
<spanTag: j, s>
[span: 1]
[span: 2]
[span: 3]
[span: 4]
20
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Make it precise enough to execute
How do we distinguish among the instances?
<spanTag: 1, 1>
<stringTag: 1> <spanTag: 1, 2>
<stringTag: 2> <spanTag: 1, 3>
… <spanTag: 1, 4>
21
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
(createSpan) [span]
•! What are the producer/consumer
relationships?
[span] (processSpan)
[input] [results]
•! What are the inputs and outputs?
considered to be produced and
consumed by the environment
22
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Summarize questions: distinguish among instances
becomes
23
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
24
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
One slide summary of questions
25
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Result is:
•! Parallel
•! Deterministic (wrt results)
•! race-free
26
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Experience with questions:
<K>
cell tracker
(Cell detector: K)
[Cell candidates: K ]
[Histograms: K]
[Input Image: K]
[State measurements: K]
[Final states: K]
28
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Available Parallelism: among input strings
29
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
30
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Separation of Concerns between Domain Expert
and Tuning Expert
Goal:
The application problem serious separation of concerns:
The work of the domain expert The domain expert does not need
•! Semantic correctness to know about parallelism
•! Constraints required by the application
The work of the tuning expert The tuning expert does not need
•! Architecture to know about the domain.
•! Actual parallelism
•! Locality
•! Overhead
•! Load balancing
•! Distribution among processors
•! Scheduling within a processor
31
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
32
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
How people think about their application:
The white board drawing
What are the high level operations?
[image]
(classifier1)
(classifier2)
(classifier3)
33
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
[image]
(classifier1: w)
(classifier2: w)
(classifier3: w)
34
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Make it precise enough to execute
Control: Every step is a controllee
(classifier3: w)
35
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
<spanTag: j, s>
// controller/controllee relations
<spanTags: j, s> :: (processSpan: j, s); (processSpan: j, s)
// producer/consumer relations
[span: j, s] -> (processSpan : j, s) -> [results : j, s];
36
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
The Environment
Environment (env) is just a normal main program
•! In addition it starts and finishes the CnC program graph
•! Using the same API used by the step code, it
–! Puts items and tags (env acts as a producer)
–! Gets items and tags (env acts as a consumer)
•! It has access to the CnC API for puts and gets, it doesn’t
obey any of the constraints of CnC.
–! It isn’t tagged
–! It isn’t single assignment
–! It isn’t functional
37
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Semantic model:
instances acquire attributes
38
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Influence 3: Dataflow
•! References:
–! “First version of a data flow procedure language”. Jack B. Dennis.
Programming Symposium, Proceedings Colloque sur la Programmation,
pages 362–376, 1974.
–! “Dryad: distributed data-parallel programs from sequential building blocks”.
Michael Isard, Mihai Budiu, Yuan Yu, Andrew Birrell, Dennis Fetterly.
EuroSys '07: Proceedings of the 2nd ACM SIGOPS/EuroSys European
Conference on Computer Systems, 39 June 2007.
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
( ).{prescribed} ( ).{inputs-available}
( ).{inputs-available, prescribed}
AKA: enabled
40
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Comparison with Microsoft Dryad Execution Engine
•! Overview of Dryad
–! General-purpose distributed execution engine for coarse-grain
data-parallel applications.
–! Combines sequential “vertices” with directed communication
“channels” to form an acyclic dataflow graph.
–! Support for distributed systems --- channels are implemented TCP,
files, or shared memory pipes as appropriate.
–! Dryad graph is specified by an embedded language (in C++) using
a combination of operator overloading and API calls.
•! Differences with CnC
–! CnC supports cyclic graphs with first-class tagged controller-
controllee relationships and tagged item collections.
–! Current CnC implementations are focused on multicore rather than
distributed systems
41
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Outline
1.! Concurrent Collections Model and Languages
2.! Execution Semantics and Properties
3.! Implementation Approaches
4.! Patterns and Examples
5.! Research Topics
42
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC Abstract Interpreter
•! Theoretical model used to define operational semantics for CnC
–! Actual CnC implementations will be discussed later
•! Operational semantics is defined with respect to the state of all item, tag, and
step collections in a CnC program execution
–! Assumes unbounded memory and unbounded number of processors
•! Motivation for defining abstract interpreter and formal semantics --- establish
key properties of the CnC execution model
–! Determinism
–! Parallelism
–! Redundancy
43
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Definitions
•! (SC:T) denotes a step in step collection SC with tag T
•! [IC:T] denotes the item in item collection IC with tag T
•! <TC:T> denotes the entry in tag collection TC with tag T
•! producedBy(SC) is the set of item and tag collections that may be produced
in step collection SC via put operations
•! prescribedBy(TC) is the set of step collections that are prescribed by tag
collection TC
44
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC Program State
•! The state " of an executing CnC program consists of the following primitive
attributes of item, tag and step collections
–! ".[IC:T].Avail = true if a put operation has been performed on item
collection IC with tag T
–! ".[IC:T].Value = value stored in item collection IC with tag T
if ".[IC:T].Avail = true, or # (undefined) otherwise
–! ".<TC:T>.Avail = true if a put operation has been performed on tag
collection TC with tag T
–! ".(SC:T).Done = true if step SC(T) has executed and all its put operations
have been performed
•! The null state "0 for a CnC program is defined as follows
–! "0.[IC:T].Avail = false for all item collections IC and tags T
–! "0.[IC:T].Value = # (undefined) for all item collections IC and tags T
–! "0.<TC:T>.Avail = false for all tag collections TC and tags T
–! "0.(SC:T).Done = false for all step collections SC and tags T
•! A value of " = # represents an error state in a CnC program in which all
attributes are # (undefined)
45
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Derived attributes
•! For convenience, we define the following derived attributes that can be computed
from the primitive state attributes Avail, Value and Done
•! (SC:T).Prescribed = <!(SC):T>.Avail, indicates if step (SC:T) has been
prescribed
–! Recall that !(SC) is the (unique) tag collection that prescribes step
collection SC
•! The prefix ". is omitted when it’s clear from the context which state is being referred
to
46
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Lifecycle of Primitive and Derived Attributes
<>.Avail [ ].Avail
( ).Prescribed ( ).InputsAvailable
( ).Enabled
Primitive Attribute
Derived Attribute
( ).Done
[ ].Avail <>.Avail
47
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
48
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Interaction of a CnC Program with its Environment:
Final State
•! The final state "f of a CnC program is examined by executing an Environmental Output
computation EO that can perform the following special CnC operations:
–! Nonblocking get operation on a specific item [IC:T], which returns the value if
[IC:T].Avail = true or an error code otherwise (instead of blocking)
–! Iterated get operation on an item collection IC, which returns all available items
[IC:T] in IC with their values, [IC:T].Value
–! Nonblocking get operation on a specific tag <TC:T> that returns the value of
<TC:T>.Avail
–! Iterated get operation on a tag collection TC, which returns the tags for all available
items <TC:T> in TC
49
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
51
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
We define "’ = Merge("1, "2), the merge of states "1 and "2 as follows:
–! "’.[IC:T].Value =
"1.[IC:T].Value if "2.[IC:T].Avail = false
"2.[IC:T].Value if "1.[IC:T].Avail = false
"1.[IC:T].Value if "1.[IC:T].Avail ! "2.[IC:T].Avail
! "1.[IC:T].Value = "2.[IC:T].Value
•! During execution, the CnC program will start with initial state "i, go through a
number of state transitions, and terminate with final state "f when no step
instance (SC:T) remains with (SC:T).Enabled = true and (SC:T).Done = false
–! Final state "f is said to be incomplete if it contains a step instance with
Prescribed = true
•! Sequential Abstract Interpreter (SAI) executes a single enabled step (SC:T) at a
time in isolation from other steps
–! Output state is computed for (SC:T) using the state update function, "’ =
Apply(", (SC:T)) where " is the input state (output state from previous step)
•! Parallel Abstract Interpreter (PAI) executes enabled steps asynchronously in
parallel
–! For each step (SC:T), the PAI first computes the input state,
" = Merge("P, "1, "2, …) as the merge of all “predecessor” states of (SC:T)
•! "P = output state of step that prescribed (SC:T)
•! "j = output state of step that produced item [ICj:Tj] & consumedBy(SC:T)
–! The output state for (SC:T) is then computed as "’ = Apply(", (SC:T))
54
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Properties of CnC Execution Semantics
•! Determinism
–! For a given CnC program and input store "i, the final output store "f will
be the same for all scheduled sequences of steps in the sequential
abstract interpreter
•! Parallelism
–! For a given CnC program and input store "i, the final output store "f will
be the same for the sequential abstract interpreter and the parallel
abstract interpreter
•! Redundancy
–! Consider an extension to the single assignment rule in which multiple
puts to the same item [IC:Ta] are permitted with the same value, and
multiple puts to the same tag <TC:Tb> are also permitted
–! For a given CnC program and input store "i, a modified abstract
interpreter with this extension in which any put to a tag <TC:T> is
replicated a bounded number of times will lead to the same final output
store "f as the sequential abstract interpreter
55
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
56
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Outline
1.! Concurrent Collections Model and Languages
2.! Execution Semantics and Properties
3.! Implementation Approaches
4.! Patterns and Examples
5.! Research Topics
57
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Current implementations
•! CnC is a programming model that can be embodied in multiple
programming languages
Current implementations
1.! Intel® Concurrent Collections for C++
2.! Rice Concurrent Collections for Java
3.! Rice Concurrent Collections for .NET (preliminary)
58
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
1. Intel® Concurrent Collections for C++
C++ compiler
CnC library
Intel TBB Library Key:
Windows/Linux User supplied
Standard
<spanTag: j, s>
// controller/controllee relations
<spanTags: j, s> :: (processSpan: j, s); (processSpan: j, s)
// producer/consumer relations
[span: j, s] -> (processSpan : j, s) -> [results : j, s];
60
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC C++ Build Model
#include
Translator Compiler
C++ Concurrent
Object
Header Collections
File
File Library
Linker
User specified
Application
Concurrent Collections components
61
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC specification
<spanTag: j,s> :: (processSpan: j,s);
[span:j,s] -> (processSpan: j,s);
(processSpan: j,s) -> [result: j,s];
63
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Cholesky performance:!
Intel 2-socket x 4-core Harpertown @ 2 GHz + Intel MKL 10.1!
Acknowledgments:
Aparna
Chandramolishwaran,
Rich Vuduc
Georgia Tech
64
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Eigensolver performance (dsygvx)
Intel Harpertown (2x4 = 8 core)
Acknowledgments:
Aparna
Chandramolishwaran,
Rich Vuduc
Georgia Tech
65
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
HJ compiler
CnC library
Habanero Runtime Key:
Java VM User supplied
66
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Habanero Multicore Software Research project (habanero.rice.edu)
Parallel Applications
(Seismic analysis, Medical imaging, Finite Element Methods, …)
Multicore Platforms
67
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
async S finish S
!! Execute S, but wait until all
•! Creates a new child activity that
(transitively) spawned asyncs have
executes statement S terminated.
•! Returns immediately
•! Rooted exception model
•! S may reference final variables in •! Trap all exceptions thrown by
enclosing blocks spawned activities.
•! Throw an (aggregate) exception
•! Activities cannot be named if any spawned async terminates
abruptly.
•! Activity cannot be aborted or
cancelled
!! Implicit finish between start and end
of main program
69
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Delayed Async
•! Cond must be monotonic i.e., must •! “async Stmt” can be translated to a delayed
remain stable when it becomes true async as follows:
70
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Mapping Concurrent Collections to Habanero-Java
71
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
import
cnc_t Translator cnc_c Compiler
import
JAR builder
Abstract classes for all steps
Definitions for all collections
Graph definition and initialization
Java application
User specified
73
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
•! Code Generation
–! Uses CodeDom for source code generation for multiple source targets
•! Targets F#, C#, VB.NET, managed C++ (bold languages have been tested)
•! Runtime
–! Uses Task Parrallel Library (TPL) for task creation/scheduling
–! ItemCollection is hand coded concurrent hash table with locking
–! Tags are F# tuples (.NET 4.0 will have proper tuples in CIL)
–! Tag collection Put immediately queues a new task with TPL
•! Performance
–! Currently gets 3.3x speedup on Cholesky benchmark on 8-core machine
•! Acknowledgments
–! David Peixotto (dmp@cs.rice.edu)
74
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC Implementation Challenges
75
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
76
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Slicing Annotation
77
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
78
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Use of Slicing Annotations for Memory Management
79
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
80
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC supports not only different schedules but
a wide range of runtime styles
grain distribution schedule
static static static
HP TStreams
81
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Outline
1.! Concurrent Collections Model and Languages
2.! Execution Semantics and Properties
3.! Implementation Approaches
4.! Patterns and Examples
5.! Research Topics
82
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Cholesky factorization
•! Input matrix B of size nxn where n = p*b for some b which denotes
tile size
•! Output lower triangular matrix L
1.! for k = 1 to p do
2.! conventionalCholesky(Bkk, Lkk);
3.! for j = k + 1 to p do
Aparna Chandramolishwaran
4.! triangularSolve(Lkk, Bjk, Ljk); Rich Vuduc
Georgia Tech
5.! for i = k+1 to j do
6.! symmetricRank-kUpdate(Ljk, Lik, Bij);
83
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
(update: k, j, i)
[ ]
84
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Line 2: Conventional Cholesky
K=1
85
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
K=1
K=1
K=1
86
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Line 6: Symmetric Rank k Update
K=1
K=1 K=1
87
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
K=2
88
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Line 4: Triangular Solve
K=2
K=2
K=2
89
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
K=2
K=2 K=2
90
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC asynchronous execution
K=1
91
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
K=1
92
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC asynchronous execution
K=1
K=1
93
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
K=2
K=1
K=1
94
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Cholesky: Intel 2-socket x 4-core Harpertown @ 2 GHz + Intel MKL 10.1!
95
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Critical!
path!
96
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Eigensolver performance (dsygvx)
Intel Harpertown (2x4 = 8 core)
97
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Dedup
•! Use cheap resources (processing power) to
make more efficient use of scarce resources
(storage & bandwidth).
•! Already in use in commercial products.
•! Detects and eliminates redundancy in a data
stream with a next-generation technique
called 'deduplicaton'
•! Input is an uncompressed archive containing
various files
•! Pipeline parallelism with multiple thread pools
•! Huge working sets, significant communication
Next-generation storage
and networking products
already use data
deduplication.
98
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Dedup performance
99
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Applications
Body tracking
Heat diffusion
Face detection
PIRO feature extraction
Black-Scholes
Dedup compression
Cholesky
Eigenvalue solver
Matrix inversion
Conjugate gradient
Game Of Life
100
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Eight basic relationships between two steps
•! See tutorial on the web site organized around these relationships
•! Shows a complete but very simple example for each one.
101
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Control
yes no
Data
<T2> <T2>
yes
no
102
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Control
yes no
Data
<T> <T>
yes
<T> <T>
no
103
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
104
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Different step collections <T2>
Control dependence
(S1) (S2)
•! If
(S1: j) -> <t2: j>
(S1: 8) may or may not put <t2: 8>
•! Nested loop
(S1: j) -> <t2: j, i>
(S1: 8) puts <t2: 8, 1>, <t2: 8, 2>, <t2: 8, 3> , …
•! Arbitrary
(S1: 8) may put <t2: 45, 526, 87>
105
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
106
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Different step collections <T2>
•! Substring span
107
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
No constraints
[I] (S)
108
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Same step collection <T>
Control dependence
[I] (S)
•! While loop
•! Data items used in the control cycle are produced
outside of the control cycle
109
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Data dependence
[I] (S)
•! Iterative loop
•! Control tags used in the data cycle are produced
outside of the data cycle
110
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Same step collection <T>
111
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
While loop
(whileBody)
112
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Divide and conquer
Leaf tags
Root tag
Root tag <divideTag> <conquerTag>
Leaf tags
(divide) (conquer)
Leaf items
Root item [divideItem] [conquerItem] Root item
Leaf items
113
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Outline
1.! Concurrent Collections Model and Languages
2.! Execution Semantics and Properties
3.! Implementation Approaches
4.! Patterns and Examples
114
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
The problem
•! Most serial languages over-constrain orderings
–! Require arbitrary serialization
–! Allow for overwriting of data
–! The decision of if and when to execute are bound together
The solution
•! Isolate roles
–! Easier for the domain expert
–! Maximum flexibility for tuning expert
115
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Concurrent Collections
(only semantically required constraints)
116
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Intel® Concurrent Collections
Goal:
The application problem serious separation of concerns:
The work of the domain expert The domain expert does not need
•! Semantic correctness to know about parallelism
•! Constraints required by the application
The work of the tuning expert The tuning expert does not need
•! Architecture to know about the domain.
•! Actual parallelism
•! Locality
•! Overhead
•! Load balancing
•! Distribution among processors
•! Scheduling within a processor
117
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Outline
1.! Concurrent Collections Model and Languages
2.! Execution Semantics and Properties
3.! Implementation Approaches
4.! Patterns and Examples
5.! Research Topics
118
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
A model not a language
•! Don’t care about syntax
–! GUI, Textual representation, Class library
120
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Above CnC:
•! Applications
•! Domain-specific variants
(e.g., finance, graphics, database operations,
medical imaging)
121
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
<spanTag: s>
123
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
<stringTag: j>
(highStep: j)
<spanTag: s>
124
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Future: reductions
Semantics:
(reduceWholeCollection) step instance
gets whole item collection [input]
Execution:
As each instance of [input] arrives, it is
incorporated into the result. [result] is only
put when all instances of [input] are available
<reductionTag: singleton>
125
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Future: reductions
Semantics:
Separate reduction for each j
Execution:
As before, each instance is incorporated as it
arrives
<reductionTag: j>
126
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Possible efforts: Within CnC: theory
•! Variety of languages
–! theoretical aspects of continuous programs
–! theoretical aspects of CnC with controlled non-determinism
•! Universal CnC program
•! A CnC interpreter in CnC
127
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
[x: j]
[y: j]
(fooB: j)
[x: j]
[y: j]
(fooA: j)
[x: j]
[y: j]
(fooB: j)
[x: j]
[y: j]
<tags>
[items] (steps)
130
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Possible efforts: Below CnC: Runtime
•! Additional targets
•! Checkpoint / restart (existed at HP)
•! Checkpoint / continue (new)
•! Disk-based execution
•! Scheduling / distribution
–! Speculative scheduler
–! Demand-driven scheduler
131
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
•! Additional targets
•! Checkpoint / restart (existed at HP)
•! Checkpoint / continue (new)
•! Disk-based execution
•! Scheduling / distribution
•! Speculative scheduler
•! Demand-driven scheduler
132
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Dynamic GPU/vector operations
Red step collection
Blue step collection
133
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
134
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
ILP Pick
•! an enabled blue step
•! an enabled red step or
•! one of each
Enabled Enabled
Blue steps Red steps
135
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Execution frontier:
set of all object instances
with any attribute
136
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
•! Red: prescribed
•! Blue: inputs available
Execution Frontier •!
•!
Red&blue: enabled
Yellow: executing
•! Gray: done&dead
Execution frontier:
set of all object instances
with any attribute
But not yet dead/done 137
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
•! We maintain an independent
execution frontier on disk.
On disk
138
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
•! Assume the executing
On disk
139
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Disk-based execution
•! Long-lived but low priority job
•! Just disk part of the execution (no memory-based component)
•! Maintains state
•! When processor is available, speculate that there is time to complete
a step. If not, drop the step.
140
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Convert repetitive similar computation to long-lived job
Example:
•! Daily check of international database for new SARS virus
•! Execute O(O(n2) ) computation on all known strains to produce
possible phylogenetic tree
•! Repeats O((n-1)2) operations that were done the previous day
•! Write a single, O(n2) version that is long-lived and never finishes but
outputs today’s results.
•! Tomorrow it reuses the old results and only computes the pairwise
interactions with the new strain.
141
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
142
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Possible efforts: on the side of CnC: tools
•! CnC debugger
•! CnC performance tuner
•! CnC visualizer
•! CnC diff
143
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
145
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Papers
146
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Sites
•! Intel Windows version:
whatif.intel.com
http://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc
147
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
CnC Workshop
July 23-24
Hudson, MA
Contact: kath.knobe@intel.com
148
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
Tutorial Acknowledgments
•! Zoran Budlimic
•! Aparna Chandramowlishwaran
•! Shin Lee
•! Geoff Lowney
•! David Peixotto
•! Leo Treggiari
•! Rich Vuduc
149
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners
150
*Intel and the Intel logo are registered
Copyright trademarks of Corporation.
© 2006, Intel Intel Corporation. Otherreserved.
All rights brands and names
Prices andare the property
availability of their
subject respective
to change owners
without notice.
*Other brands and names are the property of their respective owners