The book material provides a programmer's view of how computer systems execute programs, store information, and communicate. It enables students to become more effective programmers, especially in dealing with issues of performance, portability and robustness. It also serves as a foundation for courses on compilers, networks, operating systems, and computer architecture, where a deeper understanding of systems-level issues is required. Topics covered include: machine-level code and its generation by optimizing compilers, performance evaluation and optimization, computer arithmetic, memory organization and management, networking technology and protocols, supporting concurrent computation, etc..
All labs are avaliable on the cs:app website.
- Lab 1 Data Lab: Students implement simple logical, two's complement, and floating point functions, but using a highly restricted subset of C. For example, they might be asked to compute the absolute value of a number using only bit-level operations and straightline code. This lab helps students understand the bit-level representations of C data types and the bit-level behavior of the operations on data.
- Lab 2 Bomb Lab: A "binary bomb" is a program provided to students as an object code file. When run, it prompts the user to type in 6 different strings. If any of these is incorrect, the bomb "explodes," printing an error message and logging the event on a grading server. Students must "defuse" their own unique bomb by disassembling and reverse engineering the program to determine what the 6 strings should be. The lab teaches students to understand assembly language, and also forces them to learn how to use a debugger.
![](https://private-user-images.githubusercontent.com/127229451/354981975-df5e4774-7642-4897-9148-d4a2c7e4f658.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNTI5ODcsIm5iZiI6MTcyNDE1MjY4NywicGF0aCI6Ii8xMjcyMjk0NTEvMzU0OTgxOTc1LWRmNWU0Nzc0LTc2NDItNDg5Ny05MTQ4LWQ0YTJjN2U0ZjY1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMFQxMTE4MDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNDhhYmRkNjBlZjNhOWYyYzY1ZGQ0MTk2ZDNhYmQ2MWE1NWRkZDcwNGY0MWVlMjM4MjYzNDEyMDYyMmVhOTRkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.42sjSuVa7A8s3LFuNPUy-kPDPsNhKskTE8DGSBhCn7g)
- Lab 3 Attack Lab: Students are given a pair of unique custom-generated x86-64 binary executables, called targets, that have buffer overflow bugs. One target is vulnerable to code injection attacks. The other is vulnerable to return-oriented programming attacks. Students are asked to modify the behavior of the targets by developing exploits based on either code injection or return-oriented programming. This lab teaches the students about the stack discipline and teaches them about the danger of writing code that is vulnerable to buffer overflow attacks.
![](https://private-user-images.githubusercontent.com/127229451/355669445-6ce4346f-8978-4d5d-b11b-529a293d8ba4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNTI5ODcsIm5iZiI6MTcyNDE1MjY4NywicGF0aCI6Ii8xMjcyMjk0NTEvMzU1NjY5NDQ1LTZjZTQzNDZmLTg5NzgtNGQ1ZC1iMTFiLTUyOWEyOTNkOGJhNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMFQxMTE4MDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wMDU5NGFkNTI0YTk2YWY1NDg1ZjhjMDIwMmI5YTk2MWM5Yzk4YmU3MjQ1OTQzOTI2OGE5ZmQ3MjdhNTI3NTkxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.0DkRAb1q68rpukHkDarsa00UtfBRWhH7dAMhIRBTSe8)
![](https://private-user-images.githubusercontent.com/127229451/355670684-82de30c7-6e24-4390-b6f1-b5b03ddefc55.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNTI5ODcsIm5iZiI6MTcyNDE1MjY4NywicGF0aCI6Ii8xMjcyMjk0NTEvMzU1NjcwNjg0LTgyZGUzMGM3LTZlMjQtNDM5MC1iNmYxLWI1YjAzZGRlZmM1NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMFQxMTE4MDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xOWQ3ZTIyNTVmMGRjODMyM2M1NDhmOTQ2YjNiYWU4ZTYwZjgxMjI2NWZiNTY4MjA0NDkzOGY2NTU0NGI1M2RjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.yhlKBLKSbQM08SCVjJ1XbGawsXf8oSHwUBmkCZ7L53k)
- Lab 4 Architecture Lab: Students are given a small default Y86-64 array copying function and a working pipelined Y86-64 processor design that runs the copy function in some nominal number of clock cycles per array element (CPE). The students attempt to minimize the CPE by modifying both the function and the processor design. This gives the students a deep appreciation for the interactions between hardware and software.