HELP! * BLUE=global GREY=local Global HTML version of Foils prepared July 6,1995

Foil 60 MOVIE -- 2: MOVIE Threads

From Threads with TCE in detail CPS600 Spring Semester95 -- April 1995. by Janusz Niemiec and Geoffrey Fox * See also color IMAGE

A MOVIE thread is an active entity, which code is being interpreted by the MovieScript interpreter.
Each thread contains its descriptor, and three stacks:
  • Operand Stack -- used to store operands in the postfix notation
  • Execution Stack -- utilized internally by the interpreter
  • Dictionary Stack -- containing dictionaries which hold {name,object} pairs.
During a context switch, instead of swapping contents of registers, the pointers to those three stacks are being swapped. After that, the interpreter starts interpreting the new thread.
When a new task is being started, there is automatically created a thread within it. All other threads have to be explicitly created by the fork operator. That operator copies the content of its stacks onto the new thread's stacks. This allows new threads to inherit parent`s context (alike global variables in TCE). All subsequent operations on stacks are not visible to both the parent and the child (likewise local variables in TCE).


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Feb 18 1997