So... you want to write your own Operating System?

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.
User avatar
crbenesch
Posts: 13
Joined: Wed May 28, 2008 9:23 am
Location: Maricopa, AZ USA
Contact:

So... you want to write your own Operating System?

Post by crbenesch »

The most obvious question is why?

There is an important philosophical question that must be answered before you either waste your time or improve your knowledge. Developing an operating system is delving into the guts of how a computer works, from the lowest level possible. Very few are ever successfull at it, as opposed to the myriad of shareware and open source software floating around today that was written by budding and advanced programmers. Developing an operating system is like being dropped off in the middle of the wilderness and trying to reinvent society. Here the usual language bashing between programmers becomes real. C, Assembly, C++ to some extent is possible, and even Pascal are possible langauges to use. All others like Visual Basic, .NET, PHP, HTML, etc.. are completely useless for this type of project. Familiarity, if not a good knowledge of UNIX is also pretty much a must. No matter how much coding you have done in any language, you will make mistakes during this endeavor. Since there is no operating system to stop you from reading and writing memory where you arent supposed to, strange things can happen. The CPU is a finicky beast, and there are a lot of times you will swear that it is not operating as Intel has said. You are in for a wild and confusing ride, that when you get done, whether you step off the track early on, later on, or go all the way through to a real OS that you can use to any extent, you are surely never going to look at a computer the same way again.

If you are just after the glory, to become the next Linus Torvalds, start a new BSD, become the next QNX, rake in the cash and the women, send money home to your starving families, etc... this is the wrong approach. Linus wrote the first Linux in his dorm room just to see how the 386 processor worked. He didnt care whether Linux became a household name or not. Bill Gates didnt even write Windows or DOS, he bought the original DOS from a guy in Albequerqe, NM and marketed it to IBM. BSD was originally written as a graduate studies project in computer science. The original UNIX was a research project of AT&T Bell Labs. QNX was written to control factory components and embedded controllers. None of these people who originally sat down and wrote code were thinking about how popular their project would become. If you are thinking about doing this just because you want to say you did it, then you are in luck. If youre after fame, fortune or riches, best to look elsewhere.

The OSDev community is an elite group among programmers. There are literally hundreds if not thousands of people trying to write an operating system at this very moment. This type of programming seperates the men from the boys rather quickly. The newcomers quit after a week, there is a level of people that barely made it past keyboard drivers who know just enough to sound intelligent that belittle everyone in the forums and newsgroups. The ones who have made it through to actual usability realize that after the OS is written, the work is only beginning, for there is software to port and things to be done that make the original OS development look like a cake walk. It will never end, it will dominate your life if you are successfull. Even if you write the new cool OS that runs as fast as a cheetah on steroids, there are 100 others that do the same thing.

Is it a useless proposition? Definitiely not. The amount of knowledge gained and your expertise as a programmer will increase by a level not otherwise possible. If youre ready to take on the task, I wish you the best of luck. The only word of caution that I have is that new programmers should gain a little experience first. This is not for the lighthearted or recent trade school graduate, but a serious programming task that taxes the brains of the best programmers in the world. Not only that but you should be fluent in C, and Assembly Language.
~~~~~~~~~~~~~~~~~~~~~
Chris Benesch
CRIBIX
http://www.maricopacomputer.com/cribix/
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 »

Wow.

Can this post be in the wiki and/or made sticky?

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Re: So... you want to write your own Operating System?

Post by suthers »

crbenesch wrote: there is a level of people that barely made it past keyboard drivers who know just enough to sound intelligent that belittle everyone in the forums and newsgroups.
Thats me :lol:, except i haven't got as far as a keyboard driver...
(I hate my isr...) and i don't sound intelligent... :oops:
Jules

edit: oh and yah nice text...
User avatar
crbenesch
Posts: 13
Joined: Wed May 28, 2008 9:23 am
Location: Maricopa, AZ USA
Contact:

Re: So... you want to write your own Operating System?

Post by crbenesch »

