Connect with us


The UNIX Time-Sharing System – Sasank’s Blog

Mish Boyka




NOTE: This is not my article. This is a classic paper originally published in Communications of the ACM, 1974 by Dennis M. Ritchie and Ken Thompson. Blue highlights/annotations are my own.


UNIX is a general-purpose, multi-user, interactive operating system for the Digital Equipment Corporation PDP-11/40 and 11/45 computers. It offers a number of features seldom found even in larger operating systems, including: (1) a hierarchical file system incorporating demountable volumes; (2) compatible file, device, and inter-process I/O; (3) the ability to initiate asynchronous processes; (4) system command language select-able on a per-user basis; and (5) over 100 subsystems including a dozen languages. This paper discusses the nature and implementation of the file system and of the user command interface.

1. Introduction

There have been three versions of UNIX. The earliest version (circa 1969–70) ran on the Digital Equipment Corporation PDP-7 and -9 computers. The second version ran on the unprotected PDP-11/20 computer. This paper describes only the PDP-11/40 and /45 [l] system since it is more modern and many of the differences between it and older UNIX systems result from redesign of features found to be deficient or lacking.

Since PDP-11 UNIX became operational in February 1971, about 40 installations have been put into service; they are generally smaller than the system described here. Most of them are engaged in applications such as the preparation and formatting of patent applications and other textual material, the collection and processing of trouble data from various switching machines within the Bell System, and recording and checking telephone service orders. Our own installation is used mainly for research in operating systems, languages, computer networks, and other topics in computer science, and also for document preparation.

Perhaps the most important achievement of UNIX is to demonstrate that a powerful operating system for interactive use need not be expensive either in equipment or in human effort: UNIX can run on hardware costing as little as $40,000, and less than two man years were spent on the main system software. Yet UNIX contains a number of features seldom offered even in much larger systems. It is hoped, however, the users of UNIX will find that the most important characteristics of the system are its simplicity, elegance, and ease of use.

The most important achievement of UNIX is to demonstrate that a powerful operating system need not be expensive either in equipment or in human effort.
However, the users of UNIX will find that the most important characteristics of the system are its simplicity, elegance, and ease of use.

Besides the system proper, the major programs available under UNIX are: assembler, text editor based on QED[2], linking loader, symbolic debugger, compiler for a language resembling BCPL[3] with types and structures (C), interpreter for a dialect of BASIC, text formatting program, Fortran compiler, Snobol interpreter, top-down compiler-compiler (TMG) [4], bottom-up compiler-compiler (YACC), form letter generator, macro processor (M6) [5], and permuted index program.

There is also a host of maintenance, utility, recreation, and novelty programs. All of these programs were written locally. It is worth noting that the system is totally self-supporting. All UNIX software is maintained under UNIX; likewise, UNIX documents are generated and formatted by the UNIX editor and text formatting program.

2. Hardware and Software Environment

The PDP-11/45 on which our UNIX installation is implemented is a 16-bit word (8-bit byte) computer with 144 Kbytes of core memory; UNIX occupies 42K bytes. This system, however, includes a very large number of device drivers and enjoys a generous allotment of space for I/O buffers and system tables; a minimal system capable of running the software mentioned above can require as little as 50K bytes of core altogether.

The PDP-11 has a 1M byte fixed-head disk, used for filesystem storage and swapping, four moving-head disk drives which each provide 2.5M bytes on removable disk cartridges, and a single moving-head disk drive which uses removable 40M byte disk packs. There are also a high-speed paper tape reader-punch, nine-track magnetic tape,and D-tape (a variety of magnetic tape facility in which individual records may be addressed and rewritten). Besides the console typewriter, there are 14 variable-speed communications interfaces attached to 100-series datasets and a 201 dataset interface used primarily for spooling printout to a communal line printer. There are also several one-of-a-kind devices including a Picturephone® interface,a voice response unit, a voice synthesizer, a phototypesetter, a digital switching network, and a satellite PDP-11/20 which generates vectors, curves, and characters on a Tektronix 611 storage-tube display.

The greater part of UNIX software is written in the above-mentioned C language [6]. Early versions of the operating system were written in assembly language, but during the summer of 1973, it was rewritten in C. The size of the new system is about one third greater than the old. Since the new system is not only much easier to understand and to modify but also includes many functional improvements, including multiprogramming and the ability to share reentrant code among several user programs, we considered this increase in size quite acceptable.

3. The File System

S: Note how the paper considers files important. Unix exposes all the functionality through files.

The most important job of UNIX is to provide a file system. From the point of view of the user, there are three kinds of files: ordinary disk files, directories, and special files

3.1 Ordinary Files

A file contains whatever information the user places on it, for example symbolic or binary (object) programs. No particular structuring is expected by the system. Files of text consist simply of a string of characters, with lines demarcated by the new-line character. Binary programs are sequences of words as they will appear in core memory when the program starts executing. A few user programs manipulate files with more structure: the assembler generates and the loader expects an object file in a particular format. However, the structure of files is controlled by the programs which use them, not by the system.

A file contains whatever information the user places on it, for example symbolic or binary (object) programs. No particular structuring is expected by the system.

3.2 Directories

Directories provide the mapping between the names of files and the files themselves, and thus induce a structure on the file system as a whole. Each user has a directory of his own files; he may also create subdirectories to contain groups of files conveniently treated together. A directory behaves exactly like an ordinary file except that it cannot be written on by unprivileged programs, so that the system controls the contents of directories. However, anyone with appropriate permission may read a directory just like any other file.

Directories provide the mapping between the names of files and the files themselves, and thus induce a structure on the file system as a whole.

The system maintains several directories for its own use. One of these is the root directory. All files in the system can be found by tracing a path through a chain of directories until the desired file is reached. The starting point for such searches is often the root. Another system directory contains all the programs provided for general use; that is, all the commands. As will be seen however, it is by no means necessary that a program reside in this directory for it to be executed.

S: This is a succinct description of path system of unix and Linux

Files are named by sequences of 14 or fewer characters. When the name of a file is specified to the system, it may be in the form of a path name, which is a sequence of directory names separated by slashes / and ending in a file name. If the sequence begins with a slash, the search begins in the root directory. The name /alpha/beta/gamma causes the system to search the root for directory alpha, then to search alpha for beta, finally to find gamma in beta. gamma may be an ordinary file, a directory, or a special file. As a limiting case, the name / refers to the root itself.

A path name not starting with / causes the system to begin the search in the user’s current directory. Thus, the name alpha/beta specifies the file named beta in subdirectory alpha of the current directory. The simplest kind of name, for example alpha, refers to a file which itself is found in the current directory. As another limiting case, the null file name refers to the current directory.

The same nondirectory file may appear in several directories under possibly different names. This feature is called linking; a directory entry for a file is sometimes called a link. UNIX differs from other systems in which linking is permitted in that all links to a file have equal status. That is, a file does not exist within a particular directory; the directory entry for a file consists merely of its name and a pointer to the information actually describing the file. Thus a file exists independently of any directory entry, although in practice a file is made to disappear along with the last link to it.

UNIX differs from other systems in which linking is permitted in that all links to a file have equal status.

Each directory always has at least two entries. The name in each directory refers to the directory itself. Thus a program may read the current directory under the name . without knowing its complete path name. The name .. by convention refers to the parent of the directory in which it appears, that is, to the directory in which it was created.

The directory structure is constrained to have the form of a rooted tree. Except for the special entries . and .., each directory must appear as an entry in exactly one other,which is its parent. Te reason for this is to simplify the writing of programs which visit subtrees of the directory structure, and more important, to avoid the separation of portions of the hierarchy. If arbitrary links to directories were permitted, it would be quite difficult to detect when the last connection from the root to a directory was severed.

The directory structure is constrained to have the form of a rooted tree.

3.3 Special Files

Special files constitute the most unusual feature of the UNIX file system. Each I/O device supported by UNIX is associated with at least one such file. Special files are read and written just like ordinary disk files, but requests to read or write result in activation of the associated device. An entry for each special file resides in directory /dev, although a link may be made to one of these files just like an ordinary file. Thus, for example, to punch paper tape, one may write on the file /dev/ppt. Special files exist for each communication line, each disk, each tape drive, and for physical core memory. Of course, the active disks and the core special file are protected from indiscriminate access.

Special files constitute the most unusual feature of the UNIX file system. Each I/O device supported by UNIX is associated with at least one such file.

There is a threefold advantage in treating I/O devices this way: file and device I/O are as similar as possible; file and device names have the same syntax and meaning, so that a program expecting a file name as a parameter can be passed a device name; finally, special files are subject to the same protection mechanism as regular files.

3.4 Removable File Systems

Although the root of the file system is always stored on the same device, it is not necessary that the entire file system hierarchy reside on this device. There is a mount system request which has two arguments: the name of an existing ordinary file, and the name of a direct-access special file whose associated storage volume (e.g. disk pack) should have the structure of an independent file system containing its own directory hierarchy. The effect of mount is to cause references to the heretofore ordinary file to refer instead to the root directory of the file system on the removable volume. In effect, mount replaces a leaf of the hierarchy tree (the ordinary file) by a whole new subtree (the hierarchy stored on the removable volume). After the mount, there is virtually no distinction between files on the removable volume and those in the permanent file system. In our installation, for example, the root directory resides on the fixed-head disk, and the large disk drive, which contains user’s files, is mounted by the system initialization program, the four smaller disk drives are available to users for mounting their own disk packs. A mountable file system is generated by writing on its corresponding special file. A utility program is available to create an empty file system, or one may simply copy an existing file system.

The effect of mount is to cause references to the heretofore ordinary file to refer instead to the root directory of the file system on the removable volume.

There is only one exception to the rule of identical treatment of files on different devices: no link may exist between one file system hierarchy and another. This restriction is enforced so as to avoid the elaborate bookkeeping which would otherwise be required to assure removal of the links when the removable volume is finally dismounted. In particular, in the root directories of all file systems, removable or not, the name .. refers to the directory itself instead of to its parent.

3.5 Protection

Although the access control scheme in UNIX is quite simple, it has some unusual features. Each user of the system is assigned a unique user identification number. When a file is created, it is marked with the user ID of its owner. Also given for new files is a set of seven protection bits. Six of these specify independently read, write, and execute permission for the owner of the file and for all other users.

If the seventh bit is on, the system will temporarily change the user identification of the current user to that of the creator of the file whenever the file is executed as a program. This change in user ID is effective only during the execution of the program which calls for it. The set-user-ID feature provides for privileged programs which may use files inaccessible to other users. For example, a program may keep an accounting file which should neither be read nor changed except by the program itself. If the set-user-identification bit is on for the program, it may access the file although this access might be forbidden to other programs invoked by the given program’s user. Since the actual user ID of the invoker of any program is always available, set-user-ID programs may take any measures desired to satisfy themselves as to their invoker’s credentials. This mechanism is used to allow users to execute the carefully written commands which call privileged system entries. For example, there is a system entry invocable only by the “super-user” (below) which creates an empty directory. As indicated above, directories are expected to have entries for . and .. . The command which creates a directory is owned by the superuser and has the set-user-ID bitset. After it checks its invoker’s authorization to create the specified directory, it creates it and makes the entries for . and .. .

Since anyone may set the set-user-ID bit on one of his own files, this mechanism is generally available without administrative intervention. For example, this protection scheme easily solves the MOO accounting problem posed in [7].

The system recognizes one particular user ID (that of the “super-user”) as exempt from the usual constraints on file access; thus (for example) programs may be written to dump and reload the file system without unwanted interference from the protection system.

