Simultaneity N

Figure 31 shows the coordination mechanism for the simultaneity, which assigns a resource only if N tasks request it simultaneously. The model has a place Pn with n tokens (in the figure, n=2, as indicated by the two tokens in Pn) that return to this place at the end of the tasks (via release_resource). Place Pn is connected to transition t1 by an arc with weight N. Transition t1 fires only when there are n tokens in Pn (indicating n available instances of the resource) and also n tokens in P1 (indicating that n tasks have already requested the resource). After the firing, t1 sends n tokens to P2, which distributes them among the n assigned_resource places. Places P3 and P4 are used to indicate which tasks have requested the resource and to avoid that the same task requests the resource more than once (i.e., the resource must be assigned to n distinct tasks).

Figure 31: Coordination mechanism for simultaneity 2.

Since resource management dependencies are not binary relations, it is possible that more than two tasks request simultaneity in the use of resources. Figure 32 shows an example of three tasks with interdependency simultaneity 2.


Figure 32: Coordination mechanism for simultaneity 2 with three tasks.

Figure 33 shows the mechanism for simultaneity 2 modeled with high level PN. In the figure, the arcs with expression <x>+<y> ensure that two different tasks (tokens of different colors) which are requesting the resources (tokens r) are going to receive them if they are available in place Pn. Note that this model is simpler than that of Figure 31. Another important aspect, is that the addition of a new task in this model can be done by attaching the new task to places request_resources, assigned_resources and release_resources, in a simpler way than that of Figure 32.


Figure 33: Simultaneity 2 using high level PN.

<< Back