Determinism



next up previous contents index
Next: Communication Up: The Fortran M Previous: The Process Do-Loop

Determinism

   

Process calls in a process block  or process do-loop  can be passed both ports  and ordinary variables as arguments. It is illegal to pass the same port to two or more processes, as this would compromise determinism by allowing multiple processes to send  or receive  on the same channel .

Variables named as process arguments in a process block or do-loop are passed by value: that is, they are copied. In the case of arrays, the number of values copied is determined by the declaration in the called process. Values are also copied back upon termination of the process block or do-loop, in textual order. These copy operations ensure deterministic execution, even when concurrent processes update overlapping sections of arrays. Intent  declarations (described in Section 3.8) can be used to prevent some of these copy operations from occurring.

The MOVEPORT   statement invalidates (i.e., sets to NULL) the FROM= port when copying it to the TO= port. This prevents multiple ports from send or receiving on the same channel, again preserving determinism.

 



Steve Tuecke
Tue Aug 30 12:20:34 CDT 1994