3.6 I/O Calls

The system calls to do I/O are designed to eliminate the differences between the various devices and styles of access. There is no distinction between “random” and sequential I/O, nor is any logical record size imposed by the system. The size of an ordinary file is determined by the highest byte written on it; no predetermination of the size of a file is necessary or possible.

There is no distinction between “random” and sequential I/O, nor is any logical record size imposed by the system.

To illustrate the essentials of I/O in UNIX, Some of the basic calls are summarized below in an anonymous language which will indicate the required parameters without getting into the complexities of machine language programming. Each call to the system may potentially result in an error return, which for simplicity is not represented in the calling sequence.

To read or write a file assumed to exist already, it must be opened by the following call:

filep = open(name, flag)

name indicates the name of the file. An arbitrary path name may be given. The flag argument indicates whether the file is to be read, written, or “updated”, that is read and written simultaneously.

The returned value filep is called a file descriptor. It is a small integer used to identify the file in subsequent calls to read, write, or otherwise manipulate it.

To create a new file or completely rewrite an old one, there is a create system call which creates the given file if it does not exist, or truncates it to zero length if it does exist. create also opens the new file for writing and, like open, returns a file descriptor.

There are no user-visible locks in the file system, nor is there any restriction on the number of users who may have a file open for reading or writing; although it is possible for the contents of a file to become scrambled when two users write on it simultaneously, in practice, difficulties do not arise. We take the view that locks are neither necessary nor sufficient, in our environment, to prevent interference between users of the same file. They are unnecessary because we are not faced with large, single-file data bases maintained by independent processes. They are insufficient because locks in the ordinary sense, whereby one user is prevented from writing on a file which another user is reading, cannot prevent confusion when, for example, both users are editing a file with an editor which makes a copy of the file being edited.

It should be said that the system has sufficient internal interlocks to maintain the logical consistency of the file system when two users engage simultaneously in such inconvenient activities as writing on the same file, creating files in the same directory or deleting each other’s open files.

Except as indicated below, reading and writing are sequential. This means that if a particular byte in the file was the last byte written (or read), the next I/O call implicitly refers to the first following byte. For each open file there is a pointer, maintained by the system, which indicates the next byte to be read or written. If n bytes are read or written, the pointer advances by n bytes.

Once a file is open, the following calls may be used:

n = read(filep, buffer, count)
n = write(filep, buffer, count)

Up to count bytes are transmitted between the file specified by filep and the byte array specified by buffer. The returned value n is the number of bytes actually transmitted. In the write case, n is the same as count except under exceptional conditions like I/O errors or end of physical medium on special files; in a read, however, n may without error be less than count. If the read pointer is so near the end of the file that reading count characters would cause reading beyond the end, only sufficient bytes are transmitted to reach the end of the file; also, typewriter-like devices never return more than one line of input. When a read call returns with n equal to zero, it indicates the end of the file. For disk files this occurs when the read pointer becomes equal to the current size of the file. It is possible to generate an end-of-file from a typewriter by use of an escape sequence which depends on the device used.

Bytes written on a file affect only those implied by the position of the write pointer and the count; no other part of the file is changed. If the last byte lies beyond the end of the file, the file is grown as needed.

To do random (direct access) I/O, it is only necessary to move the read or write pointer to the appropriate location in the file:

location = seek(filep, base, offset)

The pointer associated with filep is moved to a position offset bytes from the beginning of the file, from the current position of the pointer, or from the end of the file, depending on base. offset may be negative. For some devices (e.g. paper tape and typewriters) seek calls are ignored. The actual offset from the beginning of the file to which the pointer was moved is returned in location.

3.6.1: Other I/O Calls: There are several additional system entries having to do with I/O and with the file system which will not be discussed. For example: close a file, get the status of a file, change the protection mode or the owner of a file, create a directory, make a link to an existing file, delete a file.

4. Implementation of the File System

S: Implementation of a toy file system (in rust?) makes for an illustrative exercise. Nice blog idea!

As mentioned in §3.2 above, a directory entry contains only a name for the associated file and a pointer to the file itself. This pointer is an integer called the i-number (for index number) of the file. When the file is accessed, its i-number is used as an index into a system table (the i-list) stored in a known part of the device on which the directory resides. The entry thereby found (the file’s i-node) contains the description of the file as follows.

  1. Its owner.
  2. Its protection bits.
  3. The physical disk or tape addresses for the file contents.
  4. Its size.
  5. Time of last modification.
  6. The number of links to the file, that is, the number of times it appears in a directory.
  7. A bit indicating whether the file is a directory.
  8. A bit indicating whether the file is a special file.
  9. A bit indicating whether the file is “large” or “small.”

The purpose of an open or create system call is to turn the path name given by the user into an i-number by searching the explicitly or implicitly named directories. Once a file is open, its device, i-number, and read/write pointer are stored in a system table indexed by the file descriptor returned by the open or create. Thus the file descriptor supplied during a subsequent call to read or write the file may be easily related to the information necessary to access the file.

The purpose of an open or create system call is to turn the path name given by the user into an i-number by searching the explicitly or implicitly named directories

When a new file is created, an i-node is allocated for it and a directory entry is made which contains the name of the file and the i-node number. Making a link to an existing file involves creating a directory entry with the new name, copying the i-number from the original file entry, and incrementing the link-count field of the i-node. Removing (deleting) a file is done by decrementing the link-count of the i-node specified by its directory entry and erasing the directory entry. If the link-count drops to 0, any disk blocks in the file are freed and the i-node is deallocated.

The space on all fixed or removable disks which contain a file system is divided into a number of 512-byte blocks logically addressed from 0 up to a limit which depends on the device. There is space in the i-node of each file for eight device addresses. A small (nonspecial) file fits into eight or fewer blocks; in this case the addresses of the blocks themselves are stored. For large (nonspecial) files, each of the eight device addresses may point to an indirect block of 256 addresses of blocks constituting the file itself. These files may be as large as 8⋅256⋅512, or l,048,576 (220) bytes.

The foregoing discussion applies to ordinary files. When an I/O request is made to a file whose i-node indicates that it is special, the last seven device address words are immaterial, and the list is interpreted as a pair of bytes which constitute an internal device name. These bytes specify respectively a device type and subdevice number. The device type indicates which system routine will deal with I/O on that device; the subdevice number selects, for example, a disk drive attached to a particular controller or one of several similar typewriter interfaces.

In this environment, the implementation of the mount system call (§3.4) is quite straightforward. mount maintains a system table whose argument is the i-number and device name of the ordinary file specified during the mount, and whose corresponding value is the device name of the indicated special file. This table is searched for each (i-number, device)-pair which turns up while a path name is being scanned during an open or create; if a match is found, the i-number is replaced by 1 (which is the i-number of the root directory on all file systems), and the device name is replaced by the table value.

To the user, both reading and writing of files appear to be synchronous and unbuffered. That is immediately after return from a read call the data are available, and conversely after a write the user’s workspace may be reused. In fact the system maintains a rather complicated buffering mechanism which reduces greatly the number of I/O operations required to access a file. Suppose a write call is made specifying transmission of a single byte.

To the user, both reading and writing of files appear to be synchronous and unbuffered.

UNIX will search its buffers to see whether the affected disk block currently resides in core memory; if not, it will be read in from the device. Then the affected byte is replaced in the buffer, and an entry is made in a list of blocks to be written. The return from the write call may then take place, although the actual I/O may not be completed until a later time. Conversely, if a single byte is read, the system determines whether the secondary storage block in which the byte is located is already in one of the system’s buffers; if so, the byte can be returned immediately. If not, the block is read into a buffer and the byte picked out.

A program which reads or writes files in units of 512 bytes has an advantage over a program which reads or writes a single byte at a time, but the gain is not immense; it comes mainly from the avoidance of system overhead. A program which is used rarely or which does no great volume of I/O may quite reasonably read and write in units as small as it wishes.

The notion of the i-list is an unusual feature of UNIX. In practice, this method of organizing the file system has proved quite reliable and easy to deal with. To the system itself, one of its strengths is the fact that each file has a short, unambiguous name which is related in a simple way to the protection, addressing, and other information needed to access the file. It also permits a quite simple and rapid algorithm for checking the consistency of a file system, for example verification that the portions of each device containing useful information and those free to be allocated are disjoint and together exhaust the space on the device. This algorithm is independent of the directory hierarchy, since it need only scan the linearly-organized i-list. At the same time the notion of the i-list induces certain peculiarities not found in other file system organizations. For example, there is the question of who is to be charged for the space a file occupies, since all directory entries for a file have equal status. Charging the owner of a file is unfair, in general, since one user may create a file, another may link to it, and the first user may delete the file. The first user is still the owner of the file, but it should be charged to the second user. The simplest reasonably fair algorithm seems to be to spread the charges equally among users who have links to a file. The current version of UNIX avoids the issue by not charging any fees at all.

4.1 Efficiency of the File System

To provide an indication of the overall efficiency of UNIX and of the file system in particular, timings were made of the assembly of a 7621-line program. The assembly was run alone on the machine; the total clock time was 35.9 sec, for a rate of 212 lines per sec. The time was divided as follows: 63.5 percent assembler execution time, 16.5 percent system overhead, 20.0 percent disk wait time. We will not attempt any interpretation of these figures nor any comparison with other systems, but merely note that we are generally satisfied with the overall performance of the system.

We will not attempt any interpretation of these figures nor any comparison with other systems, but merely note that we are generally satisfied with the overall performance of the system.

5. Processes and Images

An image is a computer execution environment. It includes a core image, general register values, status of open files, current directory, and the like. An image is the current state of a pseudo computer.

A process is the execution of an image. While the processor is executing on behalf of a process, the image must reside in core; during the execution of other processes it remains in core unless the appearance of an active, higher-priority process forces it to be swapped out to the fixed-head disk.

An image is a computer execution environment

A process is the execution of an image.

The user-core part of an image is divided into three logical segments. The program text segment begins at location 0 in the virtual address space. During execution, this segment is write-protected and a single copy of it is shared among all processes executing the same program. At the first 8K byte boundary above the program text segment in the virtual address space begins a non-shared, writable data segment, the size of which may be extended by a system call. Starting at the highest address in the virtual address space is a stack segment, which automatically grows downward as the hardware’s stack pointer fluctuates.

5.1 Processes

Except while UNIX is bootstrapping itself into operation, a new process can come into existence only by use of the fork system call:

processid = fork(label)

When fork is executed by a process, it splits into two independently executing processes. The two processes have independent copies of the original core image, and share any open files. The new processes differ only in that one is considered the parent process: in the parent, control returns directly from the fork, while in the child, control is passed to location label. The processid returned by the fork call is the identification of the other process.

When fork is executed by a process, it splits into two independently executing processes. The two processes have independent copies of the original core image, and share any open files.

Because the return points in the parent and child process are not the same, each image existing after a fork may determine whether it is the parent or child process.

5.2 Pipes

Processes may communicate with related processes using the same system read and write calls that are used for file system I/O. The call

returns a file descriptor filep and creates an interprocess channel called a pipe. This channel, like other open flies, is passed from parent to child process in the image by the fork call. A read using a pipe file descriptor waits until another process writes using the file descriptor for the same pipe. At this point, data are passed between the images of the two processes. Neither process need know that a pipe, rather than an ordinary file, is involved.

Although interprocess communication via pipes is a quite valuable tool (see §6.2), it is not a completely general mechanism since the pipe must be set up by a common ancestor of the processes involved.

5.3 Execution of Programs

Another major system primitive is invoked by

execute(file, arg1, arg2, ..., argn)

