Page 1 of 1
Staring a microkernel (on Mac ?)
Posted: Fri Apr 08, 2005 6:56 pm
by calpis
After I completed the first step for cross-compiler step1. I looked around the web to learn writing a microkernel. I read a lot but eventually, I got lost.
what should I do if i want to build a "small basic microkernel" or some sort?
How do I "DESIGN" and implement the "most basic microkernel"?
And I was wondering do I need to include some sort of OS dev library or do I need to write them? Either way, how?
I m suffering from information overload...
Any advises or pointers would be great. Thank you
P.S. Sorry if I posted this under wrong Subject.
Staring a microkernel (on Mac ?)
Posted: Fri Apr 08, 2005 7:27 pm
by Colonel Kernel
I've been working on what will eventually be a microkernel since last summer (I have a full-time job as a developer too, so progress has been slow
).
So far, I can't think of any clear-cut design decisions I've had to make that are specific to a microkernel. I'm still dealing with really basic stuff like interrupt dispatching, printing stuff to the screen, spinlocks, etc. Once I have all my exception handlers implemented and my kernel crashes gracefully
I will work toward implementing basic memory management, then threads. I probably won't make any microkernel-specific decisions until it comes time to design IPC and system calls.
I guess what I'm saying is that there is so much work involved in getting the basics of
any kernel implemented, that it probably won't matter for a while whether you're designing a microkernel or not.
And I was wondering do I need to include some sort of OS dev library or do I need to write them?
FWIW, in terms of in-kernel libraries, I'm writing my own from scratch.
In any case, this topic in the wiki will probably help you:
What order do I make things in?
BTW, I'm an "Eleanore Semaphore"... or "Rex Mutex" maybe.
Staring a microkernel (on Mac ?)
Posted: Sat Apr 09, 2005 6:08 pm
by calpis
Well, at least I can start from there and find out my archetype along the way for now. :-\ And I now have some kind of idea about the time it might take to implement it.
Thanks for you reply.
Re:Staring a microkernel (on Mac ?)
Posted: Mon Apr 11, 2005 4:22 am
by Pype.Clicker
well, much depends of 'how low' you wish to place the kernel barrier. Honestly, for instance, i'm not much considering a plus to have physical memory managed from a user-level process (but iirc, BI does/has done something similar in BlueIllusion)
There's imho some "common infrastructure" to be put in place before you actually reach a stage where ?K/MK distinction can apply. Maybe, however, you might be more concerned by TSSes than another OSdever could be since it will ultimately allow you to specify what I/O resources can be directly accessed by your user-level drivers/servers.
You may like to have a look at
http://clicker.sourceforge.net/history.html, which is the milestones i made personnally (which may or not be relevant to you)
Re:Staring a microkernel (on Mac ?)
Posted: Mon Apr 11, 2005 4:50 am
by distantvoices
In BlueIllusion til version 0.035, Memory management indeed was split in two: one user service part which was responsible for all the virtual address space and shared memory stuff and for the management of processes and threads (the last two are still managed by the user level service - which will extend to multi user stuff too).
I have, after some heated discussions, overworked the design and moved the virtual address space stuff into the kernel level memory driver - where it is rock solid and quick as a spark.
I daresay, you are free to design to your like and you are free to rethink stuff after some testing/working it out. Performance is an issue sometimes, and in my first approach, it's been a major issue.
STay safe and have fun doing your micro kernel. You'll most prolly be busy with designing some lowlevel stuff first (irq handling, task switching, core memory management and sorta - which leads to Task Control Block management ...)
Feel free to bug us with questions
Re:Staring a microkernel (on Mac ?)
Posted: Wed Apr 13, 2005 7:27 pm
by calpis
Thanks, I find that the milestone page help alot. I m alot more clearer.
At the moment, I m trying to look at as many OS design structure and sources, trying to find the pros and cons, hopefully come up with a improve design or structure of some sort for my own... :-\ That is why I ask about how to design the microkernel. So it is a try and error thing.
Great! Thanks again for the advises.