Re:Writing an OS in Rust: Handling Exceptions
by jacquesm on Sunday March 26, 2017 @03:56PM
(#13962848)
> is it possible to use page faults and a handler to effectively build a message passing setup in the microkernel?
Yes. (Been there, done that, 20 years ago).
> Essentially using the pagefault as the mechanism to switch stacks from one kernel-service to another?
You wouldn't use the pagefault for that but you'd switch the context (TSS or equivalent), this you need to do anyway when you switch from one process to another, or from a process to the kernel. But passing the message could be done via paging.
> Is this novel,
No.
> stupid
No. Definitely not.
> or even faster than existing mechanisms?
It's not faster than the current syscall arrangement, but it is faster than copying data from one process to another, which is the way a message passing kernel would normally pass messages from one process to another.
Yes. (Been there, done that, 20 years ago).
> Essentially using the pagefault as the mechanism to switch stacks from one kernel-service to another?
You wouldn't use the pagefault for that but you'd switch the context (TSS or equivalent), this you need to do anyway when you switch from one process to another, or from a process to the kernel. But passing the message could be done via paging.
> Is this novel,
No.
> stupid
No. Definitely not.
> or even faster than existing mechanisms?
It's not faster than the current syscall arrangement, but it is faster than copying data from one process to another, which is the way a message passing kernel would normally pass messages from one process to another.