Authors: Eric Jul, Henry Levy, Norman Hutchinson, and Andrew Black
Notes by Alfred Landrum.
"This design places the price of mobility on those who use it."
Overview:
Emerald is a language and system designed for constructing distributed programs. By fine-grained mobility, the authors refer to the fact that small data objects as well as whole process objects can be moved from one node to another. The designers wanted to make performance on par with regular procedure calls in the local case and with RPC in the remote case.
The compiler will generate different implementations of an object, depending on how it analyzes the object. It can use information given by the programmer to decide with implementation to construct.
Object implementation
The compiler implements objects in three ways: global, local, and direct. Direct objects are the simplest; they are the primitives (like integers) and other simple structures. Local objects are contained within another object; they are never referenced by any object except their enclosing object. Global objects can be moved independently and can be referenced globally in the network.
Finding Objects
Each node has a hash table which records entrys for remote objects that have a local reference, and local objects for which a remote reference exists. If an object has moved, its reference will be a forwarding address of the form <timestamp, node>. When an object must be found over the network, the kernel follows the forwarding addresses (updating its local reference at the same time) until the object is found. If its not, then a broadcast protocol is used.
Moving Objects
The kernel handles the activation records for the objects, so that the thread of execution is maintained across the network. It also sends the processor registers; this is complex because the registers used by an object can span the network, so the activation records have special templates for the registers. Also, the kernel translates pointers used by the objects; Emerald uses direct memory addresses to increase performance.
Garbage collection
There are two collectors, a local collector and a distributed collector. The local collector is independent of other nodes, and can be run any time. The distributed collector was implemented such that it could run concurrently with executing processes.
Questions
How good was the decision to let the compiler choose the implementation for an object? Wouldnt a programmer always want to specify how an object should be constructed?