which requests the system to read in and execute the program named by file, passing it string arguments arg1, arg2,…, argn. Ordinarily, arg1 should be the same string as file, so that the program may determine the name by which it was invoked. All the code and data in the process using execute is replaced from the file, but open files, current directory, and interprocess relationships are unaltered. Only if the call fails, for example because file could not be found or because its execute-permission bit was not set, does a return take place from the execute primitive; it resembles a “jump” machine instruction rather than a subroutine call.

5.4 Process Synchronization

Another process control system call

processid = wait()

causes its caller to suspend execution until one of its children has completed execution. Then wait returns the processid of the terminated process. An error return is taken if the calling process has no descendants. Certain status from the child process is also available. wait may also present status from a grandchild or more distant ancestor; see §5.5.

5.5 Termination


terminates a process, destroys its image, closes its open files, and generally obliterates it. When the parent is notified through the wait primitive, the indicated status is available to the parent; if the parent has already terminated, the status is available to the grandparent, and so on. Processes may also terminate as a result of various illegal actions or user-generated signals (§7 below).

6. The Shell

For most users, communication with UNIX is carried on with the aid of a program called the Shell. The Shell is a command line interpreter: it reads lines typed by the user and interprets them as requests to execute other programs. In simplest form, a command line consists of the command name followed by arguments to the command, all separated by spaces:

command arg1 arg2 ... argn

The Shell is a command line interpreter: it reads lines typed by the user and interprets them as requests to execute other programs.

The Shell splits up the command name and the arguments into separate strings. Then a file with name command is sought; command may be a path name including the / character to specify any file in the system. If command is found, it is brought into core and executed. The arguments collected by the Shell are accessible to the command. When the command is finished, the Shell resumes its own execution, and indicates its readiness to accept another command by typing a prompt character.

If file command cannot be found, the Shell prefixes the string /bin/ to command and attempts again to find the file. Directory /bin contains all the commands intended to be generally used.

6.1 Standard I/O

S: Discussion of stdout, stdin and stderr follows.

The discussion of I/O in §3 above seems to imply that every file used by a program must be opened or created by the program in order to get a file descriptor for the file. Programs executed by the Shell, however, start off with two open files which have file descriptors 0 and 1. As such a program begins execution, file 1 is open for writing, and is best understood as the standard output file. Except under circumstances indicated below, this file is the user’s typewriter. Thus programs which wish to write informative or diagnostic information ordinarily use file descriptor 1. Conversely, file 0 starts off open for reading, and programs which wish to read messages typed by the user usually read this file.

Programs executed by the Shell, however, start off with two open files which have file descriptors 0 and 1.

S: Redirection and filering are some of the best features on the Unix. These are easily implemented thanks to UNIX’s choice to consider every I/O as file.

The Shell is able to change the standard assignments of these file descriptors from the user’s typewriter printer and keyboard. If one of the arguments to a command is prefixed by >, file descriptor 1 will, for the duration of the command, refer to the file named after the >. For example,

ordinarily lists, on the typewriter, the names of the files in the current directory. The command

creates a file called there and places the listing there. Thus the argument >there means, “place output on there.” On the other hand,

ordinarily enters the editor, which takes requests from the user via his typewriter. The command

interprets script as a file of editor commands; thus <script means, “take input from script.”

Although the file name following < or > appears to be an argument to the command, in fact it is interpreted completely by the Shell and is not passed to the command at all. Thus no special coding to handle I/O redirection is needed within each command; the command need merely use the standard file descriptors 0 and 1 where appropriate.

6.2 Filters

An extension of the standard I/O notion is used to direct output from one command to the input of another. A sequence of commands separated by vertical bars causes the Shell to execute all the commands simultaneously and to arrange that the standard output of each command be delivered to the standard input of the next command in the sequence. Thus in the command line

ls lists the names of the files in the current directory; its output is passed to pr, which paginates its input with dated headings. The argument –2 means double column. Likewise the output from pr is input to opr. This commands pools its input onto a file for off-line printing.

This process could have been carried out more clumsily by

ls >temp1
pr –2 <temp1 >temp2
opr <temp2

followed by removal of the temporary files. In the absence of the ability to redirect output and input, a still clumsier method would have been to require the ls command to accept user requests to paginate its output, to print in multi-column format, and to arrange that its output be delivered off-line. Actually it would be surprising, and in fact unwise for efficiency reasons, to expect authors of commands such as ls to provide such a wide variety of output options.

A program such as pr which copies its standard input to its standard output (with processing) is called a filter. Some filters which we have found useful perform character transliteration, sorting of the input, and encryption and decryption.

6.3 Command Separators: Multitasking

Another feature provided by the Shell is relatively straightforward. Commands need not be on different lines;instead they may be separated by semicolons.

will first list the contents of the current directory, then enter the editor.

A related feature is more interesting. If a command is followed by &, the Shell will not wait for the command to finish before prompting again; instead, it is ready immediately to accept a new command. For example,

causes source to be assembled, with diagnostic output going to output; no matter how long the assembly takes, the Shell returns immediately. When the Shell does not wait for the completion of a command, the identification of the process running that command is printed. This identification may be used to wait for the completion of the command or to terminate it. The & may be used several times in a line:

as source >output & ls >files &

does both the assembly and the listing in the background. In the examples above using &, an output file other than the typewriter was provided; if this had not been done, the outputs of the various commands would have been intermingled.

The Shell also allows parentheses in the above operations. For example,

prints the current date and time followed by a list of the current directory onto the file x. The Shell also returns immediately for another request.

6.4 The Shell as a Command: Command files

S: Description of awesome shell scripts follows.

The Shell is itself a command, and may be called recursively. Suppose file tryout contains the lines

as source
mv a.out testprog

The mv command causes the file a.out to be renamed testprog. a.out is the (binary) output of the assembler, ready to be executed. Thus if the three lines above were typed on the console, source would be assembled, the resulting program named testprog, and testprog executed. When the lines are in tryout, the command

would cause the Shell sh to execute the commands sequentially.

The Shell has further capabilities, including the ability to substitute parameters and to construct argument lists from a specified subset of the file names in a directory. It is also possible to execute commands conditionally on character string comparisons or on existence of given files and to perform transfers of control within filed command sequences.

6.5 Implementation of the Shell

S: Shell’s implementation is remarkably simple thanks to the design choices described earlier in the paper.

The outline of the operation of the Shell can now be understood. Most of the time, the Shell is waiting for the user to type a command. When the new-line character ending the line is typed, the Shell’s read call returns. The Shell analyzes the command line, putting the arguments in a form appropriate for execute. Then fork is called. The child process, whose code of course is still that of the Shell, attempts to perform an execute with the appropriate arguments. If successful, this will bring in and start execution of the program whose name was given. Meanwhile, the other process resulting from the fork, which is the parent process, waits for the child process to die. When this happens, the Shell knows the command is finished, so it types its prompt and reads the typewriter to obtain another command.

Given this framework, the implementation of background processes is trivial; whenever a command line contains &, the Shell merely refrains from waiting for the process which it created to execute the command.

Happily, all of this mechanism meshes very nicely with the notion of standard input and output files. When a process is created by the fork primitive, it inherits not only the core image of its parent but also all the files currently open in its parent, including those with file descriptors 0 and 1. The Shell, of course, uses these files to read command lines and to write its prompts and diagnostics, and in the ordinary case its children — the command programs — inherit them automatically. When an argument with < or > is given however, the offspring process, just before it performs execute, makes the standard I/O file descriptor 0 or 1 respectively refer to the named file. This is easy because, by agreement, the smallest unused file descriptor is assigned when a new file is opened (or created); it is only necessary to close file 0 (or 1) and open the named file. Because the process in which the command program runs simply terminates when it is through, the association between a file specified after < or > and file descriptor 0 or 1 is ended automatically when the process dies. Therefore the Shell need not know the actual names of the files which are its own standard input and output since it need never reopen them.

Filters are straightforward extensions of standard I/O redirection with pipes used instead of files.

In ordinary circumstances, the main loop of the Shell never terminates. (The main loop includes that branch of the return from fork belonging to the parent process; that is, the branch which does a wait, then reads another command line.) The one thing which causes the Shell to terminate is discovering an end-of-file condition on its input file. Thus when the Shell is executed as a command with a given input file, as in

the commands in comfile will be executed until the end of comfile is reached; then the instance of the Shell invoked by sh will terminate. Since this Shell process is the child of another instance of the Shell, the wait executed in the latter will return, and another command may be processed.

6.6 Initialization

S: Booting and logging-in are described.

The instances of the Shell to which users type commands are themselves children of another process. The last step in the initialization of UNIX is the creation of a single process and the invocation (via execute) of a program called init. The role of init is to create one process for each typewriter channel which may be dialed up by a user. The various subinstances of init open the appropriate typewriters for input and output. Since when init was invoked there were no files open, in each process the typewriter keyboard will receive file descriptor 0 and the printer file descriptor 1. Each process types out a message requesting that the user log in and waits, reading the typewriter, for a reply. At the outset, no one is logged in, so each process simply hangs. Finally someone types his name or other identification. The appropriate instance of init wakes up, receives the log-in line, and reads a password file. If the user name is found, and if he is able to supply the correct password, init changes to the user’s default current directory, sets the process’s user ID to that of the person logging in, and performs an execute of the Shell. At this point the Shell is ready to receive commands and the logging-in protocol is complete

Meanwhile, the mainstream path of init (the parent of all the subinstances of itself which will later become Shells) does a wait. If one of the child processes terminates, either because a Shell found an end of file or because a user typed an incorrect name or password, this path of init simply recreates the defunct process, which in turn reopens the appropriate input and output files and types another login message. Thus a user may log out simply by typing the end-of-file sequence in place of a command to the Shell.

6.7 Other Programs as Shell

The Shell as described above is designed to allow users full access to the facilities of the system since it will invoke the execution of any program with appropriate protection mode. Sometimes, however, a different interface to the system is desirable, and this feature is easily arranged.

Recall that after a user has successfully logged in by supplying his name and password, init ordinarily invokes the Shell to interpret command lines. The user’s entry in the password file may contain the name of a program to be invoked after login instead of the Shell. This program is free to interpret the user’s messages in any way it wishes.

For example, the password file entries for users of a secretarial editing system specify that the editor ed is to be used instead of the Shell. Thus when editing system users log in, they are inside the editor and can begin work immediately; also, they can be prevented from invoking UNIX programs not intended for their use. In practice, it has proved desirable to allow a temporary escape from the editor to execute the formatting program and other utilities.

Several of the games (e.g. chess, blackjack, 3D tic-tac-toe) available on UNIX illustrate a much more severely restricted environment. For each of these an entry exists in the password file specifying that the appropriate game-playing program is to be invoked instead of the Shell. People who log in as a player of one of the games find themselves limited to the game and unable to investigate the presumably more interesting offerings of UNIX as a whole.

7. Traps

The PDP-11 hardware detects a number of program faults, such as references to nonexistent memory, unimplemented instructions, and odd addresses used where an even address is required. Such faults cause the processor to trap to a system routine. When an illegal action is caught, unless other arrangements have been made, the system terminates the process and writes the user’s image on file core in the current directory. A debugger can be used to determine the state of the program at the time of the fault.

S: How ctrl-c, our all-killer, works is described.

Programs which are looping, which produce unwanted output, or about which the user has second thoughts may be halted by the use of the interrupt signal, which is generated by typing the “delete” character. Unless special action has been taken, this signal simply causes the program to cease execution without producing a core image file.

