Brendan wrote:That's why I don't like the synchronous send-receive-reply stuff - too much like call/ret and not enough like multi-threading. For e.g. consider what happens on a dual CPU computer where there's one thread that needs to send 3 independant requests to a server
I couldn't agree more with you here: Synchronious IPC and multi-processor systems don't mix too well. The reason why Liedtke decided to go for it anyway was probably that back then such systems were rather rare (which is now changing..) and that it's not trivial to allow asynchronious IPC without adding a lot of complexity to the messaging system.
btw: The mp-example doesn't look very realistic too me, except if it takes ages to send a message (otherwise the clients will clealy dominate over it). Here's how it should look like in my opinion:
task A = window manager (server)
task B, C, D, E = apps that own a window (clients)
(Some window was moved and the clients must be informed so that they can update their view)
- task A runs on CPU0 and sends out a message to each client, then sleeps
- tasks B-E are now scheduled using all of the system's CPUs
- Once all the results have returned, task A might run again
Brendan wrote:How come nano/exo-kernels have such a bad reputation? I think it comes down to people ignoring what most OS's get used for - running "applications" (which includes things like Apache servers, etc). Applications programmers couldn't give a rat's behind what the kernel does or how much policy could be changed - they're writing Java, VisualBasic and POSIX/ANSI C code that needs to work. Often performance is less important than development time, often it needs to be portable, and almost always the application programmer has better things to do than understanding and writing new "system modules" or implementing different policies.
Applications programmers aren't in an way forced to write their own abstraction in an exokernel. The normal case is that they build their programm on-top of a library that provide some comfort rather than the raw kernel as often done in a monolithic-kernel. The library acts as a wrapper class that adds a level of abstraction and thus shields the programmer from having to deal with the exokernel low-level functionality.
The main advantage is that application programmers can chose the
library (and therefore policy, interface, etc) themself according to the needs of their application and if some asm-geeks really want to use the raw exo-kernel they can also do so. If the applications programmers however really doesn't care about the policy (I dare to doubt this), all he has to do is to include the standard library at the beginning of his code.
Let's take the window manager as an example because it's easier to demonstrate it for high level servers.
[pre]
o---------------------o o-----------------o
| graphic-card driver | o----o | terminal server |
o---------------------o o-----------------o
[/pre]
On the lowest level there is the graphic-card driver that has to multiplex the device. In this case I'd propose to use 'windows of pixels' (left, right, top, bottom) as the primitive that will be used to ensure security. Note that we'll limit ourselves to 2D here because the 3D part (normally) isn't needed for windows and apart from that too bad documented anyways.
At system start-up the root manager (I called it terminal manager because it'll in my design synchronize video, kbd and mouse) is started and allocates a window that spans the whole screen.
Applications can now allocate a 'window' by sending a message to the root-server. In return they get a capability that authorized them to output pixels, resize the window, move it and eventually destroy it.
What most people get wrong is that they think the poor application has to build all abstractions (toolbar, captions, menus) himself. The normal case is however that he just includes a library:
[pre]
#include <std_windows.h>
int main()
{
CreateWindow(...) // over-all look: caption bar, etc
CreateToolbar(...)
CloseWindow(...)
}
[/pre]
Of course he can also use an alternative library, possibly - but not neccessarily - a self-written one.
Brendan wrote:It's sort of like designing a car where the steering wheel, gearstick and pedals can be easily removed and replaced with something completely different - a waste of time considering that most people just want to go to the shops.
Yes, most people won't care but there are some that do care and they should be given the chance (a tall person might want to use a different seat, a handicapped person needs special pedals, etc).
regards,
gaf