Click to See Complete Forum and Search --> : Create an OS


Domin
02-10-2001, 12:55 AM
I'm not sure if this is the right place, but I was wondering: How exactly would one go about creating an operating system? What language would be used? What would you write? :) Also, how are Linux distrobutions created? Thanks.

[ 10 February 2001: Message edited by: Mike1533 ]

Gnu/Vince
02-10-2001, 01:02 AM
Write an operating system in Binary!?!?!?!?! Are you crazy, masochist, dumb, suicidal or what? Man. Linux is written in C. *BSD's are written in C. Windows is cut and pasted in C. And to create an OS you have to create a kernel (which takes care of I/O, memory management, drivers, etc.) and some basic utilities

[ 10 February 2001: Message edited by: wmHardRock ]

scott_R
02-10-2001, 01:17 AM
Depends on what you want to use the OS for. Most, if not all, PC-based OS's use a combination of C and assembly language. (C for the most part, and assembly for portions that need a speed advantage.) How would you go about creating one? First, you'll want to study another OS (or many of them) to see how and why they do what they do. Then you'll want to figure out what platform you'll want to build it for. Then you'll need a good deal of knowledge about the hardware, so you can write the programs to handle it.

One misconception that I see a lot of nowadays is that an OS is something like windows. In reality, an OS is nothing more than a hardware driver, optimized for achieving various goals. (Speed, flexibility, raw power, etc.) Most of us never actually deal with the OS itelf (linux in my case), but with applications that run on top of it. (Bash, X-windows, etc.)

If you still want to learn about programming an OS, you're lucky. A few years ago, OS information was a tightly kept secret, only for those deemed "worthy" enough to use it. (Like writing, come to think of it.) Now, you can pick and choose from the type of OS you want to write. A search through any decent search engine should give you much more help than any of us could, but if you're already using linux, why not learn about this kernel?

As far as distros are concerned, in their most basic form, all they consist of is a selection of software. A kernel, a windowing system like X, supporting software, and fun extras. To make it something everybody can use, you'll probably need to write, or modify, an installation program, as well as provide a means to update easily. Most importantly, you'll want to make sure all the parts work together correctly.

In other words, distros are simply carefully selected software, bug checked, and setup to make it easy to install and use. In theory, an easy job and everyone can do it. In reality, not so easy, and prone to mistakes.

:)

thedexman
02-10-2001, 01:39 AM
A couple of interesting sites to check out would be www.linuxfromscratch.com (http://www.linuxfromscratch.com) and From-PowerUp-To-Bash-Prompt-HOWTO (http://www.linuxdoc.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html). If you know c, you could use them as guides and look at the source code for the various programs they describe.

Beowulfs_Ghost
02-10-2001, 02:10 AM
I know the Mach misro kernel is studied alot in CS operating system classes. If you were realy serious about wrting an OS, you could go with a micro-kernel design, and build the whole thing on top of Mach. Their is a Linux distro for strange Apple hardware, built on Mack, MkLinux. and of cource, Darwin (MacOS X) is built on Mach.