what to do next

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
aztex
Member
Member
Posts: 30
Joined: Sun Mar 02, 2008 8:15 am

what to do next

Post by aztex »

after programming the interrupt service routines....

is it better to do device drivers or memory management,paging ..
User avatar
xyjamepa
Member
Member
Posts: 397
Joined: Fri Sep 29, 2006 8:59 am

Post 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
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places
no one has ever been before.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

I would go:
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
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post 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.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
aztex
Member
Member
Posts: 30
Joined: Sun Mar 02, 2008 8:15 am

Post by aztex »

cool.. thankz
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post 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 :).
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post 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
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: what to do next

Post 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
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post 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.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
Post Reply