Martijn van Oosterhout wrote:
1. non-blocking is nice, but lots of OSes (eg POSIX) don't support it on disk I/O unless you use a completely different interface.
We could implement I/O via something like POSIX AIO or a pool of worker threads that do the actual I/O in a synchronous fashion. But yeah, either way it's a major change.
2. If one of your 'processes' decides to do work for half an hour (say, a really big merge sort), you're stuck.
It would be relatively easy to insert yield points into the code to prevent this from occurring. However, preemptive scheduling would come in handy when running "foreign" code (e.g. user-defined functions in C).
I honestly don't think you could really do a much better job of scheduling than the kernel.
I think we could do better than the kernel by taking advantage of domain-specific knowledge, I'm just not sure we could beat the kernel by enough to make this worth doing.
BTW, I think this thread is really interesting -- certainly more informative than a rehash of the usual "processes vs. threads" debate.
-Neil
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend