03.08.2013 Views

Dynamic Dataflow Modeling in Ptolemy II - Ptolemy Project ...

Dynamic Dataflow Modeling in Ptolemy II - Ptolemy Project ...

Dynamic Dataflow Modeling in Ptolemy II - Ptolemy Project ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

have a rigorous proof yet that the algorithm satisfies criterion 3. It rema<strong>in</strong>s further work.<br />

However, our experience po<strong>in</strong>ts to that direction and <strong>in</strong>deed it is a challenge to come up<br />

with a model that can be executed <strong>in</strong> bounded memory but fails to do so with our<br />

algorithm.<br />

With the way the algorithm is designed, the set of actors that are executed <strong>in</strong> each basic<br />

iteration is determ<strong>in</strong>ate. The reason is that only at the start of each basic iteration are all<br />

actors classified <strong>in</strong>to sets E, D, m<strong>in</strong>imax(D). These sets are not updated <strong>in</strong> the middle of<br />

one basic iteration. Each set is a function of a model’s state represented by tokens (their<br />

number and values) queued on each channel. By “function” we mean the contents of each<br />

set do not depend on the order <strong>in</strong> which we exam<strong>in</strong>e the status of each actor. The<br />

result<strong>in</strong>g state after fir<strong>in</strong>g a set of actors does not depend on the order <strong>in</strong> which we fire<br />

each actor <strong>in</strong> the set. Therefore we can conclude that each basic iteration is well-def<strong>in</strong>ed<br />

and determ<strong>in</strong>ate. Later on we will show the mechanism to group several basic iterations<br />

<strong>in</strong>to one iteration that is more mean<strong>in</strong>gful.<br />

3.2 Implementation of DDF Doma<strong>in</strong> <strong>in</strong> <strong>Ptolemy</strong> <strong>II</strong><br />

This section cont<strong>in</strong>ues with the implementation of a scheduler under the <strong>Ptolemy</strong> <strong>II</strong><br />

framework. In <strong>Ptolemy</strong> <strong>II</strong>, each doma<strong>in</strong> has a director which is responsible for controll<strong>in</strong>g<br />

the execution of actors <strong>in</strong> that doma<strong>in</strong>. In some doma<strong>in</strong>s, such as CT, SDF and SR, the<br />

model can be statically analyzed (called compil<strong>in</strong>g a model) to come up with a schedule<br />

before execution starts. That is the job of a scheduler. In other doma<strong>in</strong>s such as DE,<br />

fir<strong>in</strong>gs of actors can only be dynamically scheduled dur<strong>in</strong>g the execution. For these<br />

doma<strong>in</strong>s, there is no (static) scheduler per se and all functionality (<strong>in</strong>clud<strong>in</strong>g dynamic<br />

30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!