There is also a quit signal which is used to force a core image to be produced. Thus programs which loop unexpectedly may be halted and the core image examined without prearrangement.

The hardware-generated faults and the interrupt and quit signals can, by request, be either ignored or caught by the process. For example, the Shell ignores quits to prevent a quit from logging the user out. The editor catches interrupts and returns to its command level. This is useful for stopping long printouts without losing work in progress (the editor manipulates a copy of the file it is editing). In systems without floating point hardware, unimplemented instructions are caught, and floating point instructions are interpreted.

8. Perspective

S: A succinct discussion and retrospective of the development process.

Perhaps paradoxically, the success of UNIX is largely due to the fact that it was not designed to meet any predefined objectives. The first version was written when one of us (Thompson), dissatisfied with the available computer facilities, discovered a little-used system PDP-7 and set out to create a more hospitable environment. This essentially personal effort was sufficiently successful to gain the interest of the remaining author and others, and later to justify the acquisition of the PDP-11/20, specifically to support a text editing and formatting system. Then in turn the 11/20 was outgrown, UNIX had proved useful enough to persuade management to invest in the PDP-11/45. Our goals throughout the effort, when articulated at all, have always concerned themselves with building a comfortable relationship with the machine and with exploring ideas and inventions in operating systems. We have not been faced with the need to satisfy someone else’s requirements, and for this freedom we are grateful.

Perhaps paradoxically, the success of UNIX is largely due to the fact that it was not designed to meet any predefined objectives. …
We have not been faced with the need to satisfy someone else’s requirements, and for this freedom we are grateful.

Three considerations which influenced the design of UNIX are visible in retrospect.

First, since we are programmers, we naturally designed the system to make it easy to write, test, and run programs.The most important expression of our desire for programming convenience was that the system was arranged for interactive use, even though the original version only supported one user. We believe that a properly designed interactive system is much more productive and satisfying to use than a “batch” system. Moreover such a system is rather easily adaptable to non-interactive use, while the converse is not true.

Second there have always been fairly severe size constraints on the system and its software. Given the partiality antagonistic desires for reasonable efficiency and expressive power, the size constraint has encouraged not only economy but a certain elegance of design. This may be a thinly disguised version of the “salvation through suffering” philosophy, but in our case it worked.

The size constraint has encouraged not only economy but a certain elegance of design. This may be a thinly disguised version of the “salvation through suffering” philosophy, but in our case it worked.

Third, nearly from the start, the system was able to, and did, maintain itself. This fact is more important than it might seem. If designers of a system are forced to use that system, they quickly become aware of its functional and superficial deficiencies and are strongly motivated to correct them before it is too late. Since all source programs were always available and easily modified online, we were willing to revise and rewrite the system and its software when new ideas were invented, discovered, or suggested by others.

The aspects of UNIX discussed in this paper exhibit clearly at least the first two of these design considerations. The interface to the file system, for example, is extremely convenient from a programming standpoint. The lowest possible interface level is designed to eliminate distinctions between the various devices and files and between direct and sequential access. No large “access method” routines are required to insulate the programmer from the system calls; in fact, all user programs either call the system directly or use a small library program, only tens of instructions long, which buffers a number of characters and reads or writes them all at once.

Another important aspect of programming convenience is that there are no “control blocks” with a complicated structure partially maintained by and depended on by the file system or other system calls. Generally speaking, the contents of a program’s address space are the property of the program, and we have tried to avoid placing restrictions on the data structures within that address space.

Given the requirement that all programs should be usable with any file or device as input or output, it is also desirable from a space-efficiency standpoint to push device-dependent considerations into the operating system itself. The only alternatives seem to be to load routines for dealing with each device with all programs, which is expensive in space, or to depend on some means of dynamically linking to the routine appropriate to each device when it is actually needed, which is expensive either in overhead or in hardware.

Likewise, the process control scheme and command interface have proved both convenient and efficient. Since the Shell operates as an ordinary, swappable user program, it consumes no wired-down space in the system proper, and it may be made as powerful as desired at little cost, In particular, given the framework in which the Shell executes as a process which spawns other processes to perform commands, the notions of I/O redirection, background processes, command files, and user-selectable system interfaces all become essentially trivial to implement.

8.1 Influences

The success of UNIX lies not so much in new inventions but rather in the full exploitation of a carefully selected set of fertile ideas, and especially in showing that they can be keys to the implementation of a small yet powerful operating system.

The success of UNIX lies not so much in new inventions but rather in the full exploitation of a carefully selected set of fertile ideas.

The fork operation, essentially as we implemented it, was present in the Berkeley time-sharing system [8]. On a number of points we were influenced by Multics, which suggested the particular form of the I/O system calls [9] and both the name of the Shell and its general functions, The notion that the Shell should create a process for each command was also suggested to us by the early design of Multics, although in that system it was later dropped for efficiency reasons. A similar scheme is used by TENEX [10].

9. Statistics

The following statistics from UNIX are presented to show the scale of the system and to show how a system of this scale is used. Those of our users not involved in document preparation tend to use the system for program development, especially language work. There are few important “applications” programs.

9.1 Overall

72 user population
14 maximum simultaneous users
300 directories
4400 files
34000 512-byte secondary storage blocks used

9.2 Per day (24-hour day, 7-day week basis)

There is a “background” process that runs at the lowest possible priority; it is used to soak up any idle CPU time. It has been used to produce a million-digit approximation to the constant e – 2, and is now generating composite pseudoprimes (base 2).

1800 Commands
4.3 CPU hours (aside from background)
70 connect hours
30 different users
75 logins

9.3 Command CPU Usage (cut off at 1%)

15.7% C compiler 1.7% Fortran compiler
15.2% users’ programs 1.6% remove file
11.7% editor 1.6% tape archive
5.8% Shell (used as a command including command times) 1.6% file system consistency, check
5.3% chess 1.4% library maintainer
3.3% list directory 1.3% concatenate/print files
3.1% document formatter 1.3% paginate and print file
1.6% backup dumper 1.1% print disk usage
1.8% assembler 1.0% copy file

9.4 Command Accesses (cut off at 1%)

15.3% editor 1.6% debugger
9.6% list directory 1.6% Shell (used as a command)
6.3% remove file 1.5% print disk availability
6.3% C compiler 1.4% list processes executing
6.0% concatenate/print file 1.4% assembler
6.0% users’ programs 1.4% print arguments
3.3% list people logged on system 1.2% copy file
3.2% rename/move file 1.1% paginate and print file
3.1% file status 1.1% print current date/time
1.8% library maintainer 1.1% file system consistency check
1.8% document formatter 1.0% tape archive
1.6% execute another command conditionally

9.5 Reliability

Our statistics on reliability are much more subjective than the others. The following results are true to the best of our combined recollections. The time span is over one year with a very early vintage 11/45.

There has been one loss of a file system (one disk out of five) caused by software inability to cope with a hardware problem causing repeated power fail traps. Files on that disk were backed up three days.

A “crash” is an unscheduled system reboot or halt. There is about one crash every other day; about two-thirds of them are caused by hardware-related difficulties such as power dips and inexplicable processor interrupts to random locations. The remainder are software failures. The longest uninterrupted up time was about two weeks. Service calls average one every three weeks, but are heavily clustered. Total up time has been about 98 percent of our 24-hour, 365-day schedule.

Acknowledgments. We are grateful to R.H. Canaday, L.L. Cherry, and L.E. McMahon for their contributions to UNIX. We are particularly appreciative of the inventiveness,thoughtful criticism, and constant support of R. Morris, M.D. McIlroy, and J.F. Ossanna.


  1. Digital Equipment Corporation. PDP-11/40 Processor Handbook, 1972, and PDP-11/45 Processor Handbook. 1971.
  2. Deutsch, L.P., and Lampson, B.W. An online editor. Comm. ACM 10, 12 (Dec, 1967) 793–799, 803.
  3. Richards, M. BCPL: A tool for compiler writing and system programming. Proc. AFIPS 1969 SJCC, Vol. 34, AFIPS Press, Montvale, N.J., pp. 557–566.
  4. McClure, R.M. TMG—A syntax directed compiler. Proc. ACM 20th Nat. Conf., ACM, 1965, New York, pp. 262–274.
  5. Hall. A.D. The M6 macroprocessor. Computing Science Tech. Rep. #2, Bell Telephone Laboratories, 1969.
  6. Ritchie, D.M. C reference manual. Unpublished memorandum, Bell Telephone Laboratories, 1973.
  7. Aleph-null. Computer Recreations. Software Practice and Experience 1, 2 (Apr.–June 1971), 201–204.
  8. Deutsch, L.P., and Lampson, B.W. SDS 930 time-sharing system preliminary reference manual. Doc. 30.10.10, Project GENIE, U of California at Berkeley, Apr. 1965.
  9. Feiertag. R.J., and Organick, E.I. The Multics input-output system. Proc. Third Symp. on Oper. Syst. Princ., Oct. 18–20, 1971, ACM, New York, pp. 35–41.
  10. Bobrow, D.C., Burchfiel, J.D., Murphy, D.L., and Tomlinson, R.S. TENEX, a paged time sharing system for the PDP-10. Comm. ACM 15, 3 (Mar. 1972) 135–143.


Why 780 retired generals and former national security leaders spoke out against Trump





Donald Trump
Trump departs the White House for a photo op outside St. John’s Church on June 1, 2020. Walking behind the president are, from left, Attorney General William Barr, Secretary of Defense Mark Esper and Gen. Mark Milley, chairman of the Joint Chiefs of Staff. (Patrick Semansky/AP)

On June 1, retired Army vice chief of staff Gen. Peter Chiarelli sat staring out at the Pacific Ocean in Gearhart, Ore., where his family had vacationed throughout his long military career. The peaceful scene was occasionally interrupted by the news flashing across the notebook computer in his lap. In a Rose Garden speech that afternoon, President Trump addressed the racial justice protests spreading across the nation after the brutal killing of George Floyd in police custody a week earlier.

In the speech, Trump proclaimed himself “your president of law and order,” and claimed the protests had been hijacked by “professional anarchists, violent mobs, arsonists, looters, criminals, rider rioters, antifa and others” intent on “domestic terror.” News cameras showed some of the hundreds of National Guard troops from around the country that had been sent to reinforce the D.C. Guard, and there were reports that 1,600 active-duty troops were on high alert just outside the capital. Privately, Trump was threatening to invoke the Insurrection Act in order to send thousands more active-duty troops onto the nation’s streets in a show of dominant military force, criticizing weak governors and mayors around the country for not doing more to forcefully stamp out the protests.

The television cameras shifted to a mostly peaceful crowd of protesters across Lafayette Park from the White House. Chiarelli sat up when a phalanx of federal police and National Guard troops suddenly marched into the peaceful crowd, backed by a small cavalry of Park Police on horseback. There were flash-bang explosions, clouds of tear gas and the crackle of pepper balls as riot police used shields and batons to pummel some in the crowd. A woman could be heard plaintively shouting above the din, “Why are you shooting at us?!”

After the crowd was dispersed, Chiarelli watched with growing alarm as President Trump strode purposefully across Lafayette Park flanked by Attorney General William Barr, Defense Secretary Mark Esper, and Gen. Mark Milley, chairman of the Joint Chiefs of Staff. Chiarelli had served in combat with Milley in Iraq, and considered him a good friend. That Mark Milley would have known better than to appear at the president’s side in his camouflage uniform after a show of dominant force against protesters on the streets of America.

In front of historic Saint John’s Church, damaged by fire during earlier protests, Trump posed silently holding a bible aloft for a 2-minute photo op. At long last, President Trump had the image of the “American carnage” that he had promised to end in his inauguration speech, insisting that he alone could fix it.

