Composition and other topics
Bryan Ford
baford@schirf.cs.utah.edu
Mon, 05 Dec 94 14:47:05 MST
> I don't think the order of invoking segment keepers is
> ambiguous. ... It makes sense to me that an object should handle
> its own faults; otherwise it's not very object-oriented.
>
>Consider a segment that represents a file. The underlying file system
>is compressed, and the segment manager is leveraging page faults to
>allow it to lazily decompress the file data. So far so good.
>
>Imagine, however, that the client for this segment has decided to
>share it across a network, and is using the page fault logic in order
>to implement a coherency protocol. To do so, it has wrapped the lazy
>segment in a red segment, and is validating and invalidating page keys
>within the child segment.
Actually, like COW, I think this example is more appropriately dealt with
as a "composed memory objects" situation than a "composed mapping" situation.
The coherency manager would be a memory object stacked on top of the
basic file memory object (or compressed-file memory object).
Offhand I can't think of any compelling uses of composed mappings
outside of facilitating memory sharing. I think the memory sharing
argument is compelling enough by itself to warrant support for
composed mappings if implementation complexity is reasonable,
but I'll admit that composed mappings are probably not the ideal way
to implement other things that have to play with the actual data
backed by a mapping.
Bryan