It's going to be a micro kernel, and I want to keep the kernel itself relatively small. The kernel will be split in to 5 sections (purely abstraction sections):
- Interrupt Management - Sends events to drivers that are listening for a certain interrupt, and handle system calls.
- Process Management - Handles creating/destroying processes, prioritises processes, also parsing ELF headers.
- Device Management - Handles devices and their drivers.
- Timer/scheduler - Handles switching between processes.
- IPC - Handles processes trying to talk to each other: events, messages, pipes, shared memory.
Starting from the lowest level, the levels are;
- Drivers:
Can map physical memory range in to it's own address (e.g. DMA), write to/read from ports, can create/destroy devices, and do everything servers can.
Servers:
Can communicate with drivers, and do everything applications can.
Applications:
Can communicate with servers and other applications.
I'm going to identify processes (and pipes) by a name, which doesn't exist on the file system (though nothing says it couldn't be mounted on the VFS). The name will be separated in to their categories. For example; "servers\vfs". Programs will be able to define their own names, though they will be given a default one. For example a program with the filename "texted.bin" will be loaded as "applications\texted.bin". If that name already exists, it'll append a number on the end; "applications\texted.bin1", etc.
Possibly the name could include the user's name aswell, for example; "applications\Andrew\texted.bin". When you query the kernel for a list of processes, you'll be able to use wildcards (e.g. "applications\Andrew\*" to get every application executed under my account). These names will resolve in to a PID or (PiID in the case of a pipe), and you'd use the PID for communicating with the process.
As for devices, I'm thinking that drivers could register a device. And when you query the kernel about a device, e.g.
"devices\disk\0" it will return the device's ID along with the driver's PID, and you simply send messages to the driver (e.g. Read chunk from device 1).
So, that's my plan for the kernel. What do people think? I'd like it to be criticised and all suggestions are welcome.