Computer Science
>
>

CS 131: Fundamentals of Computer Systems

Spring 2020

Brown University

This course delves deep into the foundational principles behind computer systems, ranging from hardware intricacies to the vast global internet. Students gain insights into systems programming, the architecture of computer systems, concurrency, and the dynamics of distributed systems. Notably, the curriculum includes projects that offer hands-on experience, like building library functions, creating a toy OS, and designing a scalable key-value storage service. It's a stepping stone to advanced courses like Distributed Systems, Databases, and Computer Systems Security.

Course Page

Overview

The goal of CS 131/CSCI 1310 is to teach the fundamentals behind the "magic" of computer systems from the hardware level to the global internet. We'll cover the ideas, principles and abstractions that unify computer systems design – from how your laptop runs multiple programs at the same time, to how companies like Instagram, AirBnB, and Google operate large websites, to how easy it is to exploit security vulnerabilities on badly designed systems. This is a great class for students who are interested in learning what systems programming is, how systems work, and why these systems are so critical to modern technology.

Prerequisites

CS 131/CSCI 1310 is open to anyone who has completed the introductory sequence (i.e., CS 16, 18, or 19). For students who don't satisfy the registration restrictions on CAB, please request an override code on CAB and include an explanation of your course experience, and we'll review your request.

Learning objectives

We will look at topics arranged in four main blocks during the course, building up your understanding across the whole systems stack:

  1. Computer Systems Basics: programming in systems programming languages (C and C++); memory; how code executes; and why machine and memory organization mean that some code runs much faster than other code that implements the same algorithm. Project: you will build your own versions of standard library functions and a vector data structure (strvec), and you will develop your own debugging memory allocator, helping you understand common memory bugs in systems programming languages (DMalloc).
  2. Fundamentals of Operating Systems: how your computer runs even buggy or incorrect programs without crashing; how it keeps your secrets in one program safe from others; and how an operating system like Windows, Mac OS X, or Linux works. Project: you will implement memory isolation via virtual memory in your own toy operating system (WeensyOS)!
  3. Concurrency and Parallel Programming: how your computer can run multiple programs at the same time; how you can share memory even if running programs on multiple processors; why programming with concurrency is very difficult; and how concurrency is behind almost all major web services today. Project: you will implement the server-side component of a peer payment application called "Vunmo", and make it handle requests from many users.
  4. Distributed Systems: what happens when you use more than one computer and have computers communicate over networks like the Internet; how hundreds of computer can work together to solve problems far too big for one computer; and how programs running distributedly can survive the failure of participating computers. Project: you will implement a sharded key-value storage service that can (in principle) scale over hundreds or thousands of machines.

The first block, Computer Systems Basics, begins today. It's about how we represent data and code in terms the computer can understand. But today's lecture is also a teaser lecture, so we'll see the material raise questions that you cannot yet answer (but you will, hopefully, at the end of the course!).

Textbooks and other notes

What does CS 131 count for? CS 131/CSCI 1310 is a 1000-level course that can count as a related course in the systems pathway of the CS concentration and masters. In addition, CS 131 will satisfy the prerequisites for CSCI 1380 (Distributed Systems), CSCI 1270 (Databases), CSCI 1650 (Software Security and Exploitation), CSCI 1660 (Computer Systems Security), CSCI 1730 (Programming Languages), CSCI 1951-A (Data Science), CSCI 1680 (Computer Networks), and CSCI 2390 (Privacy-Conscious Computer Systems).

Other courses in Computer Systems

CS 110: Principles of Computer Systems

Winter 2022

Stanford University

CSE 351 The HW/SW Interface

Autumn 2022

University of Washington

CS 107e Computer Systems from the Ground Up

Winter 2023

Stanford University

CS 107A: Problem-solving Lab for CS 107

Autumn 2022

Stanford University

ELE/COS 475 Computer Architecture

Fall 2019

Princeton University

Courseware availability

Lecture notes and codes available at Schedule

No videos available

Assignments and labs available at Assignements

Exercises available at Resources

Covered concepts