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 \(\{\texttt{Java},\;\texttt{Python},\;\texttt{C++},\;\dots\}\) 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 small part of an OS
- a memory allocator
- a garbage collector
- several security exploits
Your Instructor’s Rationale
Adam likes to geek out on the material they’re teaching. So, they’ve inserted a bit of what they think 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
Administrivia
Now, we’ll go through the obligatory “administrivia” for the course.
Our Requirements
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.
Our Promises
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 course.)
- Course staff will hold an obscene number of office hours.
- Adam’s door (or “virtual door”) is always open.
False Expectations
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.
Grading
Your grade will be calculated using the following percentages for each assignment:
- disk = 7%
- jvm = 7%
- bomb = 6%
- asmgen = 11%
- shellcode = 11%
- malloc = 15%
- gc = 1% (extra credit)
- weensyos = 11%
- meltdown = 6%
- passwd = 11%
- final = 15%
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 B
, and
90-100 is some kind of A
.
Re-grade Requests
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
git
under any circumstances. Knowing how to usegit
is a pre-requisite of this course, and if you do not add a file before commiting and pushing, you are out of luck. Additionally, themaster
branch 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.
Late Tokens
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 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.
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.
Feedback? Questions?
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 labradoodle
, we are not responsible for according deductions in your grades.