UNIX Time-Sharing System: UNIX Implementation
01 July 1978
UNIX Implementation By K. THOMPSON (Manuscript received December 5, 1977) This paper describes in high-level terms the implementation of the resident UNIX* kernel. This discussion is broken into three parts. The first part describes how the UNIX system views processes, users, and programs. The second part describes the I/O system. The last part describes the UNIX file system. I. INTRODUCTION The U N I X kernel consists of about 10,000 lines of C code and about 1,000 lines of assembly code. The assembly code can be further broken down into 200 lines included for the sake of efficiency (they could have been written in C) and 800 lines to perform hardware functions not possible in C. This code represents 5 to 10 percent of what has been lumped into the broad expression "the U N I X operating system." The kernel is the only U N I X code that cannot be substituted by a user to his own liking. For this reason, the kernel should make as few real decisions as possible. This does not mean to allow the user a million options to do the same thing. Rather, it means to allow only one way to do one thing, but have that way be the least-common divisor of all the options that might have been provided. What is or is not implemented in the kernel represents both a * UNIX is a t r a d e m a r k of Bell L a b o r a t o r i e s .