Chapter 5: A Localized, Virtual Object Environment
5.3 Providing a Virtual Object Space
th"Ile-of-day stamp on the object, made each time the object is moved, would prevent the object from again being moved until a specific period of time had elapsed. The period of time could be computed based on past behavior or could be a constant. Too rapid movement of objects would consume excessive communication bandwidth and adversely affect the ability of the system to locate specific objects.
Variations in the controlling constants and in the details of the procedure permit it to be adapted to a range of object environments. Before machines of the type described here are built and programmed. it will be very difficult to predict the effectiveness of heuristic methods such as these.
However, it is clear that tl-iis method is one that could dynamically preserve the locality of reference in such a system. Since it makes its decisions on purely local data it will scale well in progressively larger machines.
this additional memory is a mass storage device such as a disk. Virtual memory systems must allocate sufficient swapping space on a disk to store the address spaces of some maximuxn nu..'Tlber of processes. In a virtual object environment, the size of the available mass storage devices will determine the maximum number of objects that can be supported in the system.
To prevent bottlenecks from being formed in the system, it is clear that mass storage devices should be distributed among the processing nodes rather than be concentrated at one location. The disks must be assigned to processing nodes in such a way that all processing nodes can conveniently communicate with the disk closest to them. In the Boolean N-cube this effect can be had by assigning a disk to every processing node with a 0 mod 4 or 0 mod B address. This assignment would place one disk in the system for every 4 or 8 nodes. The ratio can be changed to distribute the desired amount of storage throughout the machine. It is important that the ratio of the number nodes to the number of disks be a power of 2 such that a processing node need only clear the lower n bits of its own address to generate the address of the nearest node with a disk, where
zn
is the ratio.During the execution of program objects, a node will be able to periodically recover memory occupied by garbage but will also be called on to create new objects and accept objects from other nodes. When the node's memory resources become diminished, it will have to select objects to be moved to free up the memory and processing resources they consume. The preceding section showed how objects can be selected to be moved for execution in other nodes with the intention of reducing communication delays and costs. Additionally, objects should be moved to the disk if they
become inactive.
An inactive object is one that either has no messages to process. or one that is waiting for a response from another object. If an object remains in one of the above states for an extended period, it is clearly a good candidate for removal to the disk. This condition is analogous to a page in a virtual memory system that has not been recently referenced and is then swapped out of memory to the disk to make room for another page. An object that has no messages to process may be garbage as well as inactive, if it is garbage it will be eliminated at the end of the) next garbage collection cycle.
An object that is waiting for a response from another object is clearly not garbage but can nevertheless be swapped to disk until the response is available.
Objects can be time stamped when they send or receive messages or engage in other computational activity. When the processor scans its objects for candidates for removal, one criterion will be the length of the interval since each object was last active. Objects can first be moved based on their communication with other objects as suggested in the previous section. If the node must eliminate more objects then it must select those that have been inactive longest and move them to the closest node with a disk The time stamp allows the nodes to implement a least-recently-used algorithm on inactive objects. The transfer of objects in this manner will cause them to be considered to reside in the node with the disk. If messages are received for these objects they will then resume their activity and perhaps be moved to another processing node.
A processing node with a disk can be expected to receive a steady stream of incoming inactive objects. Since all garbage objects will also be
inactive objects, all garbage will eventually be sent to these nodes unless they are collected first. Also, as these nodes receive messages for their objects, there will be a continual stream of re-activated objects mov--ing away from the nodes with disks. The difference in the volume of the two streams will be the garbage objects left in the node and never referenced. The nodes with disks must implement the garbage collection algorithm just as any other node must but they must include all the nodes on their disks in the algorithm.
The special responsibilities of the nodes Vtith disks require additional hardware support. To operate the disk drive a specialized processor can made part of the node communicating with the object memory. The scanning of the disk in performance of the garbage collection algorithm can be delegated partly to this processor. To maintain a level of performance consistent with the other nodes in the system, the nodes with disks will require space for a larger table of objects to accommodate those objects on the disk. The object tables that must exist in each node are further discussed in the next section. To provide space for the table additional memory must be available to nodes with disks. If the technology permits, an additional level in the storage hierarchy could be added to these nodes in the form of magnetic bubbles or CCDs. The decreased access time of these devices would improve the response time of these nodes.
To some extent, the addition of disks and their accouterments to the system will destroy some of the homogeneity of the machine. However, mass storage devices of some kind are a necessary ingredient to any real system and must be included. Homogeneity is preserved if one considers that its granularity has been increased so that the basic unit of replication in the
system is a set of 4 or 8 processing nodes, one of which includes a disk drive.