FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Thinking about creating my own OS





[FuN]goku
Hokay so, me and a mate are starting up a small online company, and we're doing some programs and stuff.

But what i would really like to do is write an os from scratch

OR

Have a very very very minimal version of a linux distro to work with

Now, i know many languages including
vb,c#,python,perl,ruby,php-html-css, C/C++ and im starting to do assembly as well.

Now since i've never really written anything like this before, i dont exactly know where to start.
Could someone maybe point me off in the right direction it'd be much appreciated. I couldnt find much on writing your own os in google as i doubt that many people do it ^^

Im thinking i should start off with a minimal linux distro before trying to write an os from scratch
anways.

-Thanks in advance
AftershockVibe
I'd suggest you have a look at something like Linux From Scratch first.
If you don't know where to start building an OS then you're not going to know what an OS needs to do. If you don't know what it needs to do, you can't write it.

Operating systems are insanely complicated and to be even slightly useful need to be coded incredibly efficiently and need intimate details about how to talk to hardware. Even getting disk access and display output is going to involve an intense amount of work and knowledge.

I'd suggest you stuck to customising the compile options for Linux and customising the packages you use.
[FuN]goku
yeah i've seen linux from scratch before , i was just wondering if there was anything else to choose from Wink
Arno v. Lumig
http://www.osdev.org
http://www.osdever.net
http://www.osdcom.info
{name here}
[FuN]goku wrote:
Hokay so, me and a mate are starting up a small online company, and we're doing some programs and stuff.

But what i would really like to do is write an os from scratch

OR

Have a very very very minimal version of a linux distro to work with

Now, i know many languages including
vb,c#,python,perl,ruby,php-html-css, C/C++ and im starting to do assembly as well.

Now since i've never really written anything like this before, i dont exactly know where to start.
Could someone maybe point me off in the right direction it'd be much appreciated. I couldnt find much on writing your own os in google as i doubt that many people do it ^^

Im thinking i should start off with a minimal linux distro before trying to write an os from scratch
anways.

-Thanks in advance

VB is an absolute joke. C#, Python, Perl, and PHP are scripting languages with no intent for OS Development. HTML and CSS aren't even programming langauges. Ruby and C++ pose problems for OS development for various reasons, though it is not impossible because BeOS was written in C++. C and assembly are the only languages worth anything for OS development you've listed. Those will give you everything you need if you've got all the other knowledge under your belt: low level access, memory management, cleanliness, and flexibility.

I suggest looking at some old source code for CP/M and Linux. Those will give you ideas of what you're in for, whether the OS is simple or not. Those links Arno gave you should help you with the concepts along the way.
[FuN]goku
@ {name here} - Yeah i know OS's are generally written in C & Asm, i was just stating that i knew alot of languages ^^ , also: isn't uhm... solaris written in java?

Anyways thanks for the links mate i'm gonna have a look at em now.
Studio Madcrow
C++ is the ONLY language in your list that's even remotely suitable for OS development. BeOS, for a start, was written in C++ if I remeber correctly...

As for Solaris, it's mainly C. Even the so-called "Java Desktop System" is just a nice skin for GNOME (which is written in C) The only big part of Solaris that's written in Java that I can think of of is the GUI Management Program (Sort of like a combination Control Panel and Registry Editor, for thoe of you stuck in a Windows mindset)
{name here}
Studio Madcrow wrote:
C++ is the ONLY language in your list that's even remotely suitable for OS development. BeOS, for a start, was written in C++ if I remeber correctly...

As for Solaris, it's mainly C. Even the so-called "Java Desktop System" is just a nice skin for GNOME (which is written in C) The only big part of Solaris that's written in Java that I can think of of is the GUI Management Program (Sort of like a combination Control Panel and Registry Editor, for thoe of you stuck in a Windows mindset)

