3 ms·
Clock access via a handle has other uses beyond security. For instance, you could use it for deterministic replay of a process. The point being, any abilities
by naasking 9y ago
Clock access via a handle has other uses beyond security. For instance, you could use it for deterministic replay of a process.
The point being, any abilities that aren't reified as explicit handles are ambient in the environment, and so make isolation and virtualization harder. Consider how you would virtualize the clock now that it's part of the process's implicit environment instead of an invocation made via a handle.
- adrianratnapala 9y agoThis is a good point. I've seen in practice systems where in hindsight it would have been nice if we had used some virtual clock rather than the machine clock. An OS could help by making the virtualisable clock the default API. Still there will be applications that want a high-precision or low overhead clock. But those applications should buy into the trade-off explicitly.
- naasking 9y agoAgreed! For instance, a realtime clock like you mention could be reified as a clock factory handle, which you must be explicitly given and must invoke to install the clock at a fixed or configurable address (or something along those lines). This is opt-in, efficient and virtualizable.