suthers wrote:
crbenesch wrote: there is a level of people that barely made it past keyboard drivers who know just enough to sound intelligent that belittle everyone in the forums and newsgroups.
Thats me :lol:, except i haven't got as far as a keyboard driver...
(I hate my isr...) and i don't sound intelligent... :oops:
Jules

edit: oh and yah nice text...
Hey thats all good, I've gotten past kbd to mouse and then to the floppy drive, so now that makes me a genius right?

Actually its a copy of what is on my wiki for my project.

http://www.maricopacomputer.com/cribix
~~~~~~~~~~~~~~~~~~~~~
Chris Benesch
CRIBIX
http://www.maricopacomputer.com/cribix/
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

great read.
scary and inspirational all at the same time.

btw, AWESOME avatar lol.
User avatar
crbenesch
Posts: 13
Joined: Wed May 28, 2008 9:23 am
Location: Maricopa, AZ USA
Contact:

Post by crbenesch »

01000101 wrote:great read.
scary and inspirational all at the same time.

btw, AWESOME avatar lol.
Do you have a computer that just runs too slow?
Are you tired of spending hundreds on better hardware only to get more bloated software that slows it down even more?

Hi, Billy Mays here for OxyOS. It has the power to cut through your toughest applications. Even an office productivity suite is no match for OxyOS. Watch as the we try to run something in Java, notice how it just starts right up, its just like magic...

Anyway seriously.

There is so much good information on this site, but it is hard to sift through all of the noobs who dont even know how to use a C compiler, much less write an operating system. I think a lot of these people are caught up in the grandeur of becoming the next digital celebrity. The reality is just like in show business that for every famous actor out there, there are thousands who are just as good looking and can probably act better. The same can be said about the computer world. Bill Gates probably couldnt write Hello World without it taking up over a megabyte of RAM, taking 30 minutes to start up and requiring registration and activation to install. The rest of us would just use printf.

Anyway, I think a lot of people dont realize what they are in for and are doing this for the wrong reasons. Its inspiring if you want to say you did it, its a deterrent to script kiddies that want to piece together a bunch of different peoples code, add some logos of their own and think that makes them the next Linus Torvalds.

I think the big problem comes for two sources. The chief one being kids like under 16 or something that learned about programming, maybe have an interest in it, so all of a sudden want to take on the biggest task possible. The other is people in their early 20s who went to some place like ITT tech or something and now think they know all there is to know about programming since now they can master VB.NET and ActiveX objects.

I've been professionally developing C and C++ on several different platforms from RS6000 to Dynix Mainframes for the financial industry for almost 10 years, and I barely feel qualified to attempt this. I also went to an accredited college (Northwestern U) and got a 4 year degree in computer science. I'm not trying to toot my own horn here, but there is no "middle class" here in the OSDev world. Not meaning to insult anyone, but youre either an idiot or a genius when it comes to this level of programming.

I was hoping this piece of inspirational writing would let us serious developers come back to the place where we started and keep coding for all the right reasons.
~~~~~~~~~~~~~~~~~~~~~
Chris Benesch
CRIBIX
http://www.maricopacomputer.com/cribix/
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Hi,
I was hoping this piece of inspirational writing would let us serious developers come back to the place where we started and keep coding for all the right reasons.
Inspirational, yes, but somewhat elitist in my humble opinion. The reference to professional C++ development is somewhat moot, as professional software design and development and kernel hacking are two seperate skills. Granted they are not disjoint - there is a large amount of overlap, but the point I'm trying to make is that professional development experience isn't a prerequisite as such for hobbyist OS development.

