Friday, September 29, 2006

some progress

Its been a while since my last post. First of all, I've been working on a C-based microkernel that roughly resembles L4::Pistachio and partly Linux. On the linux side, I am using strict linux kernel coding style. The reason is simply that's the most beautiful and readable way to write C code. My initial aims are to perhaps support L4 userspace programs, or if not, at least the way IPC and system calls work on L4 should be the same on mine. So far, I am able to use cml2 kernel configurator, and scons build system to configure/build the kernel. The sources so far can be loaded with the simple L4 loader. System starts in physical memrory, initial page tables are set up and virtual memory execution starts. I have also implemented a page allocator that works like a charm. It is linked-list based, can well be improved but I really dont care about optimisations right now. There's also the concept of a minimal slab cache that the allocator uses to store page descriptors. The allocator is briefly tested using random alloc/dealloc test patterns. Implementing kmalloc on top of this is not a big issue.

Once this is nice and stable, I will put effort on implementing the TCB's (both user and kernel), the scheduler, system calls and exception vectors. Also loading of tasks must be taken care of. At this stage, neither of these features bring any uncertainty to how I will put together everything. I have a good rough idea on how each would be implemented, the only problem is that each will take time to develop and test. One thing though, I really don't regret that I started everything from scratch. I think this was absolutely the right way to go. We'll see how it goes, on my next post.

0 Comments:

Post a Comment

<< Home