IPC Ideas
Posted: Fri Jun 06, 2008 11:15 am
I'm designing my first research OS and I want it to be extremely modular, so I expect the kernel to provide only the most basic services (VMM, IPC).
My current idea (i've no experience on microkernel or IPC -based design) is that the kernel contains a routing table for the system calls the applications can execute.
Suppose a basic system with kernel and services (I call services, Subsystems):
An application may call for example, a syscall to set the console background color:
This will issue a software interrupt to awake the kernel that a system call was executed by an application. In <syscalls.h> suppose we've a general definition for SETCONSOLEATTRIBS like:
So we send to the kernel a message with syscall and parameters:
The kernel looks up the syscall routing table and founds 0x295F is a call to VIDSS, so sends to the video subsystem (by means of software interrupt?) the PID, the syscall and the parameters. So when VIDSS finishes it's task, can respond a status to the calling process through it's PID (so kernel it's not involved here).
Well, this is a very early approximation.
At least say that I'm crazy!
Note that at first i'm aiming at uniprocessor implementation (no multithreading here ).
My current idea (i've no experience on microkernel or IPC -based design) is that the kernel contains a routing table for the system calls the applications can execute.
Suppose a basic system with kernel and services (I call services, Subsystems):
Code: Select all
SERVICE_ID, SERVICE_DESCRIPTION
0x0000 = KERNEL
0x0001 = VFS
0x0002 = VID
Code: Select all
SETCONSOLEATTRIBS ( <params >);
Code: Select all
#define SETCONSOLEATTRIBS 0x295f ; syscall number
Code: Select all
ProcessID, 0x295F, PARAM1, PARAM2
Well, this is a very early approximation.
At least say that I'm crazy!
Note that at first i'm aiming at uniprocessor implementation (no multithreading here ).