As a fantastic example of this, take the osdev.org board moderator AJ. He's an excellent programmer and an asset to the OSdev community, however he didn't study computer science in university and doesn't work in the field. All his experience is self-taught.
Bill Gates probably couldnt write Hello World without it taking up over a megabyte of RAM, taking 30 minutes to start up and requiring registration and activation to install.
Bill Gates is not a programmer, he's a businessman. And a highly successful one at that!
The chief one being kids like under 16 or something that learned about programming, maybe have an interest in it, so all of a sudden want to take on the biggest task possible.
While I myself wasn't interested in OSDev at 15 (I was mainly into OpenGL games, vector and matrix maths etc) I know several prominent members of this board that are, and they'd probably balk at your comment. AlexExtreme and Lukem95 are both in that age bracket I believe, and they're also an asset to the community.
The other is people in their early 20s who...
Again, some rather nasty generalisation and ageism going on here. I'm 21. I really don't think that age should be a factor in your judgement of someone. It should be the maturity, skill level and experience that they exhibit that one judges on, not what you infer from their age.
Familiarity, if not a good knowledge of UNIX is also pretty much a must.
It's not.
Not only that but you should be fluent in C, and Assembly Language.
You don't need to be fluent in either. If you're coding in Pascal, for example, you need to be fluent in Pascal and have the NASM and Intel IA32 manuals to hand. That's it. Fluency in an assembler language is not a prerequisite.

Sorry if I've berated the post a little unnecessarily, but it seemed a little elitist and seemed to be parading quite a few opinions as fact.

Cheers,

James
User avatar
CmpXchg
Member
Member
Posts: 61
Joined: Mon Apr 28, 2008 12:14 pm
Location: Petrozavodsk, Russia during school months, Vänersborg Sweden in the summertime

Post by CmpXchg »

JamesM wrote:While I myself wasn't interested in OSDev at 15 (I was mainly into OpenGL games, vector and matrix maths etc) I know several prominent members of this board that are, and they'd probably balk at your comment. AlexExtreme and Lukem95 are both in that age bracket I believe, and they're also an asset to the community.
Completely agree. I'm myself sixteen.
Everyone has a right to develop OSes, don't they?
Although if I started developing now and it would take me several years, I'd be quite of age when my OS gets well up and running. Of course, I would never claim having software engineering skills satisfactory for developing an OS.

Talking about Bill Gates, I'd say he was at the age in question when he made his first Tic Tac Toe game in Basic language...
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

crbenesch wrote: Do you have a computer that just runs too slow?
Are you tired of spending hundreds on better hardware only to get more bloated software that slows it down even more?

Hi, Billy Mays here for OxyOS. It has the power to cut through your toughest applications. Even an office productivity suite is no match for OxyOS. Watch as the we try to run something in Java, notice how it just starts right up, its just like magic...
:twisted: :twisted: :twisted: brilliant.

anyways,
I have to disagree with some of your thoughts here, especially on 'going into the project looking for success is wrong' as it's not. I decided to write my own OS BECAUSE I saw an oportunity in the market and decided to see if I could make a product to fill that void. I've been quite sucessful in both creating the OS and getting it approved by others. In fact, I believe going into a project driven by the thought of sucess will only make the goal that much more worthwhile and will put an extra driving force to your programming (btw, that was NOT a hobbyists thoughts).

Also, I unfortunately have to agree with you on the < 16yo thing, as (with a few acceptions) most are just too inexperienced and do not have the basics down. But JamesM is right as well, there ARE exceptions to this and they obviously worked hard to achieve the knowledge they have, so I wont knock ALL < 16yo's.

Pe@cE
User avatar
crbenesch
Posts: 13
Joined: Wed May 28, 2008 9:23 am
Location: Maricopa, AZ USA
Contact:

Post by crbenesch »

01000101 wrote:
crbenesch wrote: Do you have a computer that just runs too slow?
Are you tired of spending hundreds on better hardware only to get more bloated software that slows it down even more?

Hi, Billy Mays here for OxyOS. It has the power to cut through your toughest applications. Even an office productivity suite is no match for OxyOS. Watch as the we try to run something in Java, notice how it just starts right up, its just like magic...
:twisted: :twisted: :twisted: brilliant.

