SUSPEND and RESUME for mobile processes


Allow variables to be passed to a mobile process upon resumption


Matt Pedersen <matt@cs.unlv.edu>






mobiles mobile-processes

Currently, mobile processes are suspended with SUSPEND, and reanimated by invoking the process again with the same parameters as it was originally started. This makes it awkward to pass new parameters to suspended processes when they are resumed; they must be passed by value (or as mobiles) across channels. We would like to be able to give a mobile process references to local variables to work with while it's running in our process.

We could allow the SUSPEND process to take a formal list:

SUSPEND (formals)

and add a new RESUME process which takes a matching set of actuals (with the keyword added to distinguish this from the initial invocation of p):

RESUME p (actuals)

Variables passed in in this way can only be in scope until the next SUSPEND. One option would be to make SUSPEND a block and only scope in the formals within the code in the block:

...  code
SUSPEND (formals)
  ...  code that uses formals
...  code

Matching SUSPEND interfaces to their RESUME calls offers another problem. We should perhaps restrict each mobile process to one SUSPEND interface (so if it has multiple SUSPENDs in it, they must offer the same set of formals).

OEP/159 (last edited 2007-09-27 01:38:34 by ats1)