Simplest/smallest UNIX-like system?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
User avatar
Tootles
Posts: 15
Joined: Tue Jan 15, 2008 5:23 am

Simplest/smallest UNIX-like system?

Post 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.
Have a day.
svdmeer
Member
Member
Posts: 87
Joined: Tue May 06, 2008 9:32 am
Location: The Netherlands

Post 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.
z180
Member
Member
Posts: 32
Joined: Tue Mar 04, 2008 12:32 pm

Post 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
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
babylon2233
Member
Member
Posts: 66
Joined: Fri May 23, 2008 5:30 pm
Location: Malaysia

Post by babylon2233 »

I'm wondering if the source code/binary of original UNIX (Unics) still exists today. It is a treasure.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
babylon2233
Member
Member
Posts: 66
Joined: Fri May 23, 2008 5:30 pm
Location: Malaysia

Post 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.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Telgin
Member
Member
Posts: 72
Joined: Thu Dec 20, 2007 1:45 pm

Post 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.
User avatar
Tootles
Posts: 15
Joined: Tue Jan 15, 2008 5:23 am

Post 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.
Have a day.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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...
Every good solution is obvious once you've found it.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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..).
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
z180
Member
Member
Posts: 32
Joined: Tue Mar 04, 2008 12:32 pm

Post 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.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: Simplest/smallest UNIX-like system?

Post 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.
OrOS
Member
Member
Posts: 143
Joined: Sat Sep 08, 2007 11:26 pm
Location: Canada

Post by OrOS »

menuet is a good example of what can be accomplished with limited hardware
Post Reply