Memra

Three branches, one root, and why POSIX exists

◈ 5 cards

MULTICS to UNIX to System V, BSD and Linux; the three properties that made UNIX survive; and exactly what POSIX and the SUS do and do not fix.

One root

In the mid-1960s Bell Labs was part of a joint effort to build MULTICS, an ambitious time-sharing system that collapsed under its own complexity. Bell Labs withdrew. In 1969, Ken Thompson and Dennis Ritchie — with others at Bell Labs — built something much smaller on a cast-off DEC PDP-7, and later moved it to the PDP-11. The name UNIX is a joke at MULTICS's expense, and the design is a reaction to it: where MULTICS made a process an expensive, carefully-provisioned thing, UNIX made process creation cheap enough that a single user would spawn several without thinking about it.

Three properties, stated in that order, explain why this particular system outlived every contemporary:

  • It was rewritten in C rather than assembly, so it could be moved to a new processor by writing a compiler rather than a kernel.
  • It was distributed as source, so the people using it could change it — and universities did, at scale.
  • Cheap processes plus cheap interprocess communication made it composable: small tools joined by pipes, which is the design philosophy the rest of this course is built on.

Three branches

Research UNIX (editions 1–6) stayed inside Bell Labs. From it, two branches diverge and never fully reconverge:

  • The commercial branch: PWB, then System III, then System V (1983), then SVR4. Its living descendants are Solaris, AIX, HP-UX and UnixWare.
  • The academic branch: the Berkeley Software Distribution, 3BSD through 4.4BSD. Its living descendants are FreeBSD, OpenBSD, NetBSD, and Darwin — the core of macOS.

Linux (1991) belongs to neither. It is an independent implementation of the interface, written from scratch with no AT&T code in it, which is precisely why it could be given away. It is UNIX-like by behaviour and not UNIX by lineage, and — a fine distinction that catches people out — the name UNIX is a trademark licensed on certification against the Single UNIX Specification, not on ancestry. Systems that pay for and pass the certification may use the name; Linux distributions generally have not.

Worked example: one command, two spellings, and a standard

Trace a single command across the split. ps lists processes. It existed in Research UNIX; both branches then grew it, separately, in incompatible directions.

On the System V side the options take hyphens and combine: ps -ef means every process (-e) in full format (-f). On the BSD side the options historically take no hyphen at all: ps aux means all users' processes (a plus u for the user-oriented format) including those with no controlling terminal (x).

So: you are on a Solaris 11 box and you want every process. /usr/bin/ps there is the System V program and it wants ps -ef; type ps aux and it will reject aux as an unknown argument. You are on FreeBSD and you want the same thing: ps aux is native, and its ps also accepts -e for compatibility. You are on Linux, where ps comes from procps-ng and was deliberately written to swallow both dialects — which is why a Linux-only habit teaches you nothing about which spelling is portable.

And the portable answer, the one that runs on all three: ps -ef. POSIX specifies ps with hyphenated options including -e and -f, and says nothing at all about the BSD spelling.

What the standards actually fix

POSIX (IEEE) specifies the interfaces — the behaviour of system calls, library functions, the shell language, and a set of utilities with their options and exit statuses. It deliberately does not specify the implementation. Two conforming systems may share no source code and no internal design, and that is the point: the standard is a contract about what a program sees, so that a program written against it compiles and runs on both.

The Single UNIX Specification is the broader umbrella that POSIX has been folded into, maintained by the Austin Group — a joint effort of the IEEE, ISO/IEC JTC 1/SC 22, and The Open Group. Certification against the SUS is what licenses the name.

The practical consequence you will feel all term: a flag that works on one variant may not exist on another, and the divergence is not a bug anybody is going to fix. When you write a command line, know which variant you are writing it for.

MULTICSmid-1960s, abandonedcommercialacademicinterface onlyUNIX 1969Bell Labs, PDP-7Researcheditions 1-6System V 1983Solaris, AIX, HP-UXBSDFreeBSD, OpenBSD, macOSLinux 1991clean rewrite, no AT&T codethe name UNIX is licensed on SUS certification, not on ancestry
Solid descent is code descent. Linux hangs from the same node because it implements the same interface, not because it inherited a line of the source — which is exactly why it could be given away.
NORMAL ~/memra/learn/comp-325/unix-family-and-standards utf-8 LF