Title: A Causality Interface for Deadlock Analysis in Dataflow
1A Causality Interface for Deadlock Analysis in
Dataflow
- Ye Zhou and Edward A. Lee
- University of California, Berkeley
EMSOFT 2006 Seoul, Korea Oct 22-25, 2006
2Outline
- Introduction
- Causality Interfaces
- Composition of Causality Interfaces
- Discussion
- Conclusion
3Introduction
connector
actor
output port
input port
- Actor receives tokens from input ports and reacts
to these tokens by producing tokens on the output
ports. - What flows in the wires (connectors) are
sequences of tokens.
4Introduction (Contd)
- Any actor network can be treated as a feedback
system. - We assume all actors are (Scott) continuous and
use the least fixed point semantics as the
behavior of a dataflow network. - Question Will the network deadlock?
5Related Work
- Lee, Messerschmitt, 1987 Focuses on Synchronous
Dataflow (SDF) - Buck, 1993 Focuses on Boolean Dataflow
- Wadge, 1981 Cycle Sum Test
- Matthews, 1995 Partial Metrics
- Our approach interfaces
6Causality Interfaces
- A special family of behavioral interfaces.
- Capture the causality properties of an actor,
which reflects the data dependency of an output
port on an input port. - A mathematic structure that helps to determine
whether an actor network is live under certain
model of computation.
7Outline
- Introduction
- Causality Interfaces
- General Definition
- Causality Interfaces for Dataflow
- Composition of Causality Interfaces
- Discussion
- Conclusion
8General Definition
- A causality interface for an actor a with input
ports Pi and output ports Po is a function - where D is a partially ordered set with elements
called dependencies.
9How to compose dependencies?
- Serial connection
- Parallel connection
- We need two operators, one for serial connections
( ), one for parallel connections ( ).
10Dependency Algebra Axioms
- Dependency set D is a partially ordered set with
two binary operators (for parallel) and
(for serial) that satisfy the following axioms - Associativity
- Commutativity and Idempotence (for only)
11Dependency Algebra Axioms (Contd)
12Dependency Algebra Examples
- We have previously given dependency algebras for
the following models of computation. - Discrete-event (DE) models
- Synchronous/Reactive (SR) models
13Causality Interfaces for Dataflow
- The dependency set D for dataflow models is a set
of functions -
-
- computes the greatest lower bound of two
functions is function composition. -
-
14Interpretation
- represents the causal
relationship between the first n tokens at the
input port pi and the first d(n) tokens at the
output port po. - For example, consider an actor with one input
port pi and one output port po. Given n tokens at
pi, there will be d(n) tokens at po. - In general, an actor may have different
interfaces d for each possible input sequence,
but simple actors have just one.
15Outline
- Introduction
- Causality Interfaces
- Composition of Causality Interfaces
- Discussion
- Conclusion
16Feedforward Compositions
- Use for serial compositions and for
parallel compositions. - Example
17Feedback Compositions
- The gain of a cyclic path c (p1, p2, , pn, p1)
is - Productivity order
18Feedback Compositions (Contd)
19Liveness Condition
20Example Adaptive Filtering
21Outline
- Introduction
- Causality Interfaces
- Composition of Causality Interfaces
- Discussion
- Conclusion
22Decidability
- Buck, 1993 Deadlock is generally undecidable
for dataflow models. - Causality interfaces for some dataflow actors
(e.g., boolean select and switch) depend on input
sequences, so is in general
undecidable.
23Causality Interfaces for Synchronous Dataflow
(SDF)
- Causality interfaces for SDF
- where N is the consumption rate, M is the
production rate, and I is the number of initial
tokens at the output. - THEOREM 3 Deadlock is decidable for synchronous
dataflow models with a finite number of actors.
24Complexity of the Analysis
- Question Do we need to check for all
cyclic paths? - (p1, , pn, p1) and (pi, , pn, p1, , pi) are
two different cyclic paths of the same cycle. - A simple cycle is a cycle that does not contain
any other cycles. - Answer it is sufficient to check one cyclic path
of each simple cycle.
25Outline
- Introduction
- Causality Interfaces for Dataflow
- Composition of Causality Interfaces
- Discussion
- Conclusion
26Conclusion
Using the same algebraic structure previously
applied to DE and SR models, we give
- A causality interface theory for dataflow.
- An algebraic procedure to analyze liveness in
dataflow networks. - Liveness is decidable for synchronous dataflow.
- Causality analysis only needs to be performed for
one cyclic path of each simple cycle.
27