Donald Trump
President Trump holds a Bible as he visits St. John’s Church across Lafayette Park from the White House on June 1, 2020. (Patrick Semansky/AP)

Along with a cadre of other retired generals, a very upset Peter Chiarelli decided to contact his old friend General Milley, the most senior uniformed leader in the country. After serving as commander of the 147.000 U.S. and coalition troops of Multi-National Corps – Iraq, Chiarelli as vice chief of the Army had led Defense Department efforts to treat post-traumatic stress, traumatic brain injury and suicide prevention. On his retirement in 2012, he became the first CEO of One Mind, which supports research into brain illnesses and injuries.

“That whole incident around Lafayette Square was stunning to me, because those were mostly peaceful demonstrators exercising a right guaranteed by the Constitution that I’ve sworn allegiance to throughout my entire career,” said Chiarelli in an interview. That allegiance is not given to a political party, Congress or the president of the United States, he noted, making the image of a uniformed chairman of the Joint Chiefs and the defense secretary at Trump’s side that day so alarming. General Milley later apologized for his presence in Lafayette Square, and Defense Secretary Mark Esper earned the president’s enmity by publicly opposing invocation of the Insurrection Act in order to use U.S. military troops to “dominate” the streets.

Along with more than 780 retired high-ranking officers and former national security leaders — including 22 retired four-star generals and admirals and five former secretaries of defense — Chiarelli signed an “Open Letter to America” endorsing Joe Biden for president. “We love our country,” the signatories wrote. “Unfortunately, we also fear for it.”

“Signing that letter was very hard for me to do, because I have never done that before or even given a dollar to a political campaign. Frankly, even as a retired general I didn’t think it was the right thing to do,” said Chiarelli, stressing that active-duty military officers are indoctrinated from a young age to remain strictly nonpartisan and apolitical. “But this president has assaulted the military justice system on behalf of individuals charged with war crimes. He has ended the career of service members like [impeachment witness Lt. Col. Alexander] Vindman for doing his duty and what was right. He has maligned mail-in voting as a fraud and suggested he might claim victory in a close election before all the ballots are counted, when as a service member I have voted absentee by mail my entire life. So like everyone else I’ve become numb after four years of this, but we have gone places in that time that I never dreamt we would go as a nation. I really do fear that the republic that I swore allegiance to is now under threat.”

Peter Chiarelli
Retired Gen. Peter Chiarelli. (Alastair Grant/AP)

Even among the cascade of scandals and controversies that have characterized the Trump presidency, the use of excessive force against mostly peaceful protesters near Lafayette Square, and the involvement of the top ranks of  the U.S. military, still stands out. The incident conjured a truly dystopian vision of a U.S. president not only willing but eager to use the world’s most powerful military to crush domestic protests and “dominate” the streets of America, one that an increasing number of retired generals and senior national security experts believe could become all too real in a second Trump term.

Lafayette Square was so alarming that it shook Trump’s former Defense Secretary, retired four-star Marine Gen. Jim Mattis, out of his long silence on the president’s leadership, writing afterwards that “Donald Trump is the first president in my lifetime who does not try to unite the American people — does not even pretend to try.”

Trump’s troubling authoritarian instincts, focus on image over substance, constant misuse and politicization of nonpartisan institutions and penchant for chaos were all on clear display in Lafayette Square, and the incident crystalized the concerns expressed in the open letter. Traditionally both active-duty and retired U.S. military and intelligence officials have steered clear of politics, but in mid-September the Trump campaign released a letter signed by 235 retired senior military officers endorsing the president for reelection with the claim that Americans’ “historic way of life is at stake” if the “socialists and Marxists” of the Democratic Party take control of the government.

The willingness of hundreds of career officers to break with tradition and speak out on behalf of one candidate reflects beliefs, on both sides, that the nation faces an uncertain future, facing the worst pandemic in over a century, the worst economic decline since the Great Depression and the worst racial unrest since the 1960s. To the signers of the “Open Letter to America,” a second Trump term would only make things worse.

Protestors at Lafayette Park on June 1, 2020. (Ken Cedeno/Reuters)

“Over the last three-plus years, I’ve watched the Trump administration politicize the Department of Justice and eviscerate the State Department, and the situation in Lafayette Square made clear that if reelected, Trump will politicize the Defense Department as well,” said retired Rear Adm. Mike Smith, who was instrumental in organizing the “Open Letter to America.” “A lot of us who spent our careers in the military would rather have stayed out of politics, but we have a deep moral conviction that the country can’t afford to go through another four years of this kind of leadership.”

Already the Lafayette Square incident has sunk beneath a wave of subsequent controversies and scandals, including recent revelations in investigative reporter Bob Woodward’s book “Rage,” based on numerous on-the-record interviews with Trump, that the president knew early on about the deadly and extremely contagious nature of the COVID-19 virus, but chose to continually play down the threat; the revelations in an article in the Atlantic, backed by reporting by the Washington Post, Fox News and other outlets, that Trump has repeatedly shown contempt for U.S. service members killed in combat, including referring to fallen soldiers and marines in cemeteries overseas as “losers” and “suckers”; Trump’s bullying and hectoring performance in the first presidential debate that astounded viewers at home and abroad; the president’s decision to put the health and lives of his Secret Service detail in jeopardy for a photo op after he tested positive for the coronavirus; and Trump’s insistence that the presidential election weeks away will be “the most rigged” in history, and his refusal to commit to accepting its results and peacefully transfer power if he loses.

Civil-Military Dysfunction

Donald Trump and Melania Trump
Donald and Melania Trump celebrate Independence Day on the South Lawn of the White House, July 4, 2020. (Carlos Barria/Reuters)

President Trump’s relationship with military commanders might have been an asset in his reelection campaign. He has increased defense spending each year of his presidency, with the United States on track to spend more on the military in 2020 (adjusted for inflation) than at any point since World War II, with the exception of a few years at the height of the Iraq War. Early in his term, Trump pleased commanders by relaxing battlefield restrictions in the fight against the Islamic State of Iraq and Syria (ISIS), and he ordered successful strikes that killed ISIS leader Abu Bakr al-Baghdadi and Iranian Quds Force leader Qassem Soleimani.

As commander in chief, Trump also clearly revels in the pomp and spectacle of military parades, and in salutes to the troops. Yet from the early days of his presidency there were signs of severe tension between a president who has racked up an unprecedented 20,000 falsehoods since taking the oath, according to the Washington Post’s “Fact Checker,” and an institution built on the ethos that officers “will not lie, cheat, steal, or tolerate those who do.” There were also early indications that Trump was willing to politicize the most stringently apolitical institution in the U.S. government, treating appearances with the troops like political rallies where he excoriated Democrats and signed “Make America Great Again” hats. Before the 2018 midterm elections, Trump alarmed senior military leaders by sending active-duty troops to the southern border to confront a ragtag caravan of asylum seekers and migrants in a nakedly political stunt, and he diverted Pentagon funds to build sections of the wall he promised that Mexico would pay for.

From the beginning of his term, Trump has also exhibited indifference bordering on contempt for the sacrifices and principle of selfless service that underlies the military profession. Many officers were willing to look past the five draft deferments Trump received during the Vietnam War, including one for a “bone spur” diagnosis from a New York podiatrist who reportedly rented an apartment from Trump’s father.

More troubling to many uniformed leaders was Trump’s belittling of the Muslim Gold Star parents of a slain U.S. soldier who criticized him during the 2016 Democratic National Convention, and the president’s casual dismissal of the wartime service of the late Sen. John McCain, a former Navy pilot who spent more than five years being tormented in the notorious “Hanoi Hilton” prison. “He’s not a war hero,” said candidate Trump, when he was feuding with the Arizona senator. “He was a war hero because he was captured. I like people who weren’t captured.”

Donald Trump
Then presidential candidate Donald Trump speaks at the Family Leadership Summit in Ames, Iowa, in July 2015. (Nat Harnik/AP)

In his first briefing inside the Pentagon’s classified “tank” with then Defense Secretary Mattis and the Joint Chiefs, Trump famously bristled at their arguments supporting NATO and ongoing operations in Afghanistan. “You’re all losers,” Trump reportedly said to a room full of four-star flag officers and combat veterans. “You don’t know how to win anymore.” After Mattis later resigned to protest Trump’s rash decision to pull U.S. troops out of Syria and abandon Kurdish allies in the fight against ISIS, Trump publicly dissed him as “the world’s most overrated general.”

“President Trump routinely shows disrespect towards exemplary leaders like Senator McCain, and towards General Jim Mattis, one of our very best,” said retired Marine Lt. General Frank Libutti, a combat veteran and Purple Heart recipient who signed the “Open Letter to America.” “It recalls his public ridicule of many of his top military and intelligence community leaders, and his insistence that he knows more about issues of national security than they do, which is nonsense. But what I found truly shocking were Trump’s comments about the Marines who sacrificed their lives for victory at Belleau Wood. I believe words count. Character counts. Temperament counts. And President Trump has shown himself beneath the dignity of the office.”

A seeming contempt for military service came through most clearly when Trump canceled a planned visit to a World War I military cemetery near Paris because of rain during a 2018 trip. Quoting four anonymous sources with firsthand knowledge of the discussion that day, the Atlantic’s editor in chief Jeffrey Goldberg reported that Trump said, “Why should I go to that cemetery? It’s filled with losers.” In a separate conversation on the same trip, Trump reportedly referred to the more than 1,800 Marines who lost their lives at Belleau Wood as “suckers” for getting killed. Fox News and the Washington Post later confirmed similar episodes of the president denigrating military service.

Retired Air Force Gen. Charles Boyd spent more than six years as a prisoner of war in North Vietnam, and he is the only Vietnam War POW to later reach four-star rank. “When I read the Atlantic article, I found it absolutely disgusting. The idea that the commander in chief holds those who serve under him with such contempt, just because they are not driven by the same desire for money and wealth as him, made me sick to my stomach. In all of my experiences in life, I’ve never known any group that is more honorable than military professionals, who sign an unlimited liability contract to sacrifice their lives if called to for this nation.”

In the past, Boyd has also opposed even retired flag officers endorsing candidates or becoming involved in partisan politics, but he made an exception this year by signing the “Open Letter to America.” “There’s a saying in the military that ‘officers eat last,’ which means that leadership is all about what’s best for your troops, and for the nation. President Trump has no concept of that kind of leadership. Everything he does is driven by what’s best for him personally, including casting doubt on any election results that don’t declare him the winner. That’s destructive to the very fiber of our democracy.”


Read more from GFN:

Continue Reading


Twin Cities area youth sports coaches add COVID-19 protocols to daily routines

Emily walpole



Mary Guzek is used to playing the role of “Team Mom” for her two sons’ Fridley youth football, basketball and baseball squads. Time was, that meant supplying snacks or filling water bottles.

But this fall, in the midst of a global pandemic, it means taking players’ temperatures before every practice and game, counseling parents of sick kids to keep them home and running down a checklist of whether any of the 22 players on the fifth-grade football team have a cough or feel short of breath.

“Unfortunately, it’s what we have had to do to make sure our kids can play,” said Guzek, whose boys are 12 and 10. “But it was worse in the spring, when seasons were canceled, and the kids were sad and depressed. Now, they can play.”

It’s hard enough for some parents to volunteer their time and energy at the end of a workday to coach youth sports. But with COVID-19 rapidly spreading, they’re now forced to do more than manage lineups and the Xs and Os to keep players on the field and the virus at bay.

