CS 326 Operating Systems

Course Website:

Lecture: LS 307 TR 12:45pm-2:30pm
Lab: LS 307 W 1:00pm-3:20pm

Midterm: TBA
Final: Thursday, December 15th 12:30pm-2:30pm


Instructor: Greg Benson
Phone: 415.422.5066
Office: Harney 533

Teaching Assistants

Jinfa "Jeff" Zhao,
Hanzhou "Joe" Shi,

Course Objectives and Topics

Operating systems are essential to most modern computer systems, from very small computing devices such as mobile phones and tablets to larger computers such as laptops, desktop computers, workstations, clusters, and supercomputers.  An operating system has two fundamental tasks: to manage a computer's resources (i.e., CPU cycles, memory, disk, network interface, etc.) and to provide applications with an abstract interface to these resources so that they are (relatively) easy to use.

In this course you will learn the fundamental principles of operating system design and implementation.  You will learn how the principles are used in practice by writing system software and complete components of an operating system, including the system call interface, user processes, virtual memory, and a file system.  We are going to study a small scale version of UNIX called xv6 developed at MIT and we will write kernel code from scratch for the Raspberry Pi.

Learning Outcomes

On completion of this course the student should be able to accomplish the following:
  • Understand and evaluate operating system implementations.
  • Understand the implementation of fundamental OS structures, including
    • Threads, processes, system calls, scheduling, virtual memory, and file systems
  • Develop UNIX system software.
  • Write and debug concurrent programs.
  • Debug complex systems and low-level software.
  • Work with UNIX tools such as make and git.


  • CS 220 C and Parallel Programming with a grade of C or better.
  • CS 245 Data Structures and Algorithms with a grade of C or better.
  • An understanding of basic data structures such as linked lists, queues, trees, and hash tables.
  • Good C programming skills.

Course Materials

You will need to purchase a Raspberry Pi 2 in order to do many of the projects. You will also need a few accessories.

We have a required textbook:

Operating Systems: Principles and Practice, 2nd Edition
Thomas Anderson and Michael Dahlin
Recursive Books
ISBN-10: 0985673524
ISBN-13: 978-0985673529

You should also already have the K&R book from CS 220:The C Programming Language, 2nd Edition

Brian W. Kernighan and Dennis M. Ritchie
ISBN-10: 0131103628
ISBN-13: 978-0131103627

I will provide addition material on the class website.

Assignments and Exams

Tentatively, there will 7 programming projects.  For the projects you will need to submit you solutions to git repositories for each project. 

We will have regular in class quizzes based on the assigned reading and lecture material. The quizzes will be short answers and you will be submitted your answers online via Canvas. Generally the quizzes will be at the beginning of class. We may not have quizzes some weeks.

There will be one midterm and a final.  The purpose of the exams will be to assess your understanding of the topics covered in class, in the assignments, and from the book.  The material covered on the exams will be based on the assigned reading, information presented in lecture, and what you learn by doing the assignments.  The exams will be closed book and closed notes.



 Quizes 10%
 Projects (7) 50%
 Midterms (1) 10%
 Final 30%


All assignments will be worth 100 points.  Grading will be done on an absolute scale:

 Min A-
 Min B-
 Min C-
 Min D-

If you score 90% or higher will be guaranteed an A-.

Exam grade policy: If you score less than 60% on your aggregate exam score (midterm + final) you will receive an F in the course.

Due Dates and Attendance

Assignments must be turned in on time to receive credit.  Except in the most extreme situations, late assignments will not be accepted.  If you cannot complete an assignment by the due date, hand in whatever you have done in order to receive partial credit.

Class attendance is not strictly required, but you must be present in class to take the quizzes, you cannot take the quizzes outside of class. You are responsible for all material presented and discussed in class, including and code examples worked out in class. Please show up on time to class.

Missed Exams

Make-up or early exams will not be given except in the most extreme situations.  If you must miss an exam due to extreme illness, etc. contact the instructor (email is fine) or leave a message with the Department of Computer Science office (415.422.6530) before the exam.

Laptop Usage in Class

You may use your laptop during class as long as you are using it in order to take notes or to look up information regarding the lecture content.  Please do not user your laptop for any other activity such as to read or compose email, to use instant messaging software, or to play games.  This is very disruptive to me and the other students in the class, not to mention that it will distract you from learning the material.  If I have reason to believe you are not using your laptop in a productive way I will ask you not to use it in class.

Cheating and Plagiarism

All students are expected to know and adhere to the University of San Francisco's Academic Honor Code. Go to for details.

You must never represent another person’s work as your own.

Copying answers or code from other students or sources during a quiz, exam, or for a project or homework assignment is a violation of the university’s honor code. This includes copying code or other material from the web, and having anyone other than yourself complete your assignments. It also includes working too closely with another student. Collaboration or discussion that results in the same or very similar code indicates that you have not placed enough independent work into your solution and is a violation of the honor code.

Flagrant or repeat violations of the honor code will result in an F in the course, a report to the University Academic Integrity Committee, and a report to the Dean.

Examples of honor code violations include but are not limited to:
  • Giving your code to another student.
  • Submitting code written by anyone other than yourself as your own.
  • Copying text from the web.
  • Discussing implementation details of a solution with another student.
  • Discussing code-specific details of a solution with another student.


When you email the instructor, TA, or the mailing list, be sure to email from an account to which we can directly reply.