What I want my OS to be...

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.
Therx

Re:What I want my OS to be...

Post by Therx »

the problem is that GCC doesn't support them
WARNING : this could be rubbish as its a thought based on NO knowledge!

Surely that doesn't matter as if you get GCC to produce the different parts in modules of position independant code then the code won't need to worry about what the various segments are. You would just have to have some base code (possibly in ASM) which linked them altogether and controled the segments etc.

Pete
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:What I want my OS to be...

Post by Solar »

The problem is that your code ends up in .text (pointed to by CS), your variable initializations in .data (pointed to by DS), and your stack in the stack segment (pointed to by SS).

Then there's ES, FS, and GS, and you could put them to quite some tricky use.

But GCC expects a "flat" memory modell, assumes that ES is the same as DS, considers FS to be some untouchable magic value for compatibility with OS/2 / NT... there are some very limited things you can do with segments and GCC, but usually you just set CS, DS, and SS to 4 GByte starting at 0, and forget about segments...
Every good solution is obvious once you've found it.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re:What I want my OS to be...

Post by Colonel Kernel »

Brendan wrote: To me the crappy-ness of 80x86 is one of the attractions - to be doing one of the most complex projects (OS), on one of the worst architectures (IA-PC), in one of the hardest languages (Intel/80x86 assembly).
I'm not sure I'd say that x86 is the hardest architecture out there... I've heard some nasty things about programming for older MIPS processors. Specifically, that these processors lack pipeline interlocks, so if you don't explicitly put the right number of nops in very specific parts of your code, you're screwed.
It's tricky to identify the level at which to do the abstraction. But that level certainly isn't anywhere within the kernel. There might be modules you can carry from one CPU to the other - the scheduling algorithm for example - but most of the kernel doesn't really cater to HAL'ing.
The truth of that statement depends a lot on whether you're implementing a microkernel. The more of a kernel there is to port, the more of it will be portable (i.e. -- the architecture-specific parts are a fixed overhead).
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Dreamsmith

Re:What I want my OS to be...

Post by Dreamsmith »

srg wrote:Trouble is that segmented os aren't portable, which is one of my goals.
Alas, this guarentees the same thing portability always does: you must always code for the lowest common denominator. A portable OS is thus guarenteed to be an inferior OS, at least to what it could have been...
srg

Re:What I want my OS to be...

Post by srg »

Dreamsmith wrote:
srg wrote:Trouble is that segmented os aren't portable, which is one of my goals.
Alas, this guarentees the same thing portability always does: you must always code for the lowest common denominator. A portable OS is thus guarenteed to be an inferior OS, at least to what it could have been...
I'm not in it to make the worlds most innovative and best os, I just want to make an os, if you get what I mean. Anyway, once I've made one, then surely in the future if I want to create a better one, I'll have the background knowledge rather than stumbling arround (walk before you can run).

Also, I want to keep things simple, and not get too clever (an innovative os that crashes every five mins is nothing compaired to a boring os that goes and goes and goes.

srg
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

I feel getting my kernel to a point that allows me to say, "Hey. I got it working.". I have been trying to build a working kernel for quite a few years now, only to get it mostly completed then become sidetracked and quit working on it for numerous months at a time unfortunately.

I got to thinking a few weeks ago what this point would be. I have come to the conclusion that being able to write some of my own scientific experimentation simulations on this small plain operating system would be enough success to consider it a job well done.

<and yes I know this is a really old post>
User avatar
omin0us
Member
Member
Posts: 49
Joined: Tue Oct 17, 2006 6:53 pm
Location: Los Angeles, CA
Contact:

Post by omin0us »

I suppose I'll also add on to this old post. :]

The reason i started writing my OS, is because one day about 4 years ago my senior year of highschool, i was sitting in my room and thought to myself "I wonder how you write an operating system".

And then i started googling "how to write an OS".
hahahaha.

4 years later, I'm still working on it going strong. I didn't think it would last this long, or get as far along as it is. But its so damn addicting. You get one part done, and then you can see how that part will enable another cool part to work. So you start working on that.

So i would say my drive is everything that i've been learning. And the satisfaction of what i have been able to do so far. My OS is doing nothing new or revolutionary. Its just doing the same stuff thats been done many times before it. But its a lot of fun. It would be cool if even a small community formed around my OS. But i dont really count on it. In the future possibly i'll have the knowledge to go about designing things in a better more efficient manner. but for now simplicity and making it work in general is what i'm striving for.
http://ominos.sourceforge.net - my kernel
#ominos @ irc.freenode.net
http://dtors.ath.cx - my blog
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

omin0us wrote:I suppose I'll also add on to this old post. :]

The reason i started writing my OS, is because one day about 4 years ago my senior year of highschool, i was sitting in my room and thought to myself "I wonder how you write an operating system".

And then i started googling "how to write an OS".
hahahaha.

4 years later, I'm still working on it going strong. I didn't think it would last this long, or get as far along as it is. But its so damn addicting. You get one part done, and then you can see how that part will enable another cool part to work. So you start working on that.

So i would say my drive is everything that i've been learning. And the satisfaction of what i have been able to do so far. My OS is doing nothing new or revolutionary. Its just doing the same stuff thats been done many times before it. But its a lot of fun. It would be cool if even a small community formed around my OS. But i dont really count on it. In the future possibly i'll have the knowledge to go about designing things in a better more efficient manner. but for now simplicity and making it work in general is what i'm striving for.
Haha that's what I did :D...

But only 4 months...
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

My motivation? To boldly solve problems no man has solved before.
User avatar
elderK
Member
Member
Posts: 190
Joined: Mon Dec 11, 2006 10:54 am
Location: Dunedin, New Zealand
Contact:

Post by elderK »

Im a little like Brendon.

I dont work on Zenobit / CITADEL because it's fun, I do it because I want to create something that is either commercial quality or atleast useful to someone.

That being said, A great motivator for work is that of learning how to accomplish more and more advanced things. So, I guess with me its all about creating something that people can find interesting and through that, becoming a greater programmer.

Apart form that... I want to create something somewhat unique.

~zeii
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post by earlz »

I use to be addicted to it because of the sense of accomplishment.
I mean the first time I got my OS to boot without triple faulting, when I got a basic console, my first multitasking test...

Then I made the fatal mistake of actually designing my OS. It was a horrible idea because I would design for a few hours. This didn't give me any feeling of accomplishment..And when I finally got around to trying to code it, I would find a design flaw and redesign that bit..
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Post by bubach »

For me it's always the same, I loose motivation when I know that I can do it. When I go from problemsolving and learning to pure work, sometimes I'm lucky enought to code while I'm still learning/solving problems, and thats when I get results.

Eh, btw.. If you want me to remove the signature I will. But I do think it's funny ;)
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply