Page 1 of 1

Order in kernel

Posted: Tue Feb 07, 2006 12:00 am
by astrid
I scheduled a day for every part of my OS.But I 'm not sure in what
order to do the kernel components.I planned to do it in more than a day.
I've quickly finded out that isn't a linear dependence.
For example the file manager is using the device manager who again
uses the file manager(circular).
Components are:
memory management
processor
process scheduler
device manager
file manager
network layer
system calls
...
Also a big question.The kernel uses read, write from C library or system calls or it uses only it's internal functions.

Re: Order in kernel

Posted: Wed Feb 08, 2006 12:00 am
by carbonBased
It will certainly take more then a day per each module.

Order is, of course, up to you and your OS design. If it means anything, I completed items (roughly) in this order:

-basic bootup
-gdt/idt initialization
-paging
-page allocator
-byte granularity allocator
-tss based multitasking
-mutexes, semaphores, etc
-driver manager

There's other things I've forgotten of course, but generally speaking, you want to get all your building blocks done first... simple utilities (linked lists, btrees, queues, etc) and then build on them (message queues, semaphores, mutexes), and then build larger modules on top of them, of course.

As per your second question... depends on the kernel, I guess. My kernel doesn't use any form of read/write. What would you be reading/writing?

Generally speaking (and a good architecture), the C library sits on top of the kernel (ie, the C library is implemented via system calls to the kernel).

--Jeff

Re: Order in kernel

Posted: Wed Feb 08, 2006 12:00 am
by Da_Maestro
The first thing I did after gdt/idt stuff was write basic standard functions like:
kalloc
print
inb
outb
and so on...