Code: Select all
The hybrid kernel, often called the macrokernel, is primarily a monolithic kernel.
What I have is clearly a microkernel design by nature. I have only 4 system calls (2 for async send/recv, and 2 for synchronous rpc call/dispatch). You can send messages to userspace servers (fs,terminal,net etc.). Also every driver is a normal userspace thread with the privilege to use io ports and map mmio areas (another reason why it's not a hybrid model, see http://en.wikipedia.org/wiki/Hybrid_kernel, see picture on the right).
So far what I wrote is a microkernel. My problem is, I have (exactly one) server which runs in kernelspace (in lack of terminology I call it "the core") what's mapped in all thread's address space. If you communicate with that specific server, the API seems exactly like sending messages (for convience), but no message passing is involved, it's rather acts like in a monolithic kernel. The query is dispatched and the results are stored in the same fashion as if it would arrive in a response message, but no task switch happens. As long as userpsace application concers, this "trick" is fully transparent.
My kernel therefore has 2 parts: sys.arch, a hardware abstraction layer (low level irq and exception handling and IPC messaging), and the forementioned sys.core server.
I asked myself what are the parts that cannot be restarted after crash, or placing in userspace would make the system ineffective. These were: memory management (physical memory and paging, but not userspace malloc), and multitasking/threading (cannot restart threads without). All kernel calls that belong one of these (map, unmap, fork, yield etc.) implemented by "sending messages" to the core server. Others (for example open, close, listen, accept etc.) use normal messaging to the appropriate server as in any microkernel.
My question is, how would one call such a kernel model? Is there a better name than hybrid?