BeOS is the ONLY operating system ever made in C++. There's a reason why: It's not the greatest thing for OS development. Practically every other operating system made has been made in a combination of C, and Assembly language, BeOS (with C++), MacOS (with Pascal IIRC), and CP/M being exceptions (CP/M used PL/M, both of which were invented by the same man, so I think he knew it a little better than any other person at the time anyway).
Every UNIX and UNIX-like system has, obviously, been written in C. The leaked Windows 2000 sources were also written in C from what I've heard. OS/2 is being reconstructed with C. It's the language meant for these things - it was written to make an operating system.
Studio Madcrow
{name here} wrote:
Studio Madcrow wrote:
C++ is the ONLY language in your list that's even remotely suitable for OS development. BeOS, for a start, was written in C++ if I remeber correctly...

As for Solaris, it's mainly C. Even the so-called "Java Desktop System" is just a nice skin for GNOME (which is written in C) The only big part of Solaris that's written in Java that I can think of of is the GUI Management Program (Sort of like a combination Control Panel and Registry Editor, for thoe of you stuck in a Windows mindset)

BeOS is the ONLY operating system ever made in C++. There's a reason why: It's not the greatest thing for OS development. Practically every other operating system made has been made in a combination of C, and Assembly language, BeOS (with C++), MacOS (with Pascal IIRC), and CP/M being exceptions (CP/M used PL/M, both of which were invented by the same man, so I think he knew it a little better than any other person at the time anyway).
Every UNIX and UNIX-like system has, obviously, been written in C. The leaked Windows 2000 sources were also written in C from what I've heard. OS/2 is being reconstructed with C. It's the language meant for these things - it was written to make an operating system.

Just because most OSes are written in C, doesn't mean that C++ is useless for OS design. BeOS, for example, is widely regarded as one of the best-designed and molst efficient OSes ever created. Anyway, my point was lost in that I wasn't saying C++ was the best language for the task, just that that it was better than Java, Python or PHP...
ocalhoun
How is yours going to be better than others already available? Will it be made for a specific purpose?
I would just question if it is a good idea to put so much effort into something that (unless you are the best two programmers ever) will probably end up having a user base of perhaps 5...
A new linux distribution? That is definitely doable, and a realistic goal. An entirely new OS, not based on any previous one? I think that would probably be biting off more than you can chew.
csoftdev
why do you nee dyour own OS? there are so many different distros of linux out there with many different tools, you can choose from very small to very big distro depending on your need. so why bother to create your own
singh.gurjeet
I would strongly recommend against doing such a thing, for anybody! Unless if you are someone like Linus Torvalds.

Please read the wiki note here: http://www.osdev.org/wiki/Beginner_Mistakes#Commercial_OSDEV

Don't do it unless you have a radically new idea!

(mostly) Only established people in the industry have the luxury of playing around with a radically new ideas (except for a few like Google). Thats because they are the only ones people are ready to bet their money on.

Look a Michael Stonebraker for instance... He was one of the initial pioneers of implementing RDBMS' (EnterpriseDB, my company's flagship product) is one of the derivatives of his work in UCB. And now he is the cheif architect of a the Vertica database team.

Best regards and wish you all the luck for the new initiative.
Studio Madcrow
By all means go ahead and write a small OS, but don't expect it to ever be anything all THAT useful. Also, it might be a good idea to try the open source approach to building your OS, especially if you wish to have it ever become something useful, rather than just a toy to play with in a virtualized environment.
[FuN]goku
There are plenty of reasons one might want to write their own OS. Me on the other hand.. i'd just want to cuz i get bored of normal programming and need a challange.

Some reasons WHY you might wanna write your own OS:
-If you take a laptop to school like me, you could brag to others and show it off Razz
-You can customize things alot more than normal (Without installing additional things)
-If you host alot of things, you might consider making your own os for extra security. IMO, it would make it alot harder for someone to slip something nasty into the OS, because they would have a lack of knowledge on how it works.

