Staring a microkernel (on Mac ?)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
calpis

Staring a microkernel (on Mac ?)

Post 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.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Staring a microkernel (on Mac ?)

Post 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. ;)
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
calpis

Staring a microkernel (on Mac ?)

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Staring a microkernel (on Mac ?)

Post 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)
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Staring a microkernel (on Mac ?)

Post 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 :-)
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
calpis

Re:Staring a microkernel (on Mac ?)

Post 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. :D
Post Reply