in kernel · programacion · simh · unix

Learn how an operating system works with Unix Version 6

Unix 6th Edition was one of the most popular development versions to come out of Bell Labs.

It is not really news, but it is for your ineffable editor. Before, to be able to run this operating system it was necessary to do it through an emulator. Now, thanks to the MIT Operating Systems class, we can run it natively on x86 architectures.

The best thing about it is that it is small, and it takes us back to times when people could read and understand the code of their operating system.

# cat *.c  wc -l
6384
cat *.h  wc -l
1019
cat *.S  wc -l
311

It literally takes 4.5 seconds to compile it all and build a root/boot disk image on a P4 at 1.5Ghz

Platforms

These are the platforms on which Unix v6 is known to work.

PDP-11

PDP-11 , which was the main platform on which Unix v6 was written. All the other v6 versions derive from this one.

Interdata 8/32

Interdata 8/32 was the first 32-bit platform to which it was ported outside Bell Labs.

Intel 80286

There is a port made by Szigeti Szabolcs to the Intel 80286 architecture, which is available in the Unix Archive under the Other/V6on286 directory. It needs MS-DOS to work.

i386

There is a 32bit port to the x86 cpu architecture, called xv6 and used by MIT for a course on Operating Systems: http://pdos.csail.mit.edu/6.828/2006/index.html

You can download the sources from: http://pdos.csail.mit.edu/6.828/2006/src/xv6-rev0.tar.gz

Folk Lore

The Lions Book

v6 Unix became famous thanks to the book called «Lions book«. John Lions ( biography: http://en.wikipedia.org/wiki/John_Lions ) wrote an excellent dissection of the Unix kernel, and taught it during his classes on Operating Systems. The book became *THE* fundamental guide to learn how unix works inside, and this book has been photocopied over and over again ever since …

v6 is also important because it was the first unix port that was not made by AT&T, when it was ported to Interdata 32b.

v6 in turn included more documentation than v6, and included gems such as Programming in C -A Tutorial.

Games

The situation of the games did not change much from v5 to v6. These were the available games:

bj
chess
cubic
moo
ttt
wump

How do I make it work?

You will need an image of the tapes, an emulator or a PDP-11/Interdata 32b. SIMH is recommended. You can get v6 by looking for «uv6swre.zip» and «iu6swre.zip», which are the PDP-11 and Interdata versions respectively.

See also:

There is a series of interesting readings about SIMH and v6 that you can find at:

And since one must give Caesar what is Caesar’s:

Original articles in English: