Requirements on the Execution of Kahn Process Networks - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Requirements on the Execution of Kahn Process Networks

Description:

Title: Presentatie ESOP 2003 Author: Marc Geilen Last modified by: Marc Geilen Created Date: 12/21/2000 12:29:05 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 28
Provided by: MarcG64
Category:

less

Transcript and Presenter's Notes

Title: Requirements on the Execution of Kahn Process Networks


1
  • Requirements on the Execution of Kahn Process
    Networks

Marc Geilen and Twan Basten
11 April 2003
/e
2
Overview
  1. Introduction Kahn Process Networks
  2. Implementing KPNs
  3. Execution of KPNs
  4. An Improved Scheduling Algorithm
  5. Conclusions

3
1. Introduction Kahn Process Networks
4
Kahn Process Networks
  • Arcs carry (possibly infinite) streams of tokens
    (audio samples, video frames, etc.)
  • Nodes compute (continuous) functions on streams

5
Kahn Process Networks
  • Good for multimedia and signal processing
    applicationsE.g., JPEG/MPEG decoding,
    image/video processing
  • Explicit parallelism and communication
  • No synchronization between processes required
  • Programming paradigm for modern multi-processor
    architecturesMITs RAW, Philips SpaceCake

6
KPN Semantics
  • Arcs connecting functions
  • Set of equations
  • Continuous functionsunique least solution
  • Semantics of KPN least fixed-point
  • Yields new continuous functionCompositionality

7
2. Implementing KPNs
8
Realizations of KPNs
  • Functions sequential (determinate) programs,
    e.g. C or Java
  • Blocking read operations

9
Realizations of KPNs
  • Functions sequential (determinate) programs,
    e.g. C or Java
  • Blocking read operations
  • Arcs FIFO queuesStore tokens that are written
    but not yet read

10
Realizations of KPNs
  • DeterminacyOutput is independent of scheduling
    order
  • CompositionalityHierarchically, recursively,
  • The Kahn Principle Operational model with fair
    execution and unbounded channels realizes the
    formal semantics

11
Implementation Requirements
  • When is an implementation of a KPN good?

12
Implementation Requirements
  • Boundedness

13
Implementation Requirements
  • Completeness infinite execution vs. chain of
    strings

14
3. Execution of KPNs
15
Implementations of KPNs
  • Often follow Thomas Parks 95 scheduling
    approachYAPI, Jade/Pagis, Ptolemy II among
    others
  • Bounded FIFOs combine aspects of data- and demand
    driven execution
  • FIFO bounds balance memory usage and context
    switching
  • (Minimal) FIFO bounds are undecidableRun-time
    management

16
Implementations of KPNs
  • Blocking on full FIFO artificial deadlocks
  • Causal chains

17
Implementations of KPNs
  • Execution thread per processPOSIX threads, Java
    threads,
  • Artificial deadlock detection and resolution
    strategies
  • Often global deadlock detectionLow priority
    thread

18
Implementations of KPNs
  • Parks algorithm yields infinite computation, but
    possibly not complete
  • Local deadlocks may remain undetected(fairness
    is violated)
  • Deadlocks are cyclic causal chains

19
4. An Improved Scheduling Algorithm
20
Improved Scheduling Algorithm
  • Deadlocks cannot be avoided by scheduling
  • Artificial deadlock occurs (only) if FIFO bounds
    are too small
  • (At least) one of the full FIFOs on a deadlock
    cycle must be too small
  • Increase size of the smallest full FIFO

21
Improved Scheduling Algorithm
  1. Schedule enabled processes (in a fair way)
  2. Until deadlock occurs (cyclic causal chain)
  3. Resolve deadlock by increasing the smallest full
    FIFO

22
Correctness
  • Operational (LTS) semantics of KPNs (see
    paper)Equivalent to KPN semantics by the Kahn
    Principle
  • Operational semantics of realizations of
    KPNsbounded channels
  • Show that both implement the same function

23
Correctness
  • The new scheduling algorithm realizes the the
    formal semantics of Kahn Process Networks
  • Every bounded and effective KPN is executed in
    bounded memory by our scheduler and produces the
    complete output.

24
Correctness
  • PrerequisitesBoundedness there exists a fair
    execution with finite FIFO bounds
  • Effectiveness every token that is produced on
    some channels is eventually also consumed
  • Both prerequisites are necessary

25
Local deadlock detection
  • Deadlock detection becomes more involved
  • Need not be done at every step of the execution
  • May be possible to do this concurrently

26
Conclusions
  • Studied implementation requirements for KPNs
    boundedness and completeness
  • Widely used implementation of KPNs does not
    schedule all KPNs correctly
  • We have presented an improved scheduling
    algorithm that resolves the problem for a large
    class of KPNs
  • And proved its correctness (in the paper)

27
Future Work
  • An implementation of the improved scheduling
    algorithm is being made for YAPI
  • Efficiency of scheduling. Optimal bounds,
    efficient deadlock detection
  • Hierarchical or distributed implementationsDistri
    buted deadlock detection
Write a Comment
User Comments (0)
About PowerShow.com