Computer Systems A Programmer’s Perspective
aka CS:APP
Many systems books are written from a builder’s perspective, describing how to implement the hardware or the systems 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.
Assumptions about the Reader’s Background
- systems that execute x86-64 machine code.
1 | # print the machine hardware name |
- “Unix-like” operating systems.
1 | # print the operating system name |
- some familiarity with C or C++. (consider K&R an essential part of your personal systems library)
- the GNU gcc compiler running on x86-64 processors
- We do not assume any prior experience with hardware, machine language, or assembly-language programming.
How to Read the Book
Learning how computer systems work from a programmer’s perspective is great fun, mainly because you can do it actively. Whenever you learn something new, you can try it out right away and see the result firsthand. In fact, we believe that the only way to learn systems is to do systems, either working concrete problems or writing and running programs on real systems.
As you read, try to solve each problem on your own and then check the solution to make sure you are on the right track
a rating of the amount of effort
Of course, your system may have a different version of gcc, or a different compiler altogether, so your compiler might generate different machine code; but the overall behavior should be the same.
a number of Web asides containing material that supplements the main presentation of the book.
Book Overview
- Chapter 1: A Tour of Computer Systems.
- Chapter 2: Representing and Manipulating Information.
- Chapter 3: Machine-Level Representation of Programs.
- Chapter 4: Processor Architecture
- Chapter 5: Optimizing Program Performance.
- Chapter 6: The Memory Hierarchy
- Chapter 7: Linking
- Chapter 8: Exceptional Control Flow.
- Chapter 9: Virtual Memory
- Chapter 10: System-Level I/O.
- Chapter 11: Network Programming
- Chapter 12: Concurrent Programming
Labs
- Data Lab
- Binary Bomb Lab
- Buffer Overflow Lab
- Architecture Lab
- Performance Lab
- Cache Lab
- Shell Lab
- Malloc Lab
- Proxy Lab