But thats my opinion on that. And as for me writing an OS goes, i still havent really attempted anything as i've had to deal with school and i've had other commitments... Meh.. But i never said i would be releasing the OS if it was made Wink it was just something i wanted to try out.
kansloos
Security by obscurity isn't going to work, the windows sources are closed yet people find exploits.
Open source model allows for greater security, because good willing people are more likely to find security exploits earlier, then those who seek to destroy.
Arnie
... so he quoted the Open source Bible.

All I can say is, if you want your OS to be good for anything other than showing off, find something that makes it different from the rest. Probably optimization for one specific purpose and leaving out the rest. Yet another regular Linux distribution is no good.

And you need a lot of time, too.
ocalhoun
kansloos wrote:
Security by obscurity isn't going to work, the windows sources are closed yet people find exploits.

True, but there are many people trying to get through and informally sharing news about their successes. Suppose one single hacker is trying to get into an OS he's never seen before... "Heh, let's see if it can stand up to this exploit" he thinks... A short time later: "WTF? I've never seen an error like that before! What is this thing?" Most ways of hacking rely on an intimate knowledge of how the target works, and then finding a loophole in it.

If this new OS uses existing programs, though, a hacker could possibly get into those programs, no matter what OS was running them. For example, if your new OS was running Apache, and the hacker knew a way to get into Apache, it would probably still work, without worrying about what OS was being run.
[FuN]goku
ocalhoun wrote:
If this new OS uses existing programs, though, a hacker could possibly get into those programs, no matter what OS was running them. For example, if your new OS was running Apache, and the hacker knew a way to get into Apache, it would probably still work, without worrying about what OS was being run.


Thats the thing, if i was to write my own OS and i was going to be running things like an httpd, i would probably end up coding my own, though i cant say that i WOULDNT use existing programs.. I mean something like mysql can be useful for storing information, and is probably easier to access than say.. a plain text file.

kansloos wrote:
Security by obscurity isn't going to work, the windows sources are closed yet people find exploits.
That really depends on how you look at it...

Okay if i was to write my own OS, and i dont release to anyone except the people that might help me code it, we would be the only ones to have it.

Now lets look at windows , you say it's closed source, yes that is true , BUT, the thing is nearly everyone has access to windows, and the could use debuggers to find out things.

But if no one has the OS i write, its hard to debug..
But i'm saying it makes it harder to exploit.

Ach, im too tired to think of anything else to write. lol
halflife268
The only real difference between C++ and C is that C++ is object oriented. Tell me why it wouldn't be suitable for OS development?

Also, I may suggest an O'Reilly book: Understanding the Linux Kernel, 3rd Edition
ISBN: 0-596-00565-2
swizzy
Considering your enthusiasm... i would just like to advice you to use LFS and mod it beyond recognition.... even if its just a new desktop environment... still you are going to have the feeling, its YOUR OS...

but then thats just my idea...
singh.gurjeet
swizzy wrote:
Considering your enthusiasm... i would just like to advice you to use LFS and mod it beyond recognition.... even if its just a new desktop environment... still you are going to have the feeling, its YOUR OS...

but then thats just my idea...


Sorry for being soooo discouraging in my past post....

Yeah... Go ahead and experiment. If it was not for people experimenting, even if it was for fun, we wouldn't have maved an inch from the caveman times!

Do all you desire, get people involved, and remember to have fun along the way...


Good luck,

Gurjeet.
Related topics
P2P Puzzle
Creating a new Operating System
Microsoft + AOL vs Yahoo + Google...
FREE DNS???
FreeBSD - Is it reliable and secure?
COnstructing an OS from nothing...
BSD a better OS than Linux?
windows XP or swap to VISTA
Linux system recommendations please
Does a website have to be 'from scratch' to be 'your work'?
Installing OS X in a computer other than a Mac
Free OS not written in C?
ChromeOS
Bangladesh Cyber army is to publish their own OS
Reply to topic    Frihost Forum Index -> Computers -> Operating Systems

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.