Concepts+Techniques+and+Models+of+Computer+Programming_Part27

Concepts Techniques - 738 Distributed Programming R=cfw_New Remote.manager init creates a remote process and a local object R which is the remote

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
738 Distributed Programming R={New Remote.manager init} creates a remote process and a local object R which is the remote process’s “man- ager”. If no arguments are given, then the remote process is created on the same machine as the caller process. With the right arguments it is possible to create processes on other machines. For example, the call: R={New Remote.manager init(host: ´ norge.info.ucl.ac.be ´ )} creates a remote process on the host norge.info.ucl.ac.be . By default, the remote process will be created using rsh (remote shell). In order for this to work, the host must have been set up properly beforehand. The remote process can also be created with ssh (secure shell). For information on this and other aspects of Remote , please see the Mozart documentation [129]. Once a remote process has been created, it can be controlled through the manager object R . This object has an interface that closely resembles that of Module , i.e., it controls the instantiation of functors at the remote process. Call- ing the manager with {R apply(F X)} installs functor F on the remote process and returns the module in X . There is a kind of “master-slave” relationship between the original process and the new process. The original process can observe the new process’s behavior, for example, to keep track of its resource consumption. The original process can change the new process’s process priority, put it to sleep, and even terminate it if necessary. The original process can give the new process limited versions of some critical system modules, so that the new process behaves like a sand box. 11.7 Distribution protocols We now briefly summarize the distribution protocols implemented in Mozart. We first give an overview of all the different protocols for the different language entities. We then focus on two particularly interesting protocols: the mobile state protocol (used for cached cells and objects) and the distributed binding protocol (used for dataflow variables). We end with a quick look at the distributed garbage collector. 11.7.1 Language entities Each language entity is implemented by one or more distributed algorithms. Each algorithm respects the entity’s semantics if distribution is disregarded. The lan- guage entities have the following protocols: Stateful entities are implemented with one of the following three protocols: – Stationary state . All operations always execute on the process where the state resides, called the target process. Remote invocations send messages to this process. Conceptually, it is as if the invoking Copyright c ± 2001-3 by P. Van Roy and S. Haridi. All rights reserved.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
11.7 Distribution protocols 739 thread moves to the target process. When seen in this way, distribut- ed exceptions and reentrant locking work correctly. Operations are synchronous. Asynchronous operations require explicit programming, e.g., by using thread ...
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 08/10/2011.

Page1 / 30

Concepts Techniques - 738 Distributed Programming R=cfw_New Remote.manager init creates a remote process and a local object R which is the remote

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online