Check out the new USENIX Web site. next up previous
Next: System Design Up: The MultiView Technique Previous: The Privileged View

Implementation Issues

We have implemented MULTIVIEW in Windows-NT in a DSM system called MILLIPAGE. Mapping several views of virtual addresses to a shared memory region was accomplished using the file mapping API, as follows. First, a memory object2 is created by calling the CreateFileMapping API. A memory object is simply a virtual memory region, allocated in the kernel address space of a process, and backed-up by the paging file. This memory object is the shared region on which minipages will be allocated.

Suppose the maximal number of minipages that reside on the same page of the memory object is n. We thus need n+1 different views of the memory object: n application views for use by the application threads and one for the privileged view. The views are created using the MapViewOfFile API, which is called once for each established view.

For each application, MILLIPAGE keeps a single process on each of the hosts. By carefully configuring the DSM addresses, the views are guaranteed to map to the same addresses in all processes, so there is no need for address translations between the hosts. Once mapped, the protection of vpages (recall that vpages are the virtual pages composing a view) can be manipulated independent of the protection of other vpages that are mapped to the same memory object page. One of the views is made privileged with the protection of all its vpages set to ReadWrite. This view is used by the DSM server threads to read and update the memory object.

The construction of the views is performed during system initialization. When the application issues an allocation request, the DSM searches for a suitable region in the memory object, and defines it as a minipage (or a set of consecutive minipages). The DSM associates the newly defined minipage with one of the application views. More precisely, suppose an allocation procedure defines a new minipage ${\cal M}$. ${\cal M}$ is associated with a certain vpage in one of the views, and an address p in this vpage is returned. During allocation, a new entry is formed in the minipage-table MPT, containing both the offset of p in the vpage and the size of ${\cal M}$.

If mapping to ${\cal M}$ spans several vpages in the associated view, the above is generalized in a straightforward way.

Figure 2 describes the views configuration and the dynamic allocation of minipages to variables during malloc calls.


  
Figure 2: Views configuration and dynamic minipage allocation for independent variables. DSM service and control threads use the privileged view. In general, a memory object may be larger than a page and there may be ``gaps'' between the views.
\begin{figure}
\centering
\fbox{\epsfxsize=.8\textwidth \epsfbox{use_views1.eps}}\end{figure}


next up previous
Next: System Design Up: The MultiView Technique Previous: The Privileged View
Ayal Itzkovitz and Assaf Schuster, The Technion