News for hackers. Stuff that matters.
Re:Writing an OS in Rust: Handling Exceptions by the_duke on Sunday March 26, 2017 @01:39PM (#13961934)
The main performance problem isn't message passing itself but the required context switches.

With a monolithic kernel, with disk io as an example and presented in a very primitive form:

Userspace -> Kernel -> Userspace. Makes 2.

With a microkernel:

Userspace -> Kernel -> IO Service -> Disk Driver -> (IO Service) -> Kernel -> Userspace

Makes 5-6 context switches (at least) for a single disk read, since everything runs in an isolated process, and a context switch is quite expensive (saving & restoring registers, etc).

You can mitigate and optimize this though...

There are no comments on this comment yet.