On Dec 4, 2003, at 21:41, Jonathan S. Shapiro wrote:
I am looking for a sequence in which A maps to B and B ??? to C and the result would look like:
A -> B A -> C
Is there such an operation?
Also, I forgot to ask: is there some reason why such an operation would be inadvisable?
If you look at the mapping database as a *cache*, then your scenario becomes one which describes the cache behavior, and thus isn't so important in light of the semantics of user-level correctness. In any cache, it is possible for the entries to disappear, and they must be resupplied when needed later. The page fault IPC informs of cache misses in the mapping database. Upon page fault, the mappings must be reconstructed.
The grant operation can be viewed as an operation which removes an entry from the cache. If B accesses the mapping which it just dropped (via granting to C), A will receive a page fault. And at user-level, A should know that it has mapped to B, and thus can decide to resupply the mapping to B.
When you consider the mapping database from the cache perspective, it isn't so upsetting to have an undirected unmap operation. An unmap brutally removes all entries, and thus it becomes necessary to repopulate the cache. And obviously, to repopulate the cache, A must know about its outstanding mappings. And this is where the cache model can break down; how can A know that it should have a mapping to C, after B granted the mapping to C? A user-level protocol must be used to inform A that it has the duty of maintaining mappings to C. But the grant operation probably should be carefully used; more in the case to support transparent interposition, so that A thinks it maps to Y, but really maps to Z due to some indirection. And then Z transparently forwards the mapping to Y via grant(), to construct the original mapping hierarchy intended by A.
-Josh