• No se han encontrado resultados

Comportamiento de secuencias óptimas de problemas con esperas limitadas en un PFSP

”For a partition of actors; if it can be split in to two groups of actors such that the first group has a mode where it can fire an infinite number of actions while the second group fires an arbitrary number of actions, then the first group cannot be scheduled based on the second group”

One more property which is important for keeping the dataflow program consistent regarding token rates is that a jointly scheduled partition should internally have dependent token rates. What this means is that a partition that is to be composed, should not have two sub-partitions which need independent scheduling, or, so to say, have independent data paths. In practice this means that the inputs to the partition must be synchronized by having a token rate dependency. This problem typically appears when separate data streams pass through a partition and the streams are not related to each other.

actor1 IN OUT actor2 IN OUT actor3 IN OUT actor4 IN OUT actor5 IN1 IN2 OUT IN OUT IN

Figure 3.9: Partition with two independent data paths, if actor5 does not specify a specific rate between its inputs but rather resends whatever is available on either input, this partition is not valid because the input rates cannot be derived from within the partition. If the input rates of a partition are not known it is possible that one of the input buffers would start to grow.

Figure 3.10: Each scenario corresponds to an FSM where each transition has a port access pattern.

The partition in Figure 3.9 shows an example of an actor (actor5 ) that simply resends any input on its output queue; if one input queue is empty it will simply switch to the other one. The two data paths in this example are clearly independent as the data rate on one path is not dependent on the other, i.e. there is no synchronization between the input streams. We can find several static schedules that seem correct for this partition but which may result in deadlock because of either a full or empty input queue.

To find if the data paths are dependent we can again view the partition as a graph where actors and partition input ports are vertices and FIFOs are edges, if an edge is not synchronizing it is removed from the graph so that the resulting graph represents the data path dependency. The final test to determine whether the data paths in the partition are dependent is to check that the graph connects the input ports of the partition. As an example, in the graph in Figure 3.9, the edges entering actor5 would be removed resulting in a graph where the two inputs are not connected. For this to be useful we need to carefully specify which edges are to be removed. Definition 3.5. Synchronizing Queue. A queue is synchronizing if it ties the behavior of two actors such that there are only finite firing sequences where the actors are independent.

Definition 3.6. Synchronizing Port. A set of ports of an actor are syn- chronizing if the token rates of these are tied to each other such that, in the long run, the rates are proportional. An actor can have several distinct sets of ports which are synchronized.

For a FIFO to be synchronizing, it must be possible to derive the token rates of the ports connected to it from the firing rules of the partition. The graph in Figure 3.10 describes an actor as an FSM which has two alternative paths and one state with a self loop. The transitions in the figure are

decorated with identifiers describing the set of ports which are accessed by the action represented by the transition. In this example, the FSM has two states with more than one outgoing transitions. The choice between transitions in these cases can be one of the three following alternatives, 1) depending on input, 2) depending on the internal state of the actor, and 3) a nondeterministic or time-dependent choice. The two first cases are actually identical, as control tokens are required to be described by the firing rules of the partition, and each port of an actor with only such behavior is considered synchronizing; with the assumption that each port of the actor is used is some action that eventually will fire.

The ports that are synchronized by the example actor in Figure 3.10 can then be described as the all the ports of the FSM.

Qa= (Qt1∪ Qt2∪ Qt4∪ Qt6)∪ (Qt1∪ Qt3∪ Qt5)

When the choices between the alternative paths are nondeterministic or time-dependent, the situation is more complicated. The simple solution is to consider the ports accessed by such an actor to not be synchronizing as the token rate may be arbitrary; each of the FIFOs connected to such an

actor are added to a set Qnondet which are always considered to be non-

synchronizing. A special case is, if an actor with an FSM has actions which are outside the FSM, if the actions in the FSM are deterministic then only

the ports used by the actions outside the FSM are added to Qnondet. The

set of queues that are two way synchronizing between actor a and b can then be described as:

Qz = (Qa∩ Qb)\ Qnondet

This is a more conservative approach than what is allowed by Defini- tion 3.6 and in many cases it is possible to find one or more subsets of the ports of an actor that are synchronizing. An example of this is two ports that are accessed by the exact same set of actions where for each action have identical token rates on these ports, and therefore, obviously have related token rates.

What is described by Definition 3.6 is actually that the internals of the actors can be represented as a a graph, where a time-dependent actor may produce a disconnected graph. The graph is constructed by connecting ports which has proportional token rates:

Qf ulla ={(p1, p2)∈ Pa× Pa|np1 ∝ np2}

where

ni = number of tokens on port i

Figure 3.11: Graph showing the motion compensation network of an MPEG- 4 decoder after non-synchronizing edges have been removed and are shown as dotted arrows.

For an actor a, the set of synchronizing ports Qaare described by one of the connected subgraph of Qf ulla . This property is rather generic and can be proved in the general case for the actors which are time-independent, how- ever, for actors with time-dependent behavior, the property can be proved for certain cases. For this reason it is not further explored in this thesis, instead the rest of this thesis assumes that time-dependent actors are iden- tified, with methods such as [124], and the queues associated with these actors are considered to be non-synchronizing.

Figure 3.11 shows a graph representing the data paths of a sub-network. The edges that have been identified to be non-synchronizing are represented as dotted arrows. The direction of the arrows is of no importance and simply show the direction of the dataflow. As can be seen, there is a path from each input port to the other input ports, which means that the inputs are related to each other and the token rates are synchronized. This means that the partition does not have independent data paths, and can be scheduled as one unit.

Documento similar