IT PAPER DEEP-READ · PAPER 33

The UNIX Time-Sharing System

Ken Thompson & Dennis Ritchie · Bell Labs · CACM 1974

中文 →

What did this paper do?

Almost everything you use today—your Mac, your iPhone, an Android phone, the Linux servers running the cloud—traces back to one small system: UNIX. Born at Bell Labs in 1969, it was first described to the world in this 1974 paper. It invented no dazzling new hardware. Instead it used a few extremely simple ideas that snap together to build an operating system small enough to fit on the cheap machines of the day, yet good enough to dominate the next half-century.

The pain of the old world

Before it, big operating systems (the flagship was Multics) tried to do everything—and ended up huge, complex, expensive, and hard to use. Worse: every kind of thing had its own special way of being used—one set of commands to read a disk, another for tape, yet another to talk to a printer. And programs couldn't easily be joined together to get work done.

A few humble ideas

UNIX's answer was "less is more," resting on just two or three moves.

Move one: everything is a file. Disk data, the keyboard, a printer, the screen—to the system they all look the same: like "a file." So one set of actions—open, read, write—operates on everything. It's like putting the same wall socket on every appliance in the house: no separate hookup to memorize for each device.

Move two: small tools plus a hose. UNIX encourages each program to do one thing and do it well, then gives you a "hose" (a pipe) that pours one program's output straight into the next program's input. To do something complex you don't write a big program—you snap small tools together like Lego, like joining hoses: "list who's logged in ┃ count the lines" counts online users in one line.

Move three: a tree of folders. Files live in folders nested inside folders, forming a tree. The nested folders you click through on your computer today came from here.

What it gave us

Together these moves make a system that is small, general, and able to grow new powers on its own: want a new feature? Write another small tool and snap it into a pipeline—no need to touch the system itself. That "freely combine small, orthogonal parts" style was so successful that nearly every operating system today inherits it, and the C language UNIX invented for itself became the lingua franca of programming. One honest cost: its permission model is very plain (just a few read/write flags), too coarse for today's endlessly networked world—security has had to be layered on top by later hands.

Remember this one line

UNIX took a few minimal ideas—everything is a file, small tools freely joined by pipes, a tree of folders—and built an OS small enough for cheap hardware yet general enough to combine endlessly. Today's Linux, macOS, Android, and iOS are all its descendants in spirit.

Want the file-system diagram, the fork/pipe mechanics, and what exactly was new? → Switch to the deep read