Unifying async IPC and I/O?
Posted: Wed Feb 24, 2021 1:06 pm
My design is basically a micro-kernel. Right now I have user space working and I am using L4 / QNX style synchronous IPCs. This works well. I do not have I/O or a file system yet, which is what I want to tackle soon. But first, I want to move to asynchronous IPCs because synchronous doesn't scale (SMP). While I am looking at that, I want to see if I it makes sense to unify IPC and async I/O.
- I want async I/O. I am a fan of Windows IOCP and the similar Solaris ports.
- I like registered I/O buffer - the idea being that you share a memory block between your app and the I/O driver to get zero-copy I/O.
- I am not sure I like Linux's io_uring. I see the point but I don't think this would work in a micro-kernel (you'd need to setup ring buffers between each app and each service, doesn't really scale).
Everything I read about IOCP and ports in general seems to suggest that they were added after the fact. And it works well because they can unify unrelated things (files, sockets, timers, signals, etc) through a common interface. This works because these unrelated things all exist in the same context (the kernel) which is not true in a micro-kernel. I mean you could get it to work by having the ports themselves in the kernel or some other service, but that's going to create a lot of IPCs that should be avoidable with a better design.
Any thoughts on this? How would you unify async IPC and async I/O in a microkernel? I am looking for some ideas here... What is your experience here?
- I want async I/O. I am a fan of Windows IOCP and the similar Solaris ports.
- I like registered I/O buffer - the idea being that you share a memory block between your app and the I/O driver to get zero-copy I/O.
- I am not sure I like Linux's io_uring. I see the point but I don't think this would work in a micro-kernel (you'd need to setup ring buffers between each app and each service, doesn't really scale).
Everything I read about IOCP and ports in general seems to suggest that they were added after the fact. And it works well because they can unify unrelated things (files, sockets, timers, signals, etc) through a common interface. This works because these unrelated things all exist in the same context (the kernel) which is not true in a micro-kernel. I mean you could get it to work by having the ports themselves in the kernel or some other service, but that's going to create a lot of IPCs that should be avoidable with a better design.
Any thoughts on this? How would you unify async IPC and async I/O in a microkernel? I am looking for some ideas here... What is your experience here?