Welcome to CS 24! There are many lenses to study computer systems through, but, in practice, traditional introductory systems courses focus on one of the two following perspectives (to the exclusion of the other one):
The Programmer’s Perspective
You are a programmer, and you want to write fast, safe programs that might interact with your OS.
The System Builder’s Perspective
You are a “system’s person” and you want to understand how your entire computer works by building the pieces one by one.
Course Goals and Learning Outcomes
In CS 24, we aim to satisfy both customers’ appetites by blending these perspectives together.
You will learn…
- realities that will change how you program
- how to interact with the OS
- how to write concurrent programs
- how to write code with a security mindset
- what you need to take more systems courses
You will build…
- a (java) virtual machine
- a small compiler
- a memory allocator
- a garbage collector
- several security exploits
Your Instructor’s Rationale
Adam likes to geek out on the material he’s teaching. So, he’s inserted a bit of what he thinks is cool into this course: Compilers and interpreters are cool. So, we’ll spend some time thinking about the low-level parts of a compiler. Security is cool. So, we’ll spend some time thinking about the “security mindset” and how to break things. Real-world software is cool. So, we’ll spend some time re-writing core pieces of the system.
By the end of the course, you will be able to:
- Differentiate between how Java and C code run on modern machines
- Translate between high-level and low-level programming languages
- Defend trade-offs between efficiency, security, readability, and performance in your programs
- Explain the mechanisms modern systems use to protect, manage, and virtualize memory
- Describe how modern computers give the illusion of running multiple things at once
- Design a concurrent program which does not have any race conditions
Now, we’ll go through the obligatory “administrivia” for the course.
The following is a tight list of pre-requisites for this course. If any of these do not apply to you, do not take CS 24 this term.
- You know data structures at the level of CS 2. We will not explain data structures or algorithms that we assume you learned in CS 2.
- You know C at the level of CS 3 (or equivalent). Notably, we will assume more than the entire CS 11 C track gets through by the very first assignment of this course.
- You understand that correctness is critical in systems programming. Code that does not pass all the tests will receive no credit in this course.
As a consequence of our strict list of pre-requisites, we will promise the following on our end (assuming you meet the pre-requisites):
- Course staff will do our best to help you when you get stuck.
- Course staff will promptly respond to the course Campuswire
- Course staff will grade each assignment within two weeks of when you turn it in. (Notably, we have tried to automate as much of the grading as possible; so, you should never be surprised by a grade in this coure.)
- Course staff will hold an obscene number of office hours.
- Adam’s door (or “virtual door”) is always open.
We have noticed some common false expectations of this course. So, we want to explicitly remind you that this course is not any of the following:
- This is not a C course. We assume that you’ve already taken a rigorous C course.
- This is not an EE course. We will primarily work on the boundary between software and hardware. We do not plan to go too close to hardware.
- This is not a hardware course. If you want to build your own processor, take an EE course instead.
Your grade will be calculated using the following percentages for each assignment:
- disk = 7%
- jvm = 10%
- asmgen = 13%
- shellcode = 13%
- malloc = 13%
- gc = 8%
- meltdown = 10%
- git = 13%
- final = 13%
Please note that there is no way to receive a
D in this course. Any score at or below 69% is considered an
F, 69-70 is a
D+, 70-80 is some kind of
C, 80-90 is some kind of
90-100 is some kind of
Please carefully consider the following three warnings before asking for a re-grade:
- Code that fails the correctness tests that we provide will receive no credit.
- We reserve the right to have private tests. Passing all the tests we give you does not mean your code will receive full credit.
- We will not accept projects or files late due to misuse of
gitunder any circumstances. Knowing how to use
gitis a pre-requisite of this course, and if you do not add a file before commiting and pushing, you are out of luck. Additionally, the
masterbranch will lock at the assignment deadline and your terminal will display an error if you try to push after this point. If you, for some reason, were granted an extension, push to a different branch. If you ignore the error, we will not accept late work.
To maintain consistency, all regrade requests should go directly to Adam via e-mail. Do not attempt to contact TAs about grading questions.
In this course, you can earn late tokens (which are redeemable for a no-questions-asked 24 hour extension) for mastering the material in each lecture/reading. For each topic, you will earn 1/3 of a late token for attending the lecture or 1/6 of one for answering all the questions in one page of reading correctly. You will not earn more late tokens for doing both. You may not go into late token debt (though mental or physical health concerns need not use late tokens at all). You may only use up to two late tokens on any given assignment.
Please note that the server will only register that you’ve completed the quickcheck questions on a page if you click the “Submit Answers For Credit” button at the bottom of the page.
The Course Plan (aka the five lies)
In this course, we will work our way up the “abstraction ladder” specifically emphasizing things that all programmers need to know. We’ll pay special attention to uncovering the truth behind the lies. “What lies are those?” you might ask…here’s a few important ones we hope to dispel throughout the term:
- we compute with integers
- you only need Python
- memory is like an array
- constant factors don’t matter
- your computer runs all your programs at the same time
In this course, we will limit our discussions in the following ways:
- We will only cover the x86-64 architecture (not ARM or RISC-V)
- We will assume we’re working with Linux
- Our case studies will be limited to the Intel Nehalem microarchitecture
We have a reference machine set up which you should use for all of the projects. The pre-test includes a section on getting this environment set up.
Did you know you can leave feedback or ask questions using the annotation tool on the top right of every page on this website? Check it out!
If you do not use
compute-cpu2, we are not responsible for according deductions in your grades.