CSE 120: Principles of Computer Operating Systems
Spring 2023
- Lectures
-
Mon, Wed, Fri 2–2:50pm (PCYNH 106)
- Discussion Session
- Wed 5–5:50pm (PCYNH 106)
- Instructor
-
Yiying Zhang
(yiying@ucsd.edu)
Office Hours: Mon noon-1pm (CSE 3124)
- TAs and Tutors
- Kaiyuan (Kyle) Wang (TA) k5wang@ucsd.edu
Fengyuan Wu (TA) fwu@ucsd.edu
Steven Wu (TA) s2wu@ucsd.edu
Charlotte Tang (TA) yit015@ucsd.edu
Yunxiang Chi (Tutor) yuchi@ucsd.edu
Yuke Liu (Tutor) yul063@ucsd.edu
Xiyan Shao (Tutor) x3shao@ucsd.edu
- TA/Tutor Lab Hours
- Calendar
- Discussion Board
- Piazza
- Textbook
-
Course Objectives
This course covers the principles of operating systems. It
emphasizes the basic concepts of OS kernel organization and structure,
processes and threads, concurrency and synchronization, memory
management, file systems, and communication. It is also a project
course, providing essential experience in programming with
concurrency, implementing and unmasking abstractions, working within
an existing complex system, and collaborating with other students in a
group effort.
Course Schedule
The following table outlines the tentative schedule for the course. We will
update it as the quarter progresses.
The optional readings include primary sources and in-depth
supplements for concepts in the class. Supplemental reading is for
your own interest — the readings are not required, nor will you be
tested on the material. Note that some of the links to the documents
point to the ACM Digital Library. UCSD has a subscription to the ACM
Digital Library, so you will need to use a web browser on campus to
access them.
Date |
Lecture |
Readings |
Optional |
Homework |
Project |
4/3 |
Course Intro
| CH. 1 |
|
|
|
4/4 |
(Tuesday) |
|
|
HW 1: Out |
PR 0: Out |
4/5 |
Intro to OS
|
CH. 2 |
The Structure of the 'THE'-Multiprogramming System
The UNIX Time-Sharing System |
|
|
4/7 |
Interaction between hardware, OS, and applications |
CH. 6 |
Linux context switch
A Case Against (Most) Context Switches (HotOS'21) |
|
|
4/10 |
Timer Interrupts, Processes |
CH. 4, CH. 5 |
A fork() in the road (HotOS'19) |
|
|
4/11 |
(Tuesday) |
|
|
|
PR 0: Due
PR 1: Out |
4/12 |
Process Creation |
CH. 26 |
POSIX Threads Programming
|
|
|
4/14 |
Threads |
CH. 27 |
Illustrated Tales of Go Runtime Scheduler
C++ Coroutine Tutorial
|
|
|
4/17 |
Synchronization |
CH. 28 |
|
|
|
4/18 |
(Tuesday) |
|
|
HW 1: Due
HW 2: Out
|
|
4/19 |
Synchronization Primitives |
CH. 29 |
RCU Usage In the Linux Kernel: One Decade Later (Linux RCU lock) |
|
|
4/21 |
Conditional Variables
| CH. 30 |
Monitors: An Operating System Structuring Concept
|
|
|
4/26 |
Semaphores |
CH. 31 |
|
|
|
4/27 |
(Thursday) |
|
|
|
PR 2: Out
|
4/28 |
Concurrency Bugs
| CH. 32 |
Understanding Real-World Concurrency Bugs in Go (ASPLOS'19) |
|
|
5/1 |
Midterm Review |
|
|
|
|
5/2 |
(Tuesday) |
|
|
HW 2: Due
HW 3: Out
|
PR 1: Due
|
5/3 |
Midterm Exam |
7pm - 8:50pm (Ledden Auditorium) |
|
|
|
5/5 |
Memory Management Overview |
CH. 15,
CH. 16,
| |
|
|
5/8 |
Paging
|
CH. 18,
CH. 19,
CH. 20
|
|
|
|
5/10 |
TLB, Swapping
|
CH. 21
|
|
|
|
5/12 |
Memory Allocation and Sharing
|
|
|
|
|
5/15 |
CPU Scheduling
| CH. 7, CH. 8 |
Lottery Scheduling (OSDI'94)
Shenango: Achieving High CPU Efficiency for Latency-sensitive Datacenter Workloads (NSDI'19) |
|
|
5/16 |
(Tuesday) |
|
|
|
PR 3: Out
|
5/17 |
Page Replacement
|
CH. 22,
|
|
|
|
5/19 |
Storage Devices
|
CH. 37,
|
|
|
PR 2: Due
|
5/22 |
File System Overview
|
CH. 39,
|
A File is Not A File (SOSP'11)
|
|
|
5/23 |
(Tuesday) |
|
|
HW 3: Due
HW 4: Out
|
|
5/24 |
File System Disk Layout
|
CH. 40
|
|
|
|
5/26 |
FFS and Buffer Cache
|
CH. 41
|
|
|
|
5/29 |
Memorial Day - No Class
|
|
|
|
|
5/31 |
File System Reliability
|
CH. 42
|
IRON File System (SOSP'05)
|
|
|
6/2 |
Distributed Systems and Data Centers
|
CH. 48
|
|
|
|
6/5 |
Cloud and Virtualization
|
|
Berkeley View of Cloud Computing |
|
|
6/6 |
(Tuesday) |
|
|
HW 4: Due
|
|
6/7 |
Systems and Machine Learning
|
|
|
|
|
6/9 |
Final Review
|
|
|
|
|
6/10 |
(Saturday) |
|
|
|
PR 3: Due
|
6/14 |
Final Exam |
3pm - 5pm (PCYNH 106) |
|
|
|
Course Organization
The course is organized as a series of lectures by the instructor,
discussion sections by the TAs, reading, homework, and project
assignments, and exams:
- Lectures: The lectures present the core of the material.
- Sections: The discussion sections are
given by the TAs to answer questions about the lecture, textbook
readings, homework assignments, and project assignments.
- Readings: The readings in the textbook provide preparation
and a reference for the lectures. Note, however, that they are
not a substitute for the lectures.
- Homeworks: There are approximately four homework assignments with
questions taken from the textbook and other materials. The homework assignments reinforce the readings and lectures.
- Projects: There are three programming projects (one of them is optional), all using
the Nachos instructional operating system.
- Exams: There are two exams, a midterm exam in the middle of
the quarter and a final exam at the end of the quarter. The exams
will cover the material presented in lecture, the homeworks, and the
projects.
Homework
The course will have four homeworks. I will post them as the
quarter progresses.
You will submit all your homework electronically via Canvas.
We will reduce homework grades by 20% for each day that they are late.
Due to extensive copying on homeworks in the past, we have changed
how homeworks are graded. As long as you submit a technical answer
related to the question, you will get full credit for the question.
The goal of the homeworks is to give you practice learning the
material. The homework questions both supplement and complement the
material from lecture and in the project, and you will also find the
homework questions to be useful for practicing for the exams. We
will post solutions to all homeworks after they are submitted, and
you can use them for studying as well. But, even with the
solutions, the amount you learn from the homeworks will be directly
correlated with your effort working on them.
I encourage you to collaborate on the homeworks: You can learn a
lot from your fellow students. Collaboration consists of discussing
problems with other students and independently writing your own
answers to the problems based upon those discussions. As a rule of
thumb, you should be able to discuss a homework problem in the hall
with others, go home, and then write up your answer to the problem on
your own.
Homework 1
Homework 1 Solution
Homework 2
Homework 2 Solution
Homework 3
Homework 3 Solution
Homework 4
Projects
The course has one tutorial project and three programming projects
using the Nachos instructional operating system.
Exams
The course has two exams, a midterm and a final. The midterm will
cover the first half of the class, and the final will cover the
second half of the class.
Discussion Sections
Discussion sections answer questions about the lectures,
homeworks, projects, and programming environment. They may also
supplement the lectures with additional material.
Grading
Your grade for the course will be based on your performance on the
homeworks, midterm exam, final exam, and projects, as follows.
- Homeworks: 6%
- Midterm: 22%
- Final: 28%
- Projects: 44%
The academic
honesty guidelines outlined by Charles Elkan apply to this course.
I urge you to resist any temptation to cheat, no matter how desperate
the situation may seem. If you are in circumstances that you feel
compel you to cheat, come to me first before you do so.