Many parents and volunteer coaches across the metro have added COVID-19 protocols to their duties. Taking player temperatures, scrubbing down equipment and alternating practice times have, for most, become routine. Meanwhile, some park and recreation departments, not wanting to saddle volunteers with such responsibility, have moved away from traditional soccer and football games, offering instead skills camps run by paid staff members at a handful of hub sites.

Jayme Murphy, who focuses on COVID-19 issues for the Minnesota Amateur Sports Commission, said youth sports groups across the state spent much of the summer exploring ways they could safely play in the fall. Some, he said, were committed to playing out the season. Others created scaled-down versions of their usual offerings. Still others canceled seasons altogether.

Key to those decisions was determining whether coaches and parent volunteers would feel overwhelmed by the responsibility for keeping COVID-19 in check. The Minnesota Department of Health has issued 13 pages of guidelines for safely conducting youth and adult sports.

“The question for volunteers and parents to ask themselves is how comfortable are they with risk?” Murphy said. “If you’re uncomfortable with this, if you’re uncomfortable with your child’s participation in this, that’s ok.”

With COVID-19 cases continuing to rise across the state this fall, those comfort levels may be challenged even more as the winter sports season approaches.

Another way

In St. Paul, officials at the city’s Parks and Recreation department canceled sports at 26 recreation centers over the spring and summer. This fall, they replaced tackle football and competitive soccer with flag football and soccer skills programs hosted at six recreation centers.

They did so, because “we didn’t want to throw the responsibility for following those protocols onto volunteer coaches,” said Andy Rodriguez, recreation services manager.

By limiting offerings to six sites, supervised by city employees with help from coaches at Cretin-Derham Hall and the Sanneh Foundation, Rodriguez said the city can better control social distancing, sanitizing equipment and health screening. Nearly 600 kids, ages 3-14, registered for soccer in St. Paul, Rodriguez said. Almost 400 kids, ages 8-12, signed up for flag football.

“For the most part, the families we have been working with are just thankful for something for their kids to do in the fall,” he said.

Davis Vue who helped his 7-year-old son Memphis tie his shoes on a recent night, said he is one of the happy parents. The St. Paul native watched the coronavirus wipe out his own flag football league season, so he appreciates the city finding a way for Memphis to participate. It’s his son’s first year playing and he hasn’t missed a night, his father said.

“With this pandemic going on, I’m surprised Parks and Rec had this going on for kids,” Vue said. “I’m really glad they did.”

There’s also no tackle football in Minneapolis, where the city’s Park Board has offered flag football for young athletes 6-18. The soccer season has continued with a citywide schedule and volunteer coaches, said Mimi Kalb, director of Athletic Programs and Aquatics for the Minneapolis Park Board. Younger children — on 6U and 8U teams — are playing games in “smaller service areas” with city staff members conducting many of the COVID-19 protocols, she said.

Some coaches and players and families opted out of playing, “but for those who wanted to play, we tried to take a lot of the responsibility off the coaches,” she said. “Our park staff and league directors are doing a lot of that.”

Tim Grate, athletics program director for Minneapolis Parks and Recreation, said many coaches have successfully incorporated their new responsibilities.

“I’ve seen coaches who laid out cones to make sure [players are] social distancing,” he said. “I haven’t heard a lot of complaints.”

John Swanson, a Fridley varsity football coach who oversees more than 200 youth teams across the north metro, said about 30 % of them opted out of play due to COVID-19 concerns. Those that remained were committed to following all the necessary rules to keep playing.

“It’s one of the few things that still connects community,” he said. “Youth sports help us maintain that connectivity.”

Coaches and team moms and dads are keeping spreadsheets, taking temperatures, cleaning equipment, staggering practice nights and holding kids out if they show symptoms or test positive, he said. Teams have built time into their schedules to play makeup games when any had to quarantine for 14 days. So far, he said, there have been no COVID-19 cases transmitted on the football field.

“I don’t think we are asking the coaches to do too much,” Swanson said. “Volunteer coaches have proved they can do it.”

Continue Reading



Mish Boyka




Slide 1

Q3 2020 Update Exhibit 99.1

Slide 2

Highlights 03 Financial Summary04 Operational Summary06 Vehicle Capacity 07 Core Technology 08 Other Highlights09 Outlook10 Battery Day Highlights11 Photos & Charts13 Financial Statements23 Additional Information28

Slide 3

The third quarter of 2020 was a record quarter on many levels. Over the past four quarters, we generated over $1.9B of free cash flow while spending $2.4B on new production capacity, service centers, Supercharging locations and other capital investments.  While we took additional SBC expense in Q3, our GAAP operating margin reached 9.2%. We are increasingly focused on our next phase of growth. Our most recent capacity expansion investments are now stabilizing with Model 3 in Shanghai achieving its designed production rate and Model Y in Fremont expected to reach capacity-level production soon. During this next phase, we are implementing more ambitious architectural changes to our products and factories to improve manufacturing cost and efficiency. We are also expanding our scope of manufacturing to include additional areas of insourcing. At Tesla Battery Day, we announced our plans to manufacture battery cells in-house to aid in our rapid expansion plan. We believe our new 4680 cells are an important step forward to reduce cost and improve capital efficiency, while improving performance. We continue to see growing interest in our cars, storage and solar products and remain focused on cost-efficiency while growing capacity as quickly as possible. $5.9B increase in our cash and cash equivalents in Q3 to $14.5B Operating cash flow less capex (free cash flow) of $1.4B in Q3 Cash Record vehicle deliveries, profitability and free cash flow Buildout of three new factories on three continents continues as planned First step of FSD beta rollout started in Oct. 2020 Profitability $809M GAAP operating income; 9.2% operating margin in Q3 $331M GAAP net income; $874M non-GAAP net income (ex-SBC) in Q3 SBC expense increased to $543M (driven by 2018 CEO award milestones) Operations S U M M A R Y H I G H L I G H T S 3 SBC = stock-based compensation

Slide 4

F I N A N C I A L   S U M M A R Y (Unaudited) 4 ($ in millions, except percentages and per share data) Q3-2019 Q4-2019 Q1-2020 Q2-2020 Q3-2020 QoQ YoY Automotive revenues 5,353 6,368 5,132 5,179 7,611 47% 42%    of which regulatory credits 134 133 354 428 397 -7% 196% Automotive gross profit 1,222 1,434 1,311 1,317 2,105 60% 72% Automotive gross margin 22.8% 22.5% 25.5% 25.4% 27.7% 223 bp 483 bp               Total revenues 6,303 7,384 5,985 6,036 8,771 45% 39% Total gross profit 1,191 1,391 1,234 1,267 2,063 63% 73% Total GAAP gross margin 18.9% 18.8% 20.6% 21.0% 23.5% 253 bp 462 bp               Operating expenses 930 1,032 951 940 1,254 33% 35% Income from operations 261 359 283 327 809 147% 210% Operating margin 4.1% 4.9% 4.7% 5.4% 9.2% 381 bp 508 bp               Adjusted EBITDA 1,083 1,175 951 1,209 1,807 49% 67% Adjusted EBITDA margin 17.2% 15.9% 15.9% 20.0% 20.6% 57 bp 342 bp               Net income attributable to common stockholders (GAAP) 143 105 16 104 331 218% 131% Net income attributable to common stockholders (non-GAAP) 342 386 227 451 874 94% 156%               EPS attributable to common stockholders, diluted (GAAP) (1) 0.16 0.11 0.02 0.10 0.27 170% 69% EPS attributable to common stockholders, diluted (non-GAAP) (1) 0.37 0.41 0.23 0.44 0.76 73% 105%               Net cash provided by (used in) operating activities 756 1,425 (440) 964 2,400 149% 217% Capital expenditures (385) (412) (455) (546) (1,005) 84% 161% Free cash flow 371 1,013 (895) 418 1,395 234% 276% Cash and cash equivalents 5,338 6,268 8,080 8,615 14,531 69% 172% (1) Prior period results have been retroactively adjusted to reflect the five-for-one stock split effected in the form of a stock dividend in August 2020. EPS = Earnings per share

Slide 5

F I N A N C I A L   S U M M A R Y Revenue Profitability Cash Total revenue grew 39% YoY in Q3. This was achieved mainly through substantial growth in vehicle deliveries as well as growth in other parts of the business. At the same time, vehicle average selling price (ASP) declined slightly compared to the same period last year as our product mix continues to shift from Model S and Model X to the more affordable Model 3 and Model Y. Our operating income improved in Q3 to a record level of $809M, resulting in a 9.2% operating margin. This profit level was reached while we took increased SBC expense in Q3 attributable to the 2018 CEO award, of which $290M was triggered by a significant increase in share price and market capitalization and a new operational milestone becoming probable. Positive profit impacts included strong volume, better fixed cost absorption and continuous cost reduction.  Quarter-end cash and cash equivalents increased by $5.9B QoQ to $14.5B, driven mainly by our recent capital raise of $5.0B (average price of this offering was ~$449/share) combined with free cash flow of $1.4B and partially offset by reduced use of working capital credit lines. Since our days payable outstanding (DPO) are higher than days sales outstanding (DSO), revenue growth results in additional cash generation from working capital. DPO and DSO both declined sequentially in Q3 2020.  5

Slide 6

Q3-2019 Q4-2019 Q1-2020 Q2-2020 Q3-2020 QoQ YoY Model S/X production 16,318 17,933 15,390 6,326 16,992 169% 4% Model 3/Y production 79,837 86,958 87,282 75,946 128,044 69% 60% Total production 96,155 104,891 102,672 82,272 145,036 76% 51% Model S/X deliveries 17,483 19,475 12,230 10,614 15,275 44% -13% Model 3/Y deliveries 79,703 92,620 76,266 80,277 124,318 55% 56% Total deliveries 97,186 112,095 88,496 90,891 139,593 54% 44%    of which subject to operating lease accounting 9,086 8,848 6,104 4,716 10,014 112% 10% Total end of quarter operating lease vehicle count 44,241 49,901 53,159 54,519 61,638 13% 39% Global vehicle inventory (days of supply)(1) 18 10 25 17 14 -18% -22% Solar deployed (MW) 43 54 35 27 57 111% 33% Storage deployed (MWh) 477 530 260 419 759 81% 59% Store and service locations 417 433 438 446 466 4% 12% Mobile service fleet 719 743 756 769 780 1% 8% Supercharger stations 1,653 1,821 1,917 2,035 2,181 7% 32% Supercharger connectors 14,658 16,104 17,007 18,100 19,437 7% 33% (1) Days of supply is calculated by dividing new car ending inventory by the quarter’s deliveries and using 75 trading days (aligned with Automotive News definition). 6 O P E R A T I O N A L   S U M M A R Y (Unaudited)

Slide 7

Delivery percentage of locally-made vehicles* V E H I C L E C A P A C I T Y Fremont We have recently increased capacity of Model 3 / Model Y to 500,000 units a year. In order to do this, we restarted our second paint shop, installed the largest die-casting machine in the world and upgraded our Model Y general assembly line. Production should reach full capacity toward the end of this year or beginning of next year. Shanghai Model 3 production capacity has increased to 250,000 units a year. We reduced the price of Model 3 to 249,900 RMB after incentives, making it the lowest-price premium mid-sized sedan1 in China. This was enabled both by lower-cost batteries and an increased level of local procurement. As a result of this shift in cost and starting price, we recently added a third production shift to our Model 3 factory. Berlin-Brandenburg Construction of the Gigafactory in Berlin continues to progress rapidly. Buildings are under construction and equipment move-in will start over the coming weeks. At the same time, the Giga Berlin team continues to grow. Production is expected to start in 2021.  Installed Annual Capacity Current Status Fremont Model S / Model X         90,000 Production Model 3 / Model Y    500,000 Production Shanghai Model 3       250,000 Production Model Y – Construction Berlin Model 3 – In development Model Y – Construction Texas Model Y – Construction Cybertruck – In development United States Tesla Semi – In development Roadster – In development 7 Installed capacity ≠ Current production rate. Production rate depends on pace of factory ramp, supply chain ramp, downtime related to factory upgrades, national holidays and other factors. * Locally-made is defined as (i) cars made in Fremont and delivered in North America and (ii) cars made in China and delivered in China. 1 Premium mid-sized sedan segment in China defined as Audi A4, BMW 3-Series, Mercedes C-Class and Tesla Model 3.

