what to do next
what to do next
after programming the interrupt service routines....
is it better to do device drivers or memory management,paging ..
is it better to do device drivers or memory management,paging ..
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
I would go:
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
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.
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.
Wel,l that's almost exactly the opposite that I did things in, so who knows .piranha wrote:I would go:
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
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 .
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Well, there ya go. We all have different ways of doing things.Ready4Dis wrote:Wel,l that's almost exactly the opposite that I did things in, so who knows .piranha wrote:I would go:
PIT, Keyboard
Memory Management
Malloc, free, etc
Tasking
System Calls
Program Loading
Device Management
But thats just me
-JL
-JLPiranha wrote:But thats just me
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: what to do next
You'll need memory management for your device drivers, probably. So I'd go for that first.aztex wrote:after programming the interrupt service routines....
is it better to do device drivers or memory management,paging ..
JAL
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
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.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.
JAL