![](https://csdnimg.cn/release/download_crawler_static/2179140/bg11.jpg)
Preface
This book is for programmers who want to improve their skills by learning about what is going on “under
the hood” of a computer system. Our aim is to explain the important and enduring concepts underlying all
computer systems, and to show you the concrete ways that these ideas affect the correctness, performance,
and utility of your application programs. By studying this book, you will gain some insights that have
immediate value to you as a programmer, and others that will prepare you for advanced courses in compilers,
computer architecture, operating systems, and networking.
The book owes its origins to an introductory course that we developed at Carnegie Mellon in the Fall of
1998, called 15-213: Introduction to Computer Systems. The course has been taught every semester since
then, each time to about 150 students, mostly sophomores in computer science and computer engineering.
It has become a prerequisite for all upper-level systems courses. The approach is concrete and hands-on.
Because of this, we are able to couple the lectures with programming labs and assignments that are fun and
exciting.
The response from our students and faculty colleagues was so overwhelming that we decided that others
might benefit from our approach. Hence the book. This is the Beta draft of the manuscript. The final
hard-cover version will be available from the publisher in Summer, 2002, for adoption in the Fall, 2002
term.
Assumptions About the Reader’s Background
This course is based on Intel-compatible processors (called “IA32” by Intel and “x86” colloquially) running
C programs on the Unix operating system. The text contains numerous programming examples that have
been compiled and run under Unix. We assume that you have access to such a machine, and are able to log
in and do simple things such as changing directories. Even if you don’t use Linux, much of the material
applies to other systems as well. Intel-compatible processors running one of the Windows operating systems
use the same instruction set, and support many of the same programming libraries. By getting a copy of the
Cygwin tools (http://cygwin.com/), you can set up a Unix-like shell under Windows and have an
environment very close to that provided by Unix.
We also assume that you have some familiarity with C or C++. If your only prior experience is with Java,
the transition will require more effort on your part, but we will help you. Java and C share similar syntax
and control statements. However, there are aspects of C, particularly pointers, explicit dynamic memory
allocation, and formatted I/O, that do not exist in Java. The good news is that C is a small language, and it
i