Computer Science
>
>

CS 162: Operating Systems and Systems Programming

Fall 2022

UC Berkeley

This course introduces operating systems design and related concepts. It covers topics like memory allocation, file systems, basic networking, transactions, and security. The course requires foundational knowledge in data structures, assembly language, C programming, and debugging. It aims to improve students' skills in debugging large programs and computational problem solving.

Course Page

Overview

The purpose of this course is to teach the design of operating systems and operating systems concepts that appear in other computer systems. Topics we will cover include concepts of operating systems, systems programming, networked and distributed systems, and storage systems, including multiple-program systems (processes, interprocess communication, and synchronization), memory allocation (segmentation, paging), resource allocation and scheduling, file systems, basic networking (sockets, layering, APIs, reliability), transactions, security, and privacy.

Prerequisites

CS 61A, CS 61B, CS 61C, and CS 70, or equivalent courses. This means that you understand:

  • Data structures: arrays, linked lists, binary trees, and hashing
  • Assembly language programming
  • The C programming language
  • Debugging C using GDB
  • CPU caches and memory hierarchy
  • Virtual memory as covered in CS 61C
  • CPU pipelines and basic digital logic design
  • Basic knowledge of random variables and probability distributions as covered in CS 70

The TAs will spend a small amount of time reviewing some of the material you are less likely to remember. We will assume that you either know the material that is supposed to be covered in those courses, or that you are willing to learn the material as necessary. We will not spend time in lecture covering any of this material. Perhaps more important than formal prequisites, however, is experience and maturity with debugging large programs, designing and implementing useful abstractions, and computational problem solving in general. This class will exercise your skills in these areas.

If you feel that you would benefit from additional review of these prerequisites, we recommend using the following resources:

  1. For a good review of probability as you’ll need it in this class, read through CS 70 Lecture Notes 15, 16, 17, 18, and 19.

  2. Hennessy, John L. and Patterson, David A. Computer Architecture: A Quantitative Approach. 5th edition. Although the main content of this book goes far more in-depth into computer architecture than you are expected to know for this class, the appendices provide an excellent overview of some of the prerequisites. Focus specifically on the sections below:

  • 2.1 and B.1 - B.4 (you can skip the sixth optimization in B.3) review caching, virtual memory, and memory hierarchies.
  • C.1 - C.2 review CPU pipelines at the level of CS 61C.

Learning objectives

No data.

Textbooks and other notes

We are using the textbook “Operating Systems: Principles and Practice” by Anderson and Dahlin (A&D). The reading from this textbook is strongly recommended. There will be some additional readings that are not from this textbook that are freely available online. These will be linked on the course website in the "Readings" column for your viewing.

Strongly Recommended

Operating Systems: Principles and Practice (2nd Edition)

Recommended

Operating Systems: Three Easy Pieces

Supplemental

Linux Kernel Development (3rd Edition)

Other courses in Operating Systems

CS240 Advanced Topics in Operating Systems

Winter 2023

Stanford University

CS 140: Operating Systems

Spring 2020

Stanford University

CSE 333 Systems Programming

Summer 2022

University of Washington

CS 111 Operating Systems Principles

Autumn 2022

Stanford University

CS 140E: embedded operating systems

Winter 2023

Stanford University

Courseware availability

Lecture slides available at Schedule

No videos available

Homework available at Schedule

Projects available at Schedule

Resources available at Resources

Covered concepts