Page 1 of 1
what to do next
Posted: Wed Apr 23, 2008 7:43 am
by aztex
after programming the interrupt service routines....
is it better to do device drivers or memory management,paging ..
Posted: Wed Apr 23, 2008 8:27 am
by xyjamepa
It's really up to you ,and the way you design your os,but I think
you should start writing a keyboard driver
Posted: Wed Apr 23, 2008 8:32 am
by piranha
I would go:
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
Posted: Wed Apr 23, 2008 10:08 am
by lukem95
well PIT is very easy and useful, so that should be considered.
you should also get some sort of printf function working, as it will make debugging a whole lot easier.
i would then spend a whole lot of time reading up on different memory managers, considering what you want it to do, and where your OS is heading, and then plan and program this. It will save you a lot of time later on in the development of your OS and once its done, it can be forgotten about for a long time.
then onto drivers/applications/filesystems and files etc.
Posted: Wed Apr 23, 2008 10:51 am
by aztex
cool.. thankz
Posted: Wed Apr 23, 2008 6:12 pm
by Ready4Dis
piranha wrote:I would go:
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
Wel,l that's almost exactly the opposite that I did things in, so who knows
.
First I setup the paging thing and some BASIC memory management, then came up with a way to dynamically link programs so I can load my kernel + driver/modules. After that, I got multitasking/PIT going, and loading/install drivers. After this, I wrote a few drivers and device handler (my first drivers were HD, PCI scanning, etc). I did multitasking first so I could implement my drivers in a multi-tasking friendly way (and load all drivers at once rather than one at a time). After this, I implemented a 'proper' memory manager (malloc/free). The LAST addition I did was my keyboard driver (why do I need imput for a multitasker or memory manager, or if I have nothing running?) and wrote a small shell, then added my VFS over this. This is where I am currently, I still need to implement system calls, IPC, multi-processing, I want to re-work my VFS to make it a little more extendable. right now, my VFS allows me to see all running processes (and kill them), view information about PCI devices, read my ram disk, and view installed block devices (and read them as well). However, it doesn't lend nicely to caching or file's, or dismounting a directory when it's in use by another program, etc. Anyways, there isn't really a 'correct' way to design your OS, I would definetly write a print function, then work on paging and memory management (get your physical allocator working first, then your virtual memory/paging going). After that, I would probably suggest malloc/free, I should have implemented mine earlier, because I had to go back and make a few modifications to some code later. Also important, is to get some sort of generic list functions together, I made a generic linked list struct + supporting functions, it comes in VERY handy for storing lists of devices, processes, etc, etc (tons of lists in OS dev). Another handy one is a tree struct, to hold tree's (for my VFS, process manager to have multiple threads per process, etc). Those are best implemented after malloc/free
.
Posted: Wed Apr 23, 2008 6:45 pm
by piranha
Ready4Dis wrote:piranha wrote:I would go:
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
Wel,l that's almost exactly the opposite that I did things in, so who knows
.
Well, there ya go. We all have different ways of doing things.
Piranha wrote:But thats just me
-JL
Re: what to do next
Posted: Thu Apr 24, 2008 3:18 am
by jal
aztex wrote:after programming the interrupt service routines....
is it better to do device drivers or memory management,paging ..
You'll need memory management for your device drivers, probably. So I'd go for that first.
JAL
Posted: Thu Apr 24, 2008 12:52 pm
by einsteinjunior
You'll need memory management for your device drivers, probably. So I'd go for that first.
Its not a necessity as far as you do not do something that require dynamic data structure in your driver for example,allowing for a variable length keyboard buffer.That will require some malloc.
Posted: Fri Apr 25, 2008 1:23 am
by jal
einsteinjunior wrote:Its not a necessity as far as you do not do something that require dynamic data structure in your driver for example,allowing for a variable length keyboard buffer.That will require some malloc.
Malloc is
not memory management, that's local heap management. I (and the OP) was talking about paging etc. And to even load and (if needed) relocate your drivers in memory, you need memory management.
JAL