My project and the pros and cons of a modular kernel design
Posted: Sat Oct 24, 2009 10:49 am
Before I'll give you all an explanation of my new project I'll give you a little background information about myself (as this is my first post).
I'm an engineering student with a specialization in computer sciences, and I've been interested in OS design for a while now.
I've previously done 3 other attempts at building an OS, the first one failing horribly, the second one getting to the point where I had a memory manager, a VFS and something resembling multitasking, and the third one getting to the point where I had a simple console which accepted a couple of standard commands.
I've been following these forums for a while now and have gained a lot of knowledge by just reading through the wiki and lots of threads.
I learned C by messing around with different linux distributions since I was only 12 years old, and I have a basic knowledge of ASM. (I do have a lot of experience in a couple of high-level languages as well).
The project:
At the beginning of this academic year I had the idea of starting a new OS project after a taking a break from OS-deving for a couple of months to focus on doing some small projects in C# (my "weapon" of choice :p), but I didn't want to mindlessly start coding like I did in my previous projects, so I started planning. At first I hadn't a clue where to begin, because I really didn't know what I wanted to achieve with this project, but that all changed about 2 weeks ago.
I wrote out a plan for a completely modular kernel with a solid and clean kernel core which I could easily build modules for (I've done some high-level modular projects before) so I could actually experiment with different approaches and models for different functions without having to edit the main kernel code when I would want to change a certain function.
I think I covered most of the required functions for a stable modular kernel in my planning, but I'm still doing some research before I actually start writing the code since I really don't want to start over in the middle of my project when I suddenly realize I made an error in my planning.
This is the reason why I decided to make this thread, as I still have some questions about modular kernels in general
The Pros and Cons of a modular kernel approach
I know that to have an optimal modular kernel you need to have a solid kernel core with a solid and efficient system for loading and managing your modules. I'm not interested in building a system able of hot-swapping modules (except maybe for driver modules) as I can see some serious complications with this approach, but I just want to build a kernel core which I can experiment with and play with (that's why I call this project "Sandbox").
Now I wanted to ask you if there are any complications with modular kernels I should keep in mind performance-wise or speed-wise (as we live in a time where everyone wants an instant-on machine) and what I could do to prevent these complications or how I could work around them.
I plan on taking my time for this project, as I'm not in a hurry to get this completed, and I have good prospect for this project as it seems that every project I do improves drastically compared to its predecessor.
If you kept on reading this post until this point, I'd like to thank you (:p) and I hope I can get some good feedback from this.
I'm an engineering student with a specialization in computer sciences, and I've been interested in OS design for a while now.
I've previously done 3 other attempts at building an OS, the first one failing horribly, the second one getting to the point where I had a memory manager, a VFS and something resembling multitasking, and the third one getting to the point where I had a simple console which accepted a couple of standard commands.
I've been following these forums for a while now and have gained a lot of knowledge by just reading through the wiki and lots of threads.
I learned C by messing around with different linux distributions since I was only 12 years old, and I have a basic knowledge of ASM. (I do have a lot of experience in a couple of high-level languages as well).
The project:
At the beginning of this academic year I had the idea of starting a new OS project after a taking a break from OS-deving for a couple of months to focus on doing some small projects in C# (my "weapon" of choice :p), but I didn't want to mindlessly start coding like I did in my previous projects, so I started planning. At first I hadn't a clue where to begin, because I really didn't know what I wanted to achieve with this project, but that all changed about 2 weeks ago.
I wrote out a plan for a completely modular kernel with a solid and clean kernel core which I could easily build modules for (I've done some high-level modular projects before) so I could actually experiment with different approaches and models for different functions without having to edit the main kernel code when I would want to change a certain function.
I think I covered most of the required functions for a stable modular kernel in my planning, but I'm still doing some research before I actually start writing the code since I really don't want to start over in the middle of my project when I suddenly realize I made an error in my planning.
This is the reason why I decided to make this thread, as I still have some questions about modular kernels in general
The Pros and Cons of a modular kernel approach
I know that to have an optimal modular kernel you need to have a solid kernel core with a solid and efficient system for loading and managing your modules. I'm not interested in building a system able of hot-swapping modules (except maybe for driver modules) as I can see some serious complications with this approach, but I just want to build a kernel core which I can experiment with and play with (that's why I call this project "Sandbox").
Now I wanted to ask you if there are any complications with modular kernels I should keep in mind performance-wise or speed-wise (as we live in a time where everyone wants an instant-on machine) and what I could do to prevent these complications or how I could work around them.
I plan on taking my time for this project, as I'm not in a hurry to get this completed, and I have good prospect for this project as it seems that every project I do improves drastically compared to its predecessor.
If you kept on reading this post until this point, I'd like to thank you (:p) and I hope I can get some good feedback from this.