# Wanna write an OS



## maxim2 (Jan 16, 2002)

Hello fine people!!!

Well, I've been thinking about Operating Systems, and I'd like to write one. I'm planning on using UNIX tools to do this, anyway. The thing is that I'm clueless on where to start.

So...Is there anything I should know?

I know this can cover LOTS of ground, but I'm curious.

Thanks!


----------



## Rockn (Jul 29, 2001)

Well....good luck with that! There's a lot more to writing an OS than there is to writing a program. You need to know about hardware, virtual and physical memory management, writing a Kernal....toooo much work for my brainpan.


----------



## maxim2 (Jan 16, 2002)

Yeah, it seems quite challanging. I would like to try my hand at it, though. I read that one may need two of the same kind of computer to do this, so you don't have to keep re-booting the machine. Aren't there any computer emulators out there? Sounds strange, eh? I mean like if I were to turn the emulator on, it would have its own "bios", etc., and its own OS (or if there were none, you would get an "OS not found" message). Know what I mean?

Thanks for the reply!

--maxim2


----------



## codejockey (Feb 11, 2002)

I've always thought this would be a really fun, interesting project. For some timeless info on operating system theory and design (with a very practical bent) you might check out Andrew Tanenbaum's Operating Systems Design and Implementation. For some ideas, and a look at what's already out there, try:

http://directory.google.com/Top/Computers/Software/Operating_Systems/Open_Source/

Note that many of these include full source code or allow you to run them as a Unix process.


----------



## IMM (Feb 1, 2002)

If you're actually serious about this - you might look at the minix from the previous link. I don't supppose you write forth


----------



## maxim2 (Jan 16, 2002)

I'm quite serious. I think I should learn x86 Assembler, first.

Well, thanks for your info, everybody! I think I'm gonna look for "Operating Systems Design and Implementation" online, and try to get it. I hope it isn't too expensive, though!

bye bye!

--maxim2


----------



## john1 (Nov 25, 2000)

Hi maxim2,

I got your email.
Yes i am still very interested in this.
I have been looking into various aspects.
Would like to exchange notes, and or ideas.

John


----------



## Snake~eyes (Apr 18, 2002)

do a search

this has been ask several times


----------



## maxim2 (Jan 16, 2002)

OK, but I'm still trying to program in C++

Well, I'm pretty sure I'd like the OS to run on an Intel computer. That's basically all I know now. I'm still gonna do it!

I'll keep you notified.

--maxim2


----------



## john1 (Nov 25, 2000)

i didnt get far into 'basic'
and that was years ago.

I downloaded a system called "stupidOS"
its an operating system, 16 kilobytes.

I wanted to se what it was like,
Windows is around 200 megabytes i think,
so i wanted to compare them.

But i couldnt get it to run.

Perhaps you could try, and let me know?

John


----------



## maxim2 (Jan 16, 2002)

Where'd you find StupidOS? 16KB? Hmm...

--maxim2


----------



## john1 (Nov 25, 2000)

http://www.geocities.com/stupidosproject/


----------



## SamTheMan (Jun 28, 2002)

You'll need to use assembly. It is no harder than any other language but very sloooooooooooow. Compared to C++ it is like the difference between going to a hardware store to buy lumber to build a house and starting by growing a tree.

In my opinion the learning curve should be writing an assembly driver for a display card. Drivers are a good way to learn how to deal on the hardware level.

Once you are good at that, your next design should be a disk operating system. Decide the scheme you are going to use to store information on the hard disk, where and how.

As far as emulators, you actually "emulate" a "device" (which is typically a single chip or set of chip family) and not the entire computer. For instance a UART is a good place to start. Intel's MCS 51 is the latest, I believe. From this you learn the DAC and ADC, which is very useful in understanding the digital data necessary for analog output and the reverse.

The key to your understanding of emulators is that they are nothing more than a program that is used on a functioning computer, with an OS such as WIN. You write your code, test it in the emulator (that may or may not be accessing an outside device) and then apply it to the "other" computer. IOW, crash the other computer instead of the one you are writing the code on. AND, don't expect an emulator to behave all that close to the real world... it is used just as a guide.

The term "writing to hardware" as opposed to "writing a program" is expotentially different and more time consuming. If you are going to do this by yourself, we'll all be in a nursing home when you are done, but please post back here so our grandkids will know that you've finished.


----------



## maxim2 (Jan 16, 2002)

Ok. Actually, I am planning on writing a kernel first. Then I'll distribute it on the web, and people can add to it. It'll be open-source. Of course I'll add to it too. 

thanks for the advice!

--maxim2


----------



## john1 (Nov 25, 2000)

what did you think of 'stupidOS' ?


----------



## DJ [email protected] (Aug 8, 2001)

maybe you could have a look at the free version of BeOS. im not sure if you can still download it form their site anymore but you should be able to find it on kazaa or something. there are lots of open-source projects out there for BeOS that you could have a look at. i wish i could tell you some community sites to visit but its been ages since i've ben to any and i cant remember. but have a look, you might find something interesting


----------



## maxim2 (Jan 16, 2002)

I think stupidOS is stupid :-D

It sounds OK. I haven't downloaded it; no time. BeOS; I've heard of it. Sounds interesting...

--maxim2


----------



## websurfer (Jun 24, 2002)

Well if you ever finish post the file so people could use it. Good luck!


----------



## john1 (Nov 25, 2000)

Hi,
check out sigops:

http://www.acm.uiuc.edu/sigops/

How to Write an Operating System

--------------------------------------------------------------------------------
Overview
This semester SigOPS will hold a series of meetings discussing how to build an operating system from scratch. We provide the structure for developing your Very Own OS, you write the code. It's that simple!
************************

Regards, John


----------



## jimferd (Jul 29, 2002)

Hey, If you still read this....

Writing an operating system is something I've always wanted to do as well. Before I go into any details, I was wondering if you care to join forces and write an OS; if you do you can email me at [email protected]. If that appears in Javascipt and you dont support it, by the way, with spaces that's idegokum @ hotmail .com .

I know Linux and the basics of OS construction and would help write the bootstrap (bootloader) and the kernel; I know a bit of assembly but am currently learning more. I am alright with C and C++, as well as a bit of BASIC, but that doesnt count.

This sounds like quite the project, so drop me a line.

-Jimferd.

PS. Windows is evil.


----------



## asbo (Sep 21, 2001)

> _Originally posted by jimferd:_
> *PS. Windows is evil. *


God bless you Jim!!


----------



## jimferd (Jul 29, 2002)

God bless me what....?


----------