Slide 8

C O R E   T E C H N O L O G Y Autopilot & Full Self Driving (FSD) Our Autopilot team has been focused on a fundamental architectural rewrite of our neural networks and control algorithms. This rewrite will allow the remaining driving features to be released. In October, we sent the first FSD software update enabled by the rewrite to a limited number of Early Access Program users — City Streets. As we continue to collect data over time, the system will become more robust. Vehicle Software New software functionality was introduced since the start of Q3. In order to make our products safer from unauthorized access, we introduced the ability to enable 2-step verification via a smartphone. Additionally, among many other updates, we improved active suspension comfort, updated Powerwall-to-vehicle charging coordination and added an automated window close function and glovebox PIN access. Our Model Y AWD customers can now purchase a $2,000 software update that improves 0-60 mph time to just 4.3s.     Battery & Powertrain On September 22, we hosted Tesla Battery Day where we described a path to reducing battery pack cost per kWh by 56%, enabling production of a profitable $25,000 vehicle. This, in our view, is a critical component to exceed cost parity with internal combustion engine vehicles. Additionally, due to a simpler cell manufacturing process, we believe capex per GWh of battery capacity should decline by 69% compared to today’s production process.  How our vehicles see an intersection 8 How our Neural Net understands the same intersection (generalized approach for any unmapped intersection)

Slide 9

O T H E R H I G H L I G H T S Energy Business Our energy storage business reached record deployments of 759 MWh in Q3. Megapack production continued to ramp at Gigafactory Nevada as production volumes more than doubled in Q3. Powerwall demand remains strong and is growing, particularly as our solar business grows as many customers include a Powerwall with their solar installation. Additionally, we are seeing accelerating interest in Powerwall as concerns with grid stability grow, particularly in California. We continue to believe that the energy business will ultimately be as large as our vehicle business. Our recently introduced strategy of low cost solar (at $1.49/watt in the US after tax credit) is starting to have an impact. Total solar deployments more than doubled in Q3 to 57 MW compared to the prior quarter, with Solar Roof deployments almost tripling sequentially. While not yet at scale, we recently demonstrated a ~1.5-day Solar Roof install, as shown below in the photos. For Solar Roof, installation time is a key area of focus to accelerate the growth of this program. We continue to onboard hundreds of electricians and roofers to grow this business. 9 7:30 am Noon 2:00 pm (the next day)

Slide 10

O U T L O O K Volume Cash Flow Profit Product We have the capacity installed to produce and deliver 500,000 vehicles this year.  While achieving this goal has become more difficult, delivering half a million vehicles in 2020 remains our target. Achieving this target depends primarily on quarter over quarter increases in Model Y and Shanghai production, as well as further improvements in logistics and delivery efficiency at higher volume levels.  We should have sufficient liquidity to fund our product roadmap, long-term capacity expansion plans and other expenses.  For the trailing 12 months, we achieved an operating margin of 6.3%. We expect our operating margin will continue to grow over time, ultimately reaching industry-leading levels with capacity expansion and localization plans underway.  We are currently building Model Y capacity at Gigafactory Shanghai, Gigafactory Berlin and Gigafactory Texas, and remain on track to start deliveries from each location in 2021. Tesla Semi deliveries will also begin in 2021.  We continue to significantly invest in our product roadmap. 10

Slide 11


Slide 12

Area of improvement Description Range Increase* $/kWh Cost Reduction* $/GWh Capex Reduction* Cell Design After considering every form factor and cell size across quantifiable factors, we deemed 80 mm height by 46 mm diameter cylindrical to be best These dimensions maximize vehicle range (pack level energy density) while minimizing manufacturing and product cost The challenge is that large diameter cylindrical cells easily overheat during supercharging We identified a tab-less design solution to resolve the overheating challenge and simplify manufacturing 16% 14% 7% Cell Factory Electrode Current electrode production process involves mixing liquids with cathode or anode powders and using massive machinery to coat and dry electrode New process allows going directly from cathode or anode powder to an electrode film 0% 18% 34% Winding Larger cells improve winder productivity Incorporates our tab-less design Assembly Large cells moving at high speed with simplification in process steps enables a single production line to have 20 GWh of capacity Formation Leveraging our power electronics to densify and reduce costs of the final charging and testing step of millions of cells Anode Material Silicon is a better anode material than graphite – stores 9x more lithium, but silicon expansion brings challenges Silicon used in anodes today is highly engineered and expensive Raw silicon with our coating design will cost just $1.20/kWh Expansion of silicon is managed by stabilizing surface and by creating an elastic binder network 20% 5% 4% Cathode Material We are taking a diversified cathode approach to maximize available supply options: all usable in our 4680 cells We are planning to manufacture cathode in-house, using far less water and reagents in a simplified production process Focus on local sourcing for each cell factory to avoid unnecessary transportation cost Actively pursuing pathways to vertically integrate lithium production for a portion of supply 4% 12% 16% Cell-Vehicle Integration Current EV design: cells to modules, modules to battery pack, battery pack to vehicle Future EV design: cells directly integrated into vehicle body with giga castings Battery is no longer carried as “luggage”, will provide new utility as a load-bearing frame element This unlocks high-efficiency factories and mechanical structures— best manufacturability, weight, range and cost 14% 7% 8% Projected Total Improvement 54% 56% 69% F I V E A R E A S O F F O C U S 12 * Our current projections.

Slide 13

P H O T O S & C H A R T S

Slide 14

G I G A F A C T O R Y   S H A N G H A I   –   M O D E L   Y   F A C T O R Y   ( F O R E G R O U N D ) ;   M O D E L   3   F A C T O R Y   ( B A C K G R O U N D ) 14

Slide 15

G I G A F A C T O R Y S H A N G H A I – M O D E L Y D I E C A S T 15

Slide 16

G I G A F A C T O R Y S H A N G H A I – M O D E L Y B O D Y S H O P 16

Slide 17

G I G A F A C T O R Y S H A N G H A I – M O D E L Y P A I N T S H O P 17

Slide 18

18 G I G A F A C T O R Y B E R L I N – M O D E L Y F A C T O R Y C O N S T R U C T I O N

Slide 19

19 G I G A F A C T O R Y T E X A S

Slide 20

20 M E G A P A C K P R O J E C T AT M O S S L A N D I N G

Slide 21

Vehicle Deliveries (units) Net Income ($B) K E Y   M E T R I C S   Q U A R T E R L Y  (Unaudited) 21 Operating Cash Flow ($B) Free Cash Flow ($B)

Slide 22

K E Y   M E T R I C S   T R A I L I N G   1 2   M O N T H S   ( T T M ) (Unaudited) Vehicle Deliveries (units) Operating Cash Flow ($B) Free Cash Flow ($B) Net Income ($B) 22

Slide 23


Slide 24

In millions of USD or shares as applicable, except per share data Q3-2019 Q4-2019 Q1-2020 Q2-2020 Q3-2020 REVENUES Automotive sales 5,132 6,143 4,893 4,911 7,346 Automotive leasing 221 225 239 268 265 Total automotive revenue 5,353 6,368 5,132 5,179 7,611 Energy generation and storage 402 436 293 370 579 Services and other 548 580 560 487 581 Total revenues 6,303 7,384 5,985 6,036 8,771 COST OF REVENUES           Automotive sales 4,014 4,815 3,699 3,714 5,361 Automotive leasing 117 119 122 148 145 Total automotive cost of revenues 4,131 4,934 3,821 3,862 5,506 Energy generation and storage 314 385 282 349 558 Services and other 667 674 648 558 644 Total cost of revenues 5,112 5,993 4,751 4,769 6,708 Gross profit 1,191 1,391 1,234 1,267 2,063 OPERATING EXPENSES           Research and development 334 345 324 279 366 Selling, general and administrative 596 699 627 661 888 Restructuring and other – (12) – – – Total operating expenses 930 1,032 951 940 1,254 INCOME FROM OPERATIONS 261 359 283 327 809 Interest income 15 10 10 8 6 Interest expense (185) (170) (169) (170) (163) Other income (expense), net 85 (25) (54) (15) (97) INCOME BEFORE INCOME TAXES 176 174 70 150 555 Provision for income taxes 26 42 2 21 186 NET INCOME 150 132 68 129 369 Net income attributable to noncontrolling interests and redeemable noncontrolling interests 7 27 52 25 38 NET INCOME ATTRIBUTABLE TO COMMON STOCKHOLDERS 143 105 16 104 331 Less: Buy-out of noncontrolling interest – – – – 31 NET INCOME USED IN COMPUTING NET INCOME PER SHARE OF COMMON STOCK 143 105 16 104 300 Net income per share of common stock attributable to common stockholders(1)           Basic $ 0.16 $ 0.12 $ 0.02 $ 0.11 $ 0.32 Diluted $ 0.16 $ 0.11 $ 0.02 $ 0.10 $ 0.27 Weighted average shares used in computing net income per share of common stock(1)           Basic 897 902 915 928 937 Diluted 922 935 994 1,036 1,105 S T A T E M E N T O F O P E R A T I O N S (Unaudited) 24 (1) Prior period results have been retroactively adjusted to reflect the five-for-one stock split effected in the form of a stock dividend in August 2020

Slide 25

B A L A N C E   S H E E T (Unaudited) In millions of USD 30-Sep-19 31-Dec-19 31-Mar-20 30-Jun-20 30-Sep-20 ASSETS Current assets    Cash and cash equivalents 5,338 6,268 8,080 8,615 14,531    Accounts receivable, net 1,128 1,324 1,274 1,485 1,757    Inventory 3,581 3,552 4,494 4,018 4,218    Prepaid expenses and other current assets 893 959 1,045 1,218 1,238       Total current assets 10,940 12,103 14,893 15,336 21,744 Operating lease vehicles, net 2,253 2,447 2,527 2,524 2,742 Solar energy systems, net 6,168 6,138 6,106 6,069 6,025 Property, plant and equipment, net 10,190 10,396 10,638 11,009 11,848 Operating lease right-of-use assets 1,234 1,218 1,197 1,274 1,375 Goodwill and intangible assets, net 537 537 516 508 521 Other non-current assets 1,473 1,470 1,373 1,415 1,436      Total assets 32,795 34,309 37,250 38,135 45,691 LIABILITIES AND EQUITY Current liabilities    Accounts payable       3,468        3,771       3,970        3,638       4,958    Accrued liabilities and other        2,938        3,222        2,825        3,110        3,252    Deferred revenue 1,045 1,163 1,186 1,130 1,258    Customer deposits 665 726 788 713 708    Current portion of debt and finance leases (1) 2,030 1,785 3,217 3,679 3,126      Total current liabilities 10,146 10,667 11,986 12,270 13,302 Debt and finance leases, net of current portion (1) 11,313 11,634 10,666 10,416 10,559 Deferred revenue, net of current portion 1,140 1,207 1,199 1,198 1,233 Other long-term liabilities 2,714 2,691 2,667 2,870 3,049       Total liabilities 25,313 26,199 26,518 26,754 28,143 Redeemable noncontrolling interests in subsidiaries 600 643 632 613 608  Convertible senior notes              —              —  60  44 48 Total stockholders’ equity 6,040 6,618 9,173 9,855 16,031 Noncontrolling interests in subsidiaries 842 849 867 869 861       Total liabilities and equity 32,795 34,309 37,250 38,135 45,691 (1) Breakdown of our debt is as follows:    Vehicle and energy product financing (non-recourse) 3,702 4,183 4,022 4,043 4,141    Other non-recourse debt 155 355 708 1,415 605    Recourse debt 7,882 7,263 7,600 7,106 7,448       Total debt excluding vehicle and energy product financing 8,037 7,618 8,308 8,521 8,053 25

