Actually, it's not just OLTP, anytime you are doing time sharing between
hundreds of users (something POSIX systems are supposed to be good at) this
will happen.
> Now I will admit that it is conceivable that you can design an
> application that finds out how many CPUs are available, creates threads
> to match that number and tries to divvy up the work between them using
> some combination of polling and asynchronous I/O etc. There are, however
> a number of problems with this approach:
Actually, one way to semi-support this approach is to implement
many-to-many threads as per the Solaris approach. This also requires
significant hacking of both the kernel and the runtime, and certainly is
significantly more error prone than trying to write a flexible scheduler.
One problem you didn't highlight that even the above case does not happily
identify is that for security reasons you may very well need each user's
requests to take place in a different process. If you don't, then you have
to implement a very well tested and secure user-level security mechanism to
ensure things like privacy (above and beyond the time-sharing).
The world is filled with a wide variety of types of applications, and
unless you know two programming approaches are functionaly equivalent (and
event driven/polling I/O vs. tons of running processes are NOT), you
shouldn't say one approach is "broken". You could say it's a "broken"
approach to building web servers. Unfortunately, things like kernels and
standard libraries should work well in the general case.
--Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/