dataflow model of parallelism - uo computer and ...€¦ · dataflow models dataflow models say...
TRANSCRIPT
![Page 1: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/1.jpg)
Lecture 1
Dataflow Model of Parallelism ArvindComputer Science and Artificial Intelligence LaboratoryM.I.T.
Oregon Programming Language Summer School (OPLSS) Eugene, OR July 14, 2018
1
![Page 2: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/2.jpg)
DataflowJack Dennis 1969-1973
General purpose parallel machines based on a dataflow graph model of computation
Inspired all the major players in dataflow during seventies and eighties, including Kim Gostelow and me @ UC Irvine
2
![Page 3: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/3.jpg)
Dataflow Operators
A small set of dataflow operators can be used to define a general programming language
Fork Primitive Ops
+
Switch Merge
T FT F
T T
+ T FT F
3
![Page 4: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/4.jpg)
Constructing Dataflow Graphs
G1
. . .
. . .G2
. . .
. . .G1
. . .
. . .G2
. . .
. . . G
Juxtaposition
G1
. . .
. . .
IterationG1
. . .
. . . G
Exercise: Construct a graph for f(g(x)) using juxtaposition and iteration
4
![Page 5: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/5.jpg)
Example:
The Stream Duplicator
T F NOTT
1-to-2SD SD C
XGate: Lets X pass through only after C arrives
What happens if we don't use the gate?
5
![Page 6: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/6.jpg)
The Stream Halver
Draw a graph that throws away every other token
SH SH2-to-1
6
![Page 7: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/7.jpg)
Determinacy PropertyThe values of output tokens are uniquely determined by the values of input tokens, i.e., the behavior is time independent
Theorem: A dataflow graph formed by repeated juxtaposition and iteration of deterministic dataflow operators is deterministic
Proof?
7
![Page 8: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/8.jpg)
Kahn Process NetworksGilles Kahn 1973
Computing stations connected by unbounded, FIFO channelsEach station executes a sequential program
wait(ch): blocking read from a channelsend(x,ch): non blocking
a station either blocks for an input on a specific channel or computes (no test for emptyness)
P Q
8
![Page 9: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/9.jpg)
An Example
X
Y Z
T0 T1
f
g
h1h0
Process f(U,V; W){b= true;While true do{i := if b then wait(U)
else wait(V);print(i);send(i,W);b := not b}}
Process g(U ; V,W){b= true;While true do{i := wait(U);if b then send(i,V)else send(i,W);b := not b }}
Process hC (U ; V){send(c,V);While true do{i := wait(U);send(i,V) }}
X = f(Y,Z) || T0 , T1 = g(X) || Y = h0(T0) || Z = h1(T1)
Functionality?9
![Page 10: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/10.jpg)
Kahnian Networks & Dataflow
Dataflow Graphs can Express any Kahnian Network and vice versa
X
Y Z
T0 T1
f
gh1h0
T F not
T F not
T
T
10
![Page 11: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/11.jpg)
DeterminacyA computing station in Kahnian network can be viewed as a function from sequences to sequencesA Kahnian network can be viewed a systems of recursive equations, whose solutions characterize the I/O behavior of the networkKleene’s Fixed Point Theorem: If each function in the network is monotonic and continuous then the set of recursive equations has a unique least fixed-point solution
11
![Page 12: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/12.jpg)
Dataflow Operators asStreams Functions
add(x:xs, y:ys) = +(x,y) : add(xs,ys)
T-gate (T:bs, x:xs) = x: T-gate(bs,xs)T-gate (F:bs, x:xs) = T-gate(bs,xs)
merge(T:bs, x:xs, ys) = x: merge(bs,xs,ys)merge(F:bs, xs, y:ys) = y: merge(bs,xs,ys)
12
![Page 13: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/13.jpg)
Dataflow Graphs:A Set of Recursive Equations
NOT
I
O
T
A
B
O = T-gate (A,I);A = gate (I,B); B = T : Not (A) ;
T
G.Kahn: Monotonicity and Continuity of operators guarantee a unique solution, aka determinacy
Kahn Networks = Dennis networks13
![Page 14: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/14.jpg)
Domain of SequencesSequence: [x1, ... , xn]The least element: [ ] (aka )The partial order (): prefix order on sequences [ ] [x1] [x1,x2] ... [x1, x2, x3 ... xn]
Monotonicity: x y f(x) f(y) a monotonic operator on sequences can never retract a
value that has been produced.Continuity: f (Ui Xi) = Ui f (Xi) A continuous operator on sequences does not suddenly
produce an output after consuming an infinite amount of input
Least fixed-point solution: f(f(...(f())...)
14
![Page 15: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/15.jpg)
Computing the solutionan example
I [i1, i2, i3]
A [ ]
B [ T ]
O [ ]
O = T-gate (A,I) ; A = gate (I,B) ; B = T:Not (A) ;
Assume edges without initial tokens are empty (). The least fixed point solution can be computed iteratively, by evaluating one operator at a time
[i1, i2, i3]
[ T ]
[ T ]
[ ]
[i1, i2, i3]
[ T ]
[ T, F ]
[ i1 ]
15
![Page 16: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/16.jpg)
Well Behaved Schemasone-in-one-out & self initializing
Before After
• • •
P
• • •
• • •
P
• • •
T F
f g
T F
Conditional
f
p
T F
T F F
Loop
16
![Page 17: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/17.jpg)
Well Behaved Schemasone-in-one-out & self initializing
Before After
• • •
P
• • •
• • •
P
• • •
T F
f g
T F
Conditional
f
p
T F
T F F
LoopBounded Loop
Needed for resource
management17
![Page 18: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/18.jpg)
Another Conditional Schema
If p then f(a,b) else g(a,b)
Why is this schema not well
behaved?f g
T Fp
a b
18
![Page 19: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/19.jpg)
Yet another conditional schema
Suppose g(X2)computes much
faster than f(X1).
Tokens will come out in the wrong order without the merge operator
T F T F
T F
f g f g
X2X1
F T F T
X
X2X1
19
![Page 20: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/20.jpg)
Tagged-Token Dataflow
Increasing the concurrency
20
![Page 21: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/21.jpg)
Missing Tokens and blocking behavior
T F T F
F T T
x
x
x cannot be moved to the output because the token corresponding to T is missing.
How to model stream with “holes” ?
21
![Page 22: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/22.jpg)
Another Interpretation of DFGs: Streams with “holes”
Streams with missing tokens
{v1, v2, v4, , v6, ....}
can be modeled by a set of tokens where tokens carry a tag designating their position in the stream
{ <1, v1>, <2, v2>, <4, v4>, <6, v6> }
22
![Page 23: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/23.jpg)
Tagged Semantics of Operatorsadd(xs,ys) = {<i,x+y> <i,x> xs, <i,y> ys}
T-gatebs,xs) =
mergebs,xs,ys) =
Da(xs) =
needed wherever we place an initial token
{<k,x> | <i,T> bs, <i,x> xs, j i . <j,bj> bs , k = T-Count(bs,i)}
{<i,x> | <i,T> bs, <k,x> xs, j i . <j,bj> bs, k = T-Count(bs,i)}
{<i,y> | <i,F> bs, <k,y> ys, j i . <j,bj> bs, k = F-Count(bs,i)}
{<i+1,x> | <i,x> xs} {<1,a>}
23
![Page 24: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/24.jpg)
Ordering on Streams with HolesStream with holes: { <i, vi>, <j, vj>, <k, vk> }
The least element: { } (aka )
The partial order (): subset order
It is easy to show that all the operators under the tagged semantics are monotonic and continuous
tagged semantics are also deterministic
24
![Page 25: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/25.jpg)
Tagged versus FIFO InterpretationTheorem: Suppose the least fixed point of a dataflow program under the FIFO interpretation is X and under the tagged interpretation is Y then X Y .
Proof: Based on structural induction on the graph structure (juxtaposition and iteration)
Tagged interpretation has more parallelismArvind & Gostelow 1977
25
![Page 26: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/26.jpg)
Well Behaved Graphs under tagging
• • •
• • • • • •
• • •c • s1 c • sn
c • t1 c • tm
1. One-in-one-out property
2. Self Cleaning: Initially the graph contains no tokens; when all the output tokens havebeen produced no tokens remain in the graph
26
![Page 27: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/27.jpg)
Consequences of TaggingNo need of merge in well behaved dataflow graphs
Even if f(x1) completes after g(x2) the output tokens will carry the "correct" tag
X
F T
x2x1
T F
f g
Tagging simplifies well-behaved schemas, increases parallelism at the cost of increased complexity in implementation
27
![Page 28: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/28.jpg)
Data Structures
28
![Page 29: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/29.jpg)
Data StructuresSuppose we want to add two arrays, element by element Option 1: the whole array is carried by a token (not
practical in general) Option 2: Array is represented as a stream of tokens Option 3: Array is divided into several chunks and
each chunk is fed to a different copy of the operator Option 4: Some combination of options 2 and 3
Such a choices of representation has to be made by the user or the compiler
These options are not suitable for handling complex or sparse data structures
29
![Page 30: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/30.jpg)
A Parallel Multithreaded Language Model
Tree ofActivationFrames
h:g:
f:
loop
threads
asynchronous and parallel at all levels
Pure dataflow systems cannot express such a language model
Global Heap ofShared Objects
30
![Page 31: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/31.jpg)
Dynamic Dataflow Architectures and Languages (MIT 1979-94)
Extensions to the tagged dataflow model to support procedure calls and dynamically allocated heap objects
31
![Page 32: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/32.jpg)
Data Structures in Dataflow
. . . . PP
MemoryData structures reside in memory and tokens carry pointersI-structures Write-once, Read multiple times allocate write read* deallocate
I-structures are like variables in logic languages (Pingali ...) See I-vars, and M-vars in Haskell
At the hardware level, I-fetch and I-store instructions
No problem if a reader arrives before the writer at the memory location
I-fetch
a
I-store
a v
32
![Page 33: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/33.jpg)
I-Structure Storage: Split-phase operations & Presence bits
I-fetch
t
<s, fp, a >s
1
2
3
4aaaa
v2fp.ip
I-structureMemory
Need to deal with multiple deferred reads; Additional operations: take/put, clear
v1
address to be read
t
I-fetch<a, Read, (t,fp)>
s
split phase
forwarding address
33
![Page 34: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/34.jpg)
Dataflow Graphs + I-Structures + . . .
Monsoon Dataflow Machine
Language and Architecture to exploit implicit parallelism
Id (Functional language)
34
![Page 35: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/35.jpg)
The Monsoon ProjectMotorola Cambridge Research Center + MIT (1988-91)
Two 16-node systems - MIT, LANL
Sixteen 2-node systems - Motorola, Colorado, USC,
Oregon, McGill, ...
Id World Software
Displayed at Super Computing 1991
35
![Page 36: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/36.jpg)
The Monsoon ProjectMotorola Cambridge Research Center + MIT (1988-91)
Two 16-node systems - MIT, LANL
Sixteen 2-node systems - Motorola, Colorado, USC,
Oregon, McGill, ...
Id World Software
Displayed at Super Computing 1991
Tony Dahbura 36
![Page 37: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/37.jpg)
Dataflow people @ MITRishiyur Nikhil, Keshav Pingali, Vinod Kathail, David CullerGreg PapadopolousAndy BoughtonChris JeorgeKen TraubSteve Heller, Richard Soley,Dinart Mores Jamey Hicks, Alex Caro, Andy Shaw, Boon AngShail AndityaR Paul JohnsonJacj CostenzaPaul BarthJan MaessenChristine FloodJonathan YoungDerek ChiouArun IyangarZena AriolaMike Bekerle
K. Eknadham (IBM)Wim Bohm (Colorado)Joe Stoy (Oxford)...
Steve HellerKen Traub
R.S. Nikhil Keshav Pingali David Culler
Derek ChiouJamey Hicks
Greg Papadopoulos
37
![Page 38: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/38.jpg)
Dataflow: An assessmentDataflow ideas are used extensively in modern microprocessors, but the Instructure Set Architecture (ISA) remains totally sequential Processors use speculation to expose parallelism
Compilers extract parallelism from sequential codes with varying degree of successParallel programming remains difficult – mostusers have little interest in rewriting their programs to exploit parallelism Ethos: It is someone else’s program
Yet, most microprocessors are multicores and most systems have many concurrent processes
Move towards domain specific solutions38
![Page 39: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/39.jpg)
Fine-grain vs Coarse-grain Dataflow Models
Dataflow models say nothing about the size of tokens or the complexity of computing nodesIn practice, the cost of implementing fine-grain asynchronous parallelism is high, so many systems use dataflow ideas at the macro-level and exploit fine-grain synchronous parallelism within the nodes
39
![Page 40: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/40.jpg)
ApplicationsDataflow models are used extensively in many domains, especially for hardware accelerators: Video and Audio codecs (e.g., H.264) Network applications (e.g., packet filtering) Wireless baseband processing (e.g., OFDM based
protocols) Deep Neural Networks (e.g., DNNs, RNNs) Map-Reduce applications ...
40
![Page 41: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/41.jpg)
H.264 Video DecoderChun-Chieh Lin, K Elliott Fleming [MEMOCODE 2008]
May be implemented in hardware or software depending upon ...
NALunwrap
Parse+
CAVLC
Inverse Quant
Transformation
DeblockFilter
IntraPrediction
InterPrediction
RefFrames
Com
pres
sed
Bits
Fram
es
Different requirements for different environments- QVGA 320x240p (30 fps)- DVD 720x480p- HD DVD 1280x720p (60-75 fps) 41
![Page 42: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/42.jpg)
Wireless Baseband processingOFDM TX/RX Blocks, Man cheuk Ng et al [2007]
MAC
MAC
standard specific
potential reuse
Scrambler FECEncoder Interleaver Mapper
Pilot &Guard
InsertionIFFT CP
Insertion
De-Scrambler
FECDecoder
De-Interleaver
De-Mapper
ChannelEstimater FFT Synchronizer
TXController
RXController S/P
D/A
A/D
42
![Page 43: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/43.jpg)
Wireless Baseband processingOFDM TX/RX Blocks, Man cheuk Ng et al [2007]
MAC
MAC
standard specific
potential reuse
Scrambler FECEncoder Interleaver Mapper
Pilot &Guard
InsertionIFFT CP
Insertion
De-Scrambler
FECDecoder
De-Interleaver
De-Mapper
ChannelEstimater FFT Synchronizer
TXController
RXController S/P
D/A
A/D
Different algorithms - No Reuse
Convolutional
Reed-Solomon
Turbo
43
![Page 44: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/44.jpg)
Wireless Baseband processingOFDM TX/RX Blocks, Man cheuk Ng et al [2007]
MAC
MAC
standard specific
potential reuse
Scrambler FECEncoder Interleaver Mapper
Pilot &Guard
InsertionIFFT CP
Insertion
De-Scrambler
FECDecoder
De-Interleaver
De-Mapper
ChannelEstimater FFT Synchronizer
TXController
RXController S/P
D/A
A/D
Different algorithms - No Reuse Reusable algorithm with different
parameter settings
WiFi:x7+x4+1
WiMAX:x15+x14+1
WUSB:x15+x14+1
44
![Page 45: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/45.jpg)
Wireless Baseband processingOFDM TX/RX Blocks, Man cheuk Ng et al [2007]
MAC
MACScrambler FEC
Encoder Interleaver MapperPilot &Guard
InsertionIFFT CP
Insertion
De-Scrambler
FECDecoder
De-Interleaver
De-Mapper
ChannelEstimater FFT Synchronizer
TXController
RXController S/P
D/A
Different algorithms - No Reuse
Different throughput requirements
WiFi: 64pt @ 0.25MHz
WiMAX: 256pt @ 0.03MHz
Reusable algorithm with different parameter settings
WUSB: 128pt 8MHz
We want the same source description but different hardware!45
![Page 46: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/46.jpg)
There is a need to beyond dataflow models
Dataflow models, like functional languages, obscure resource management issues which must be handled efficiently in any practical systemLack of shared state between nodes makes certain computations, e.g., graph algorithms, difficult to expressDeterminacy, though highly desirable in many situations, is ultimately quite limiting in specifying distributed software and hardware
46
![Page 47: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/47.jpg)
AlternativeSerializable atomic actions A general model of concurrency for both software
and hardware Can express most other models of concurrency A specific model – guarded atomic actions – is also
amenable to efficient hardware implementation
stay tuned ...
47
![Page 48: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/48.jpg)
Extras
48
![Page 49: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/49.jpg)
Firing Rules: T-Gate
T T
T T
x
x
x
T
F
49
![Page 50: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/50.jpg)
The Switch Operator
T F
X
T T FX
T F
T F
50
![Page 51: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/51.jpg)
Firing Rules: Merge
T F
x y
TT F
y
x
T F
x
TT F
x
51
![Page 52: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/52.jpg)
Firing Rules: Merge cont
T F
y
Tnot ready
to fire
52
![Page 53: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/53.jpg)
Some Conventions
X1 X2
T FB
T F
X1 X2
T F T FB
53
![Page 54: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/54.jpg)
Some Conventions Cont.
X1 X2
T F T FB
X1 X2
X1 X2
T FB
T F
X1 X2
54
![Page 55: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/55.jpg)
Unbounded Cyclic Graphs
Unbounded number of tokens on an arc can only arise due
to cycles.
<n
+1
FT F
f
+
0 1F
T FT F
T F
55
![Page 56: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/56.jpg)
Bounded Cyclic Graphs
<n
+1
FT F
f
+
0 1F
T FT F
T F
synck-bound
56
![Page 57: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/57.jpg)
Bounded Cyclic Graphs
+ 1
T F
T F
FT F
T F
f
+
0 1
Sync
k-bound
< n
F
57
![Page 58: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/58.jpg)
Well Behaved Schemas
f
p
T F
T F F
LoopBounded Loop
Needed for resource
management58
![Page 59: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/59.jpg)
New Definition of Well Behavedness
1. One token on each input arc produces exactly one token on each output arc.
2. The initial distribution of tokens on the arcs is restored.
3. No arc can have an unbounded buildup of tokens.
Before After
• • •
P
• • •
• • •
P
• • •
59
![Page 60: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/60.jpg)
Bounded Cyclic Graphsare Well Behaved
Initial number of tokens at the gate input determines the maximum number of tokens on any arc.
However, loop bounding can alter the "meaning" of a graph, i.e., can cause deadlock.
In general, restricting the number of tokens on an arc causes deadlock.
60
![Page 61: Dataflow Model of Parallelism - UO Computer and ...€¦ · Dataflow Models Dataflow models say nothing about the size of tokens or the complexity of computing nodes In practice,](https://reader035.vdocuments.us/reader035/viewer/2022062317/5f0a66c87e708231d42b749f/html5/thumbnails/61.jpg)
Can this program deadlock if the number of tokens per arc is restricted?
+1
T F
T F
FT F
T F
+10
0F
<4
61