Slide 26

In millions of USD Q3-2019 Q4-2019 Q1-2020 Q2-2020 Q3-2020 CASH FLOWS FROM OPERATING ACTIVITIES Net income 150  132  68  129  369  Adjustments to reconcile net income to net cash provided by (used in) operating activities: Depreciation, amortization and impairment 530  577  553  567  584  Stock-based compensation 199  281  211  347  543  Other 69  204  175  167  269  Changes in operating assets and liabilities, net of effect of business combinations (192) 231  (1,447) (246) 635  Net cash provided by (used in) operating activities 756  1,425  (440) 964  2,400  CASH FLOWS FROM INVESTING ACTIVITIES Capital expenditures (385) (412) (455) (546) (1,005) Purchases of solar energy systems, net of sales (25) (37) (26) (20) (16) Purchase of intangible assets               —                —                —                —  (5) Receipt of government grants               —  46  1  —  —  Business combinations, net of cash acquired (76)               —                —                —  (13) Net cash used in investing activities (486) (403) (480) (566) (1,039) CASH FLOWS FROM FINANCING ACTIVITIES Net cash flows from debt activities (55) (591) 544  164  (630) Collateralized lease repayments (83) (87) (97) (71) (56) Net borrowings (repayments) under vehicle and solar financing 183  478  (160) 18  99  Net cash flows from noncontrolling interests – Auto 30  19  (8) (3) (31) Net cash flows from noncontrolling interests – Solar (28) 6  (40) (42) (49) Proceeds from issuances of common stock in public offerings, net of issuance costs               —                —  2,309                —  4,973  Other 71  96  160  57  144  Net cash provided by (used in) financing activities 118  (79) 2,708  123  4,450  Effect of exchange rate changes on cash and cash equivalents and restricted cash (11) 14  (24) 38  86  Net increase in cash and cash equivalents and restricted cash 377  957  1,764  559  5,897  Cash and cash equivalents and restricted cash at beginning of period 5,449  5,826  6,783  8,547  9,106  Cash and cash equivalents and restricted cash at end of period 5,826  6,783  8,547  9,106  15,003  S T A T E M E N T   O F   C A S H   F L O W S  (Unaudited) 26

Slide 27

In millions of USD or shares as applicable, except per share data Q3-2019 Q4-2019 Q1-2020 Q2-2020 Q3-2020           Net income attributable to common stockholders (GAAP) 143 105 16 104 331 Stock-based compensation expense 199 281 211 347 543 Net income attributable to common stockholders (non-GAAP) 342 386 227 451 874 Less: Buy-out of noncontrolling interest – – – – 31 Net income used in computing EPS attributable to common stockholders (non-GAAP) 342 386 227 451 843         EPS attributable to common stockholders, diluted (GAAP)(1) 0.16 0.11 0.02 0.10 0.27 Stock-based compensation expense per share(1) 0.21 0.30 0.21 0.34 0.49 EPS attributable to common stockholders, diluted (non-GAAP)(1) 0.37 0.41 0.23 0.44 0.76 Shares used in EPS calculation, diluted (GAAP and non-GAAP)(1) 922 935 994 1,036 1,105 Net income attributable to common stockholders (GAAP) 143 105 16 104 331 Interest expense 185 170 169 170 163 Provision for income taxes 26 42 2 21 186 Depreciation, amortization and impairment 530 577 553 567 584 Stock-based compensation expense 199 281 211 347 543 Adjusted EBITDA (non-GAAP) 1,083 1,175 951 1,209 1,807 Total revenues 6,303 7,384 5,985 6,036 8,771 Adjusted EBITDA margin (non-GAAP)(2) 17.2% 15.9% 15.9% 20.0% 20.6%         Automotive gross margin (GAAP) 22.8% 22.5% 25.5% 25.4% 27.7% Less: Total regulatory credit revenue recognized 2.0% 1.6% 5.5% 6.7% 4.0% Automotive gross margin excluding regulatory credits (non-GAAP) 20.8% 20.9% 20.0% 18.7% 23.7% R e c o n c I l I a t I o n   o f   G A A P   t o   N o n – G A A P   F I n a n c I a l   I n f o r m a t I o n (Unaudited) 27 In millions of USD 4Q-2017 1Q-2018 2Q-2018 3Q-2018 4Q-2018 1Q-2019 2Q-2019 3Q-2019 4Q-2019 1Q-2020 2Q-2020 3Q-2020 Net cash provided by (used in) operating activities (GAAP) 510 (398) (130) 1,391 1,235 (640) 864 756 1,425 (440) 964 2,400 Capital expenditures (787) (656) (610) (510) (325) (280) (250) (385) (412) (455) (546) (1,005) Free cash flow (non-GAAP) (277) (1,054) (740) 881 910 (920) 614 371 1,013 (895) 418 1,395                           In millions of USD 4Q-2017 1Q-2018 2Q-2018 3Q-2018 4Q-2018 1Q-2019 2Q-2019 3Q-2019 4Q-2019 1Q-2020 2Q-2020 3Q-2020 Net cash (used in) provided by operating activities – TTM (GAAP) (61) (389) (319) 1,373 2,098 1,856 2,850 2,215 2,405 2,605 2,705 4,349 Capital expenditures – TTM (3,415) (3,518) (3,169) (2,563) (2,101) (1,725) (1,365) (1,240) (1,327) (1,502) (1,798) (2,418) Free cash flow – TTM (non-GAAP) (3,476) (3,907) (3,488) (1,190) (3) 131 1,485 975 1,078 1,103 907 1,931 (1) Prior period results have been retroactively adjusted to reflect the five-for-one stock split effected in the form of a stock dividend in August 2020 (2) Adjusted EBITDA margin is Adjusted EBITDA as a percentage of total revenues

Slide 28

A D D I T I O N A L   I N F O R M A T I O N WEBCAST INFORMATION Tesla will provide a live webcast of its third quarter 2020 financial results conference call beginning at 2:30 p.m. PT on October 21, 2020 at This webcast will also be available for replay for approximately one year thereafter.   CERTAIN TERMS When used in this update, certain terms have the following meanings. Our vehicle deliveries include only vehicles that have been transferred to end customers with all paperwork correctly completed. Our energy product deployment volume includes both customer units installed and equipment sales; we report installations at time of commissioning for storage projects or inspection for solar projects, and equipment sales at time of delivery. “Adjusted EBITDA” is equal to (i) net income (loss) attributable to common stockholders before (ii)(a) interest expense, (b) provision for income taxes, (c) depreciation, amortization and impairment and (d) stock-based compensation expense, which is the same measurement for this term pursuant to the performance-based stock option award granted to our CEO in 2018. “Free cash flow” is operating cash flow less capital expenditures. NON-GAAP FINANCIAL INFORMATION Consolidated financial information has been presented in accordance with GAAP as well as on a non-GAAP basis to supplement our consolidated financial results. Our non-GAAP financial measures include non-GAAP automotive gross margin, non-GAAP net income (loss) attributable to common stockholders, non-GAAP net income (loss) attributable to common stockholders on a diluted per share basis (calculated using weighted average shares for GAAP diluted net income (loss) attributable to common stockholders), Adjusted EBITDA, Adjusted EBITDA margin, and free cash flow. These non-GAAP financial measures also facilitate management’s internal comparisons to Tesla’s historical performance as well as comparisons to the operating results of other companies. Management believes that it is useful to supplement its GAAP financial statements with this non-GAAP information because management uses such information internally for its operating, budgeting and financial planning purposes. Management also believes that presentation of the non-GAAP financial measures provides useful information to our investors regarding our financial condition and results of operations so that investors can see through the eyes of Tesla management regarding important financial metrics that Tesla uses to run the business, and allowing investors to better understand Tesla’s performance. Non-GAAP information is not prepared under a comprehensive set of accounting rules and therefore, should only be read in conjunction with financial information reported under U.S. GAAP when understanding Tesla’s operating performance. A reconciliation between GAAP and non-GAAP financial information is provided above.   FORWARD-LOOKING STATEMENTS Certain statements in this update, including statements in the “Outlook” section; statements relating to the future development, production capacity and output rates, demand and market growth, deliveries, deployment, safety, range and other features and improvements, and timing of existing and future Tesla products and technologies such as Model 3, Model Y, Cybertruck, Tesla Semi, Roadster, Autopilot and Full Self Driving, our energy products and services such as Megapack, Solar Roof and Powerwall, and the battery cells we are developing and related technologies; statements regarding operating margin, spending and liquidity targets; statements regarding manufacturing and procurement improvements, cost reductions and efficiencies; statements regarding construction, expansion, improvements and/or ramp at the Tesla Factory, Gigafactory Shanghai, Gigafactory Berlin and Gigafactory Texas; and statements regarding our hiring targets are “forward-looking statements” that are subject to risks and uncertainties. These forward-looking statements are based on management’s current expectations, and as a result of certain risks and uncertainties, actual results may differ materially from those projected. The following important factors, without limitation, could cause actual results to differ materially from those in the forward-looking statements: uncertainties in future macroeconomic and regulatory conditions arising from the current global pandemic; the risk of delays in launching and manufacturing our products and features cost-effectively; our ability to grow our sales, delivery, installation, servicing and charging capabilities and effectively manage this growth; consumers’ willingness to adopt electric vehicles generally and our vehicles specifically; the ability of suppliers to deliver components according to schedules, prices, quality and volumes acceptable to us, and our ability to manage such components effectively; any issues with lithium-ion cells or other components manufactured at Gigafactory Nevada; our ability to build and ramp Gigafactory Shanghai, Gigafactory Berlin and Gigafactory Texas in accordance with our plans; our ability to procure supply of battery cells, including through our own manufacturing; risks relating to international expansion; any failures by Tesla products to perform as expected or if product recalls occur; the risk of product liability claims; competition in the automotive and energy product markets; our ability to maintain public credibility and confidence in our long-term business prospects; our ability to manage risks relating to our various product financing programs; the unavailability, reduction or elimination of government and economic incentives for electric vehicles and energy products; our ability to attract and retain key employees and qualified personnel and ramp our installation teams; our ability to maintain the security of our information and production and product systems; our compliance with various regulations and laws applicable to our operations and products, which may evolve from time to time; risks relating to our indebtedness and financing strategies; and adverse foreign exchange movements. More information on potential factors that could affect our financial results is included from time to time in our Securities and Exchange Commission filings and reports, including the risks identified under the section captioned “Risk Factors” in our quarterly report on Form 10-Q filed with the SEC on July 28, 2020. Tesla disclaims any obligation to update information contained in these forward-looking statements whether as a result of new information, future events, or otherwise. 28

Slide 29

Continue Reading

US Election

US Election Remaining