Page 1 of 2

Simplest/smallest UNIX-like system?

Posted: Mon Jun 09, 2008 6:27 am
by Tootles
Just wondering, how big might that be on an x86? I remember that the original PDP-7 version of UNICS required only 4KB of RAM.

I know UNIX 5 (PDP-11) needed about 32K or so, and the full installation took about 2.5M of space - my question is, could that be replicated on a modern machine? A UNIX-type system distrobution using minimal tools and drivers, and requiring almost no hardware to run - almost like a port of the PDP-11 version.

Posted: Mon Jun 09, 2008 6:42 am
by svdmeer
The definition of what Unix is changes over years.

You can't compare an old 4 kb Unix on an ancient platform with a Unix containing todays features.

One of the smallest Unices is Minix. There are some small BSD versions.

Posted: Mon Jun 09, 2008 9:21 am
by z180
The kernel size depends on many things like which drivers
are linked in and other stuff.
There is a rather difficult to understand beta kernel of UNIX V4
called nsys downloadable at the unix archive(25kb image).
Also there is an mini-unix without pipes and groups and a simplified scheduler.Even smaller is LSX for LSI-11.to obtain it get the disk images
archive extract them and filter the source out with the "strings"prog.
An small GPL unix like system with a bit source of Linux is ELKS,
get it at sourceforge.There is Minix-1.1 source on web available.
At UNIX archive you can get 2.9BSD which is a 16bit PDP 11 UNIX V7
enhanced with the (shrinked) TCP/IP stack of 4.1cBSD.
Also there is Ultrix-11 3.1 which combines 2.9BSD with improvements
and system V 1.2 stuff.At least there is to say that the V6 lions book
is available as pdf to throw light on the many weaknesses of original V6

Posted: Mon Jun 09, 2008 10:26 am
by Brynet-Inc
I suppose v7x86 is one of the smaller ones, others likely exist, but I'm not sure of them all.

v7x86 is a port of Unix v7 to the x86, the project name sorta implies that eh?. :)

http://www.nordier.com/v7x86/

Still, what are your requirements? OpenBSD has a fairly light base installation, a few hundred megabytes.

Posted: Mon Jun 09, 2008 10:40 am
by babylon2233
I'm wondering if the source code/binary of original UNIX (Unics) still exists today. It is a treasure.

Posted: Mon Jun 09, 2008 10:42 am
by Brynet-Inc
babylon2233 wrote:I'm wondering if the source code/binary of original UNIX (Unics) still exists today. It is a treasure.
Yes, ancient versions of Unix were released under a permissive licence.

http://www.tuhs.org/ --Great site..
http://minnie.tuhs.org/UnixTree/ --What you're looking for..

8)

Posted: Mon Jun 09, 2008 10:54 am
by babylon2233
Brynet-Inc wrote: http://minnie.tuhs.org/UnixTree/ --What you're looking for..
Is it "stuff from 1972" the first ever UNIX? I don't know about this before because I have read an article before saying the first PDP-7 UNIX(Unics) has lost.

Posted: Mon Jun 09, 2008 10:58 am
by Brynet-Inc
If you read that page, the 1972 stuff isn't entirely complete either... so, I honestly don't know the fate of earlier work.

Unix development started near the end of 1969, so it's safe to assume some of the initial work is lost.

I suspect the magnetic medium used at the time is damaged, or.. simply too old, perhaps even impossible to interface with a modern system to backup the data.

Still, it's interesting to see whatever is there.. at that time, everything was in assembly anyway.

Posted: Mon Jun 09, 2008 7:33 pm
by Telgin
I couldn't begin to imagine how small the smalles practical kernel these days might be, but I can certainly imagine it taking up only a few MB of RAM or less.

Especially if it had a spartan driver set, limited features like no networking, simple schedulers and allocators, and simplistic support for users, then it could be quite small.

Posted: Tue Jun 10, 2008 2:41 am
by Tootles
The earliest complete Unix source code is nSys, which I have on my website as a complete .zip archive, found here: http://monkey-hole.co.uk/files/os/download/UNIX_old.zip. That is about version 3, I think, and comes from '73.

The original UNICS was lost - and it was written in assembly language, anyway (PDP-7 cross-assembler, anyone?).

I'm not really needing anything more than the absolute bare minimum for it - just think it'd be nice to see exactly how small a UNIX can be.

Thanks.

Posted: Tue Jun 10, 2008 7:09 am
by Solar
Telgin wrote:I couldn't begin to imagine how small the smalles practical kernel these days might be, but I can certainly imagine it taking up only a few MB of RAM or less.
Count on it. The famous QNX demo disk gives you a Unicode-capable web browser including network functionality from a 1.44 MB floppy...

Posted: Tue Jun 10, 2008 8:48 am
by Brynet-Inc
Solar wrote:
Telgin wrote:I couldn't begin to imagine how small the smalles practical kernel these days might be, but I can certainly imagine it taking up only a few MB of RAM or less.
Count on it. The famous QNX demo disk gives you a Unicode-capable web browser including network functionality from a 1.44 MB floppy...
To be fair, if I remember correctly, it unpacked a ramdisk.

OpenBSD has a floppy image as well... uses a ramdisk, contains drivers for several Ethernet cards, and a dhcp client. (Among other things..).

Posted: Tue Jun 10, 2008 12:16 pm
by z180
The QNX demo disk is a working QNX 4.04 from 1999
and I think that it could be tweaked to run all programs
for 4.04 but it would involve programming and I dont know the API
and have no programming environment for QNX.
In 1973 the C compiler was improved and the UNIX devs
rewrote the V3 ~16 KB kernel in C and got a much bigger system.
The nsys kernel that monkey has on his page is a beta for V4
that is missing pipes,has a simpler buffer cache ,no nice(),no read only fs
and slightly different inodes and superblock structures.
In the UNIX archive you could find a hacked version that is compatible
with V5 FS and the V5 compiler and could be set up in an emu on
a v5 disk.

Re: Simplest/smallest UNIX-like system?

Posted: Tue Jun 10, 2008 3:48 pm
by bewing
toots wrote:Just wondering, how big might that be on an x86? I remember that the original PDP-7 version of UNICS required only 4KB of RAM.

I know UNIX 5 (PDP-11) needed about 32K or so, and the full installation took about 2.5M of space - my question is, could that be replicated on a modern machine? A UNIX-type system distrobution using minimal tools and drivers, and requiring almost no hardware to run - almost like a port of the PDP-11 version.
Yeah, V7 was certainly more OS than I ever needed. As I recall, the kernel was about 200K on my MC68000 based (8Mhz!) "super-micro" computer. My disk was 10M, and the whole OS, w/man pages, took up about a quarter of it. I never even used half the programs in the system. At least half of the 1M of RAM was still available.

The SVr4 kernel was more like 280K. My dad upgraded the system to a 40M disk, and 2M of RAM. I think the OS took about 8M off the disk, and maybe 750K of total system RAM.

My current OS uses about 40K of RAM for code (just barely self-hosting). The only reason I am using 9M of system RAM is to support huge numbers of running jobs. Those old UNIX-sized numbers are still easy to achieve. But you would have to limit the maximum functionality of the system, and there is no good reason to do that.

Posted: Tue Jun 10, 2008 8:27 pm
by OrOS
menuet is a good example of what can be accomplished with limited hardware