CPEN 331. Operating Systems. Fall 2018

Course staff


Office hours: 
By appointment*. KAIS 4113
Teaching assistants:
Ivan Zinin
 (L1A: Friday 5-8pm)
Camellia Peng (L1F: Friday 5-8pm)
James Asefa (L1A / L1F: 
Friday 5-8pm)

Andie Montoya (L1C: Tuesday 5:30-8:30pm)
Neema Boutorabi (
L1E: Tuesday 5:30-8:30pm)
Tony Li (L1C / 
L1E: Tuesday 5:30-8:30pm)

All questions regarding the course must be asked on Piazza. Please do not email the course staff directly. 
Sign up for Piazza!

Location and time

September 7 -- November 30, 2018

Fridays 12-2pm and 3-4pm. ANGUS 098.

Learning outcomes

By the end of the course you will:
  • Understand key operating system concepts, such as resource virtualization, protection and concurrency. 
  • Be very comfortable navigating around the OS161 source code -- a teaching operating system highly resemblant of BSD.
  • Have implemented crucial parts of the kernel infrastructure, such as synchronization primitives, processes and file tables, system calls and virtual memory. 
  • Be very comfortable with kernel development tools, such as common editors (emacs, vim), code-browsing tools (e.g., cscope), a debugger (gdb) and a source control system git.
  • Have enough confidence to hack a real operating system. 

Grading formula

The following formula will be used to assign your raw mark for the class. The raw mark will then be used to determine your final letter grade. While the raw mark will be the primary determinant of your final grade, it will not directly translate into the official course mark, as we normally take other considerations into the account, such as how much you contributed to the team work and your overall grasp of OS concepts. 
  • 50% Assignments 0-6. (2% for Assignment 1, 8% for each of the remaining assignments).
  • 10% Class participation -- asking good questions and providing good answers to questions posed by your classmates on Piazza, asking and answering questions in class. See the How to ask questions section below. 
  • 20% i-clicker and online quizzes
  • 20% oral final exam. You can automatically pass the final oral exam (with the maximum score) if you demonstrate the knowledge of the OS161 source base via interaction with the TAs, the instructor and by providing good answers on Piazza. 
A large portion of assignment grades will be allocated to code quality. That's right, in addition to running tests to see if your code does what it's supposed to do, the instructors will read your code to evaluate other aspects of its quality. This means that even if your code passes all the tests, you may not get a 100% mark if your code is poorly documented or if it contains other markers of "bad" coding style. On the positive side, this also means that if your code did not pass the tests, you can still get some marks for code quality if you followed good coding practices. Use this document as a guideline for writing high-quality code.

Rules on completing assignments

  • Assignments 0-3 must be completed on your own. 
  • Assignments 4-6 must be completed in teams of two. This document provides guidelines on working in teams. 
  • You cannot submit the code written by someone else, except yourself and your parter (for A4-A6). 
  • Submitting someone else's code constitutes cheating and will not be tolerated. 
  • You get a total of 7 late days for assignments 4-6. No late days for Assignments 0-3. 

Policy on cheating

Cheating is not tolerated. You are to write the code for assignments and to answer the code-reading questions by yourself. This means that you must write all the code from scratch, using only what is available in the OS161 code that is given to you. More precisely, you cannot take someone else's code that contains the answer, modify it and submit it as your own. We will use a highly effective system that easily catches code similarity (even if you rename functions and reorder statements), and that is very proficient and catching cheaters. We practice zero-tolerance policy on cheating. If you are caught cheating, you fail the course and your case is reported to the University. 

That being said, we will do our best to help you get through the course on your own. We understand that this is a very challenging course and there will be very few people (ever) who will turn up perfect solutions to all assignments by the deadline. Therefore, we will assign grades accordingly. If you work hard, and put lots of concerted and earnest effort into this course you will get a decent grade. Trust us, hard work will pay off. Cheating will not.  

How to ask questions

All questions must be asked during labs, office hours or on Piazza. We will not respond to questions posed by email, with very rare exceptions. We will reward those who ask good questions and respond in a helpful way to questions posed by others. Read the following guides on asking questions:
If you abuse the Q&A system by being rude, offensive or by engaging in behaviour that can be described as harassment you may get disciplined in the same way as you would by misbehaving in the classroom. Hiding behind a Piazza alias is not an excuse for being obnoxious. See UBC policy on unacceptable behaviour


During the course we will read articles from these online textbooks:
  1. The MIT's Xv6 source code booklet and textbook/commentary. Click here and here for the locally cached versions of these texts.
  2. The OSTEP book by Remzi and Andrea Arpaci-Dusseau, 
plus a bunch of online material.

What to bring to class

  • A laptop with your OS161 code
  • Your iClicker
  • A nameplate like this

Why are office hours by appointment?

Previous experience showed that it is very difficult to find the time for the office hours that will be convenient for every student. As a result, students usually do not come to office hours, but instead contact me to schedule an appointment. For that reason, I decided to hold office hours by appointment only. Furthermore, if you'd like we can talk on Skype or Google hangouts if you can't make it to my office during business hours.