Hey all, I'm back for a little bit. I've been giving SharpOS quite a
bit of thought lately, and I have an idea about implementation. I
pitched an idea like this in a chat we had long ago, but I think it
fell on deaf ears. Here's my idea for how we could implement this
beast.

First, our boot loader loads up assembly called init. Init is written
in C# (doesn't have to be, but it would be nice), and basically only
has hard coded read-only file system drivers. It's compiled as EIC,
meaning that the AOT compiler can compile it as simple machine code,
no dependencies.

Init's job is pretty simple. First, it sets up the stack and the heap
(stack grows downward in memory, heap upward). Next, it mounts the
root device as read-only, loads mscorlib into a special place in
memory, and then loads the kernel executable into another place in
memory. It then sets up any last environment things, and jumps to the
kernel.

The kernel then has control and has a working stack and heap. It can
start loading modules. It can start doing its work.

Now, sharing libraries. Mscorlib is already in memory, why can't we
reuse it? We can. When an application needs to access a library, the
instruction pointer will change to a method of the library, but the
stack / heap pointers will stay the same.

Later, if we decide to have separate address spaces, we can use paging
and map where ever those libraries are to a portion of the address
space.

So, I ask you, what's wrong with this picture? I never understood the
need for a "stripped down" mscorlib.

Johann

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to