Welcome to CS103!¶
CS103 is an introductory operating systems course. The CS101 courses provide you with a solid foundation in programming methodology and abstractions, and CS102 builds up and expands your breadth and depth of programming experience and techniques, working from the C programming language down to the microprocessor to de-mystify the machine.
CS103 leverages this programming experience to introduce operating systems and how they work. With an understanding of both how to leverage operating system functionality in your own programs as well as how operating systems manage tasks behind the scenes, you will have a better understanding of how operating systems work, the kinds of design challenges present in operating systems and other large systems, and key computing ideas such as virtualization that are applicable in many different areas.
Topics covered include: filesystems, system calls, concurrency, multiprocessing, multithreading, race conditions, synchronization primitives, virtual memory, demand paging and operating system design challenges.
Prerequisites¶
Formally, the course prerequisite is CS102. Informally, you need to be familiar with the C and C++ programming languages, Unix/Unix, make, Makefiles, gcc/g++, valgrind, gdb, and have some experience with basic computer architecture (x86-64 as it’s taught in CS102, or exposure to some other architecture with the confidence and ability to pick up x86-64 as we reference it).
We’ll be coding in a mixture of C and C++ throughout the quarter:
Why C? Because the libraries needed to interface with system resources are written in it.
Why C++? Because the projects become large enough that we prefer to go with a language that supports encapsulation and generic programming better than C does.
You should understand pointers, dynamic memory allocation (malloc/realloc/free), and C strings well enough that you’re not intimidated by them. You should understand C++ classes, methods, references, templates, and C++’s new and delete operators. There are C++ features you’re not expected to know, but you should have enough programming maturity to pick those features up and search the web for reference materials as needed.
The first assignment is a systems programming assignment that should bring all relevant CS102 and software development skills back into rotation. If you haven’t taken CS102 or programmed in C and C++ before, but you’re able to work through our first assignment without too much drama, then you are more than qualified to take CS103.
Readings¶
The first required textbook is Computer Systems: A Programmer’s Perspective by Bryant and O’Hallaron, 3rd edition.
The second required textbook is Principles of Computer System Design: An Introduction by Jerome H. Saltzer and M. Frans Kaashoek.
Topics¶
Overview of Unix Filesystems - How can we design filesystems to store and manipulate files on disk?
Multiprocessing and Exceptional Control Flow - How can our program create and interact with other programs?
Threading and Concurrency - How can a single instance of our program perform multiple coordinated tasks at the same time?
Networking and Distributed Computing - How can we write programs that communicate over a network with other programs, and tackle large tasks using many machines?
Additional Topics: MapReduce, Caching, and Non-Blocking I/O
Course Structure¶
Lectures: understand concepts, see demos
Lab Sections: practice concepts, discuss with peers - great preview of homework!
Assignments: build programming skills, synthesize lecture/lab content
Assignments¶
There will be six programming assignments—that’s guaranteed. Assignments will, on average, require 10 - 20 hours per week to complete and will help you learn the material being exercised. We work very hard to craft each assignment to be as focused and as rewarding as possible. Each assignment requires you to draw upon your systems knowledge to build something you yourself might encounter regularly, such as a shell, a proxy, or a debugging tracer (a la strace/dtrace).
Assignment grades have two components: functionality and style. Functionality is graded by a series of automated tests and is worth 85% of your assignment grade. Style is graded on a bucket system (solid, minor problems, major problems, etc.) and is worth 15% of your grade. Programming style is important, but in the end, we care most that your code does what it’s supposed to do. All assignments are weighted equally.