First things First

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

What should you write or Design first when starting an OS?

Poll ended at Mon Feb 11, 2008 5:44 pm

Bootloader
4
15%
Filesystem
2
8%
Memory Manager
9
35%
Other
11
42%
 
Total votes: 26

User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

First things First

Post by crazygray »

Q:
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

Just out of curiosity of peoples opinions.

A Wiki Book On OS Development(I didn't start it but I know the author addons to it are appreciated)
http://www.wikibooks.org/wiki/Operating ... evelopment
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
exkor
Member
Member
Posts: 111
Joined: Wed May 23, 2007 9:38 pm

Post by exkor »

1. partial device drivers - understand how devices work, what they need, do at least detection with some initialization
2. memory managing - allocating pages, converting physical to linear, make sure all variable are at dynamic locations an can be moved somewhere else
3. tasks, schedulers
4. drivers and user apps
5. other

simple bootloader can be fit anywhere, complex one goes at the very end or maybe skipped entirely if you dont have human power to do it.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

I say filesystem. Everything else is easy to change later, but once you've got your allocation tables, directories, and some files loaded on a test system disk -- trying to change some detail of that filesystem structure later makes you want to cry.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

I think you'll get some very different responses here :) .

My philosophy is to get a basic video driver started first (so that I can at least use printf() to output hex numbers). My video driver also outputs to com 1. This video 'driver' must use no dynamic memory allocation.

Then I like decent memory management. Otherwise, if you are using C++ new and delete operators, you can't test anything properly as you don't know whether it's that class you just added that's broken, or the memory allocator.

Later, the debug-mode video driver can be removed and replaced with a proper system that can fit in to your driver tree along with all the other hardware.

Cheers,
Adam
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

I agree wholeheartedly with AJ.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

crazygray wrote:Just out of curiosity of peoples opinions.

A Wiki Book On OS Development(I didn't start it but I know the author addons to it are appreciated)
http://www.wikibooks.org/wiki/Operating ... evelopment
That wikibook is devoid of content except for the introduction - therefore I cannot give an opinion ;)
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

Design your OS first. Think of the concept (UNIX/POSIX clone? microkernel or monolythic? messaging of something else? file based or not? etc. etc.), then work it out. What do you want the kernel to do? How is your memory management handled, and what does it look like (flat, segmentation, paging, virtual mem)? Do you want to go SMP? Intel or something else (or both)? What about device drivers, how do they interact? Do you have device driver stacking (USB stack, for example)? And so on and so forth. Just starting to hack code does not result in a good OS, although it might be tremendous fun.


JAL
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

Point taken thats why I said addons are appreciated.
Just out of curiosity of peoples opinions.

A Wiki Book On OS Development(I didn't start it but I know the author addons to it are appreciated)
http://www.wikibooks.org/wiki/Operating ... evelopment
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

point taken
JamesM wrote:
crazygray wrote:Just out of curiosity of peoples opinions.

A Wiki Book On OS Development(I didn't start it but I know the author addons to it are appreciated)
http://www.wikibooks.org/wiki/Operating ... evelopment
That wikibook is devoid of content except for the introduction - therefore I cannot give an opinion ;)
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

crazygray wrote:Point taken thats why I said addons are appreciated.
We do have a wiki, you know. If anything, work on that instead of starting anew. Besides, IMO, Wikibooks is a very bad idea, because there is no focus. In a wiki article, you can have 120 disjoint events, but in a book, your thought process must be seamless, and I can't see that happening with free a group of people.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

I agree the wiki is better.
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

If you ask what to design first, my vote is on memory management, as that somewhat defines many other aspects - protection, inter-process communication, the like.

As to what to implement first - I'd say basic output functionality, as I am not a friend of homegrown bootloaders (reinventing the wheel), and you do need some way to print debug information to screen right from the start.
Every good solution is obvious once you've found it.
Post Reply