anyways,
I have to disagree with some of your thoughts here, especially on 'going into the project looking for success is wrong' as it's not. I decided to write my own OS BECAUSE I saw an oportunity in the market and decided to see if I could make a product to fill that void. I've been quite sucessful in both creating the OS and getting it approved by others. In fact, I believe going into a project driven by the thought of sucess will only make the goal that much more worthwhile and will put an extra driving force to your programming (btw, that was NOT a hobbyists thoughts).

Also, I unfortunately have to agree with you on the < 16yo thing, as (with a few acceptions) most are just too inexperienced and do not have the basics down. But JamesM is right as well, there ARE exceptions to this and they obviously worked hard to achieve the knowledge they have, so I wont knock ALL < 16yo's.

Pe@cE
I should have just left my first post as is...

Yeah all I was trying to say is theres way too many people out there who dont want to take the time to actually learn what they are doing. They think there is a community that will just "give" them code that they can just drop in and it will work. Heck some of the posts that I've seen the person hasnt even used a C compiler before yet claims to have a complete operating system written.

Sorry for getting all elitist and stuff guys. I'm good with computers but not that good with people, LOL.
~~~~~~~~~~~~~~~~~~~~~
Chris Benesch
CRIBIX
http://www.maricopacomputer.com/cribix/
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Post by Laksen »

I code this for fun. When it's not fun anymore, I'll stop.

Other than that I pretty much disagree with you.
I'm 20
Code FreePascal
On Windows only
Never had any education in programming
And I think, I've come a long way since I started in october, with almost no knowledge about OS development

IMO you're a troll :roll:
svdmeer
Member
Member
Posts: 87
Joined: Tue May 06, 2008 9:32 am
Location: The Netherlands

Post by svdmeer »

crbenesch wrote:
01000101 wrote:great read.
scary and inspirational all at the same time.


I was hoping this piece of inspirational writing would let us serious developers come back to the place where we started and keep coding for all the right reasons.
I think it's needful to keep people that doesn't do any research before posting, pretend that they are gods, or people without any knowledge and not willing to take own responsibility to get the knowledge away from this forum or encourage them to take the needed steps before posting, so the "serious" developers are staying on this forum making it a great place.

The post serious people here don't pretend they are a second Bill Gates or Linus Torvalds. There are not any people who write a whole OS themselves. Linus only wrote a kernel and some basic utility's. Bill Gates wrote a part of DOS, but not the whole Windows system. Some hobby-ists here did some great performances with what they already made.
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

crbenesch wrote:I should have just left my first post as is...
I have to disagree with some of that...
crbenesch wrote:Visual Basic, .NET, PHP, HTML, etc.. are completely useless for this type of project
Ahem. I'm coding in C# with the intention to use the mono port of .NET in the kernel. It would be entirely possible to use VB.NET as well. I have to agree with PHP/HTML though.
crbenesch wrote:there is a level of people that barely made it past keyboard drivers
Don't class the ability to write drivers for various unforgiving 1970s/80s pieces of equipment as equivalent to being able to write a good OS. IMHO developing decent scheduling, memory management and IPC routines are far more important. My past two kernels (the one before did) have never made it to the keyboard driver stage, because I just don't find programming bizarre IBM chips interesting.
crbenesch wrote:The OSDev community is an elite group among programmers
Again, stop the elitish comments. I consider most hobby os developers stubborn rather than elite :wink:

Other than that welcome. I'm sorry for the criticism but I really didn't see the point of the first post.

Regards,
John.
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

Thankyou JamesM, i also agree that several members of this community under (or around) the age of 16 are commit valuable information to this board. I would like to think of myself as one of them, having just turned 16 last month.

and to the OP, an interesting read, albeit somewhat biased.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

lukem95 wrote:Thankyou JamesM, i also agree that several members of this community under (or around) the age of 16 are commit valuable information to this board. I would like to think of myself as one of them, having just turned 16 last month.

and to the OP, an interesting read, albeit somewhat biased.
Completely agree to, I'm 16 myself...
And I've been coding since I was 9, so I wouldn't consider myself unexperienced (Though I still make stupid mistakes...).
Jules
Post Reply