Abstracting the Difference between Start Keys and Memory keys

To employ the service provided by a start key, or most kernel objects, one uses the kernel supported call operation. To employ the service provided by a memory key, one places it in an initial slot of a segment node or a domain root. This asymmetry is a bit inconvenient and theoretically awkward. For instance to build the rescindable version of a key requires knowing how it will be used. Other reasons for interceeding in the service provided by a key grow more complex as well. Meter keys are even more alien in this regard.

Memory keys might be viewed as serving by responding to fetch and store operations. It is not hard to invent order codes for memory keys that could be interpreted by the kernel. The Keykos kernel already supports orders on page keys to write.

Allowing gate keys in memory slots would presumably commit the kernel to deliver to the program within the designated domain information about some memory transaction. Some machine architectures make this easy as the hardware reports such information to the kernel upon memory faults. They likewise accept such information upon resumption from a fault. The Motorola 88K is good in this regard. That hardware reports to the interrupt routine the virtual address required and accepts a value used to satisfy the offended load instruction. Most machines, however leave the kernel in the dark, reporting only enough for the kernel to know the offending virtual address and whether write access is necessary to proceed. These machines do not deliver the data that the frustrated store instruction needed to store. The kernel could examine the faulting code and deduce this, but on some machines, such as the 370, this is very tedious. A similar problem is for read faults where the kernel would have to be able to simulate any instruction that fetched data from memory. This would be a considerable amount of hair in the kernel and at best support algorithms that were grossly inefficient.

This is mainly why we didn’t do it; it seemed of only theoretical interest.