![](https://csdnimg.cn/release/download_crawler_static/10811754/bg14.jpg)
Preface
This book (known as CS:APP) is for computer scientists, computer engineers, and
others who want to be able to write better programs by learning what is going on
“under the hood” of a computer system.
Our aim is to explain the enduring concepts underlying all computer systems,
and to show you the concrete ways that these ideas affect the correctness, perfor-
mance, and utility of your application programs. Many systems books are written
from a builder’s perspective, describing how to implement the hardware or the sys-
tems software, including the operating system, compiler, and network interface.
This book is written from a programmer’s perspective, describing how application
programmers can use their knowledge of a system to write better programs. Of
course, learning what a system is supposed to do provides a good first step in learn-
ing how to build one, so this book also serves as a valuable introduction to those
who go on to implement systems hardware and software. Most systems books also
tend to focus on just one aspect of the system, for example, the hardware archi-
tecture, the operating system, the compiler, or the network. This book spans all
of these aspects, with the unifying theme of a programmer’s perspective.
If you study and learn the concepts in this book, you will be on your way to
becoming the rare power programmer who knows how things work and how to
fix them when they break. You will be able to write programs that make better
use of the capabilities provided by the operating system and systems software,
that operate correctly across a wide range of operating conditions and run-time
parameters, that run faster, and that avoid the flaws that make programs vulner-
able to cyberattack. You will be prepared to delve deeper into advanced topics
such as compilers, computer architecture, operating systems, embedded systems,
networking, and cybersecurity.
Assumptions about the Reader’s Background
This book focuses on systems that execute x86-64 machine code. x86-64 is the latest
in an evolutionary path followed by Intel and its competitors that started with the
8086 microprocessor in 1978. Due to the naming conventions used by Intel for
its microprocessor line, this class of microprocessors is referred to colloquially as
“x86.” As semiconductor technology has evolved to allow more transistors to be
integrated onto a single chip, these processors have progressed greatly in their
computing power and their memory capacity. As part of this progression, they
have gone from operating on 16-bit words, to 32-bit words with the introduction
of IA32 processors, and most recently to 64-bit words with x86-64.
We consider how these machines execute C programs on Linux. Linux is one
of a number of operating systems having their heritage in the Unix operating
system developed originally by Bell Laboratories. Other members of this class
19