Starting from the 1970 PDP-7 Unix version (2489 lines of kernel code and 9095 lines of programs; all written in assembly language), we studied main Unix releases leading to the FreeBSD lineage (currently more than 20 million lines of code).
Along those releases we examined core architectural design decisions, the number of features, and code complexity. We did that based on the analysis of the following:
Growth in size has been uniform, with some notable outliers, while cyclomatic complexity has been religiously safeguarded.
The rate of architectural innovation has slowed down over the system’s lifetime.
Architectural technical debt has accrued in the forms of functionality duplication and unused facilities, but in terms of cyclomatic complexity it is systematically being paid back through what appears to be a self-correcting process. Some unsung architectural forces that shaped Unix are:
- the emphasis on conventions over rigid enforcement (think of documented file formats or environment variables),
- the drive for portability (nowadays Unix runs on systems ranging from the $15 Raspberry Pi Zero to supercomputers),
- a sophisticated ecosystem of other operating systems and development organizations (we documented millions of code lines coming from third-party subsystems and more than ten third-party contributors), and
- the emergence of a federated architecture, often through the adoption of third-party subsystems.