views:

759

answers:

16

What are some tiny open source operating systems? I'm looking for something several orders of magnitude smaller than Puppy Linux, Feather Linux, DSL, etc. I want to run a command-line text editor and compiler; anything else is extraneous. I'm looking for a system I can take apart and acquire a fairly good understanding of the whole thing in a reasonable period of time. Bonus points for something that is portable and well-documented.

+13  A: 

If you're trying to understand the kernel, look at Minix. The Linux kernel is too big for an academic exercise.

Paul Tomblin
+1  A: 

Make your own distro with only the pieces you need.

http://www.linuxfromscratch.org/

Comprehensive, but probably wouldn't fit the "reasonable time period" constraint.
gbarry
A: 

Look up Xinu - Xinu Is Not Unix - by Douglas Comer. It was originally on LSI (PDP-11) machines, but has been ported to a number of other architectures. You can find more information and the source at Purdue University.

Jonathan Leffler
+6  A: 

I agree with using Minix. You get gcc, vi, emacs, bash. flex. bison, man and TEX if you install the whole thing, but you can cut it off to just kernel, bash, gcc and vi

A: 

tomsrtbt: "The most GNU/Linux on 1 floppy disk."

Paul Croarkin
What's a floppy disk? And where did I put my mirrored shades? :)
JoeBloggs
I think I saw them in that box with the dialup modems :)
gbarry
+1  A: 

You didn't say what compiler. JX works for me.

erickson
+1  A: 

It is not completely FOSS but you might look at QNX (aka Qnix). It is micro-kernel OS targeted at embedded systems.

I have no affiliation... See wiki link here. Note that the source was made available awhile back.

Michael Easter
+1  A: 

Not Another Completely Heuristic Operating System (NACHOS) NACHOS wiki

cs.washington.edu

lalitm
+1  A: 

Contiki is very small. Perhaps too small for your needs and/or hardware target, though.

unwind
A: 

I'll agree on Minix. Also the book:

http://www.amazon.com/Operating-Systems-Implementation-Prentice-Software/dp/0131429388

is actually fairly comprehensible. (Unlike some books on similar topics, thinking of "Understanding the Linux kernel" here.) It's quite expensive, but you can probably pick up an earlier edition second-hand.

(NB. I'm not in any way affiliated with the book, it's just good :) )

David Lawrence Miller
A: 

OpenBSD could be a good choice, I think the default install (no X11) has something like 15 processes. FreeBSD is a close second. Either way you'll want to read "The Design and Implementation of the FreeBSD Operating System"

BTW, I've spent a considerable amount of time on AIX, Solaris, FreeBSD, and Linux... and I think the OpenBSD man pages are the best around.

ceretullis
A: 

I still fondly remember XINU (XINU is not UNIX) from college. Not sure it would provide everything you need, but it was fairly educational when I was in college, and easily fit on a floppy along with a turbo C :)

Uri
+2  A: 

There are also completely different research/teaching operating systems around, like TOPSY.

Topsy is a small footprint native multi-threading, multi-tasking operating system based on a micro-kernel architecture with a message passing communication infrastructure.

ANSI C, ~20k lines. It was apparently ported to ia32, MIPS R3000/R4000, StrongARM SA110, Intel IXP1200, Intel IXP2400 and Motorola 68K. You'll find various thesis reports on their website.

Christoph Rüegg
A: 

There once was "PeeWeeLinux" -- It was a bunch of shell scripts running on Red Hat 6.2. You could build the system (pick and choose) from a series of menus, once you figured it out. It's four years old now. I built a 4MB system: 1/2MB for Linux plus 3.5 for PHP!

And then there was a guy who built a comm terminal app, by taking the Linux kernel and replacing init with his application!

You should say which editor and which compiler. Busybox in 100K gives you a limited vi, for example. But I think if you want gcc, that will determine the size of the target system.

gbarry
A: 

a system I can take apart

Also have a look at the Bootdisk Howto, to find out what it is you are about to take apart.

gbarry
A: 

just assemble "noop" and boot it. ;-)

chenz

Crazy Chenz