Click here to see a PREVIEW of important rules that was posted before the summer session started.

This is an undergraduate course on computer operating systems. (But only graduate students are permitted to be in this class. USC undergraduate students must take CS 350 in order to get credit for OS. If you are an undergraduate student, you cannnot be in this class and you cannot get credit for Operating System if you take this class. Please check with your adviser to see which Operating System class you need to take!) In addition to exploring concepts such as synchronization, virtual memory, processes, file systems and virtualization, students will develop elements of a fairly complete operating system during the course of the semester.

Instructor Bill Cheng (click to see office hours)
E-mail: <>.  (Please do not send HTML-only e-mails. They will not be read.)
Time TuTh 9:30am - 11:30am 
Location OHE 136 
TA Ben Yan, E-mail: <>
Office Hours: Wed 2:00pm - 4:00pm on Zoom
Grader Aditya Chandupatla, E-mail: <>.
(If needed, the grader will hold office hours the week after the announcement of each assignment's grades.)
Midterm Exam during class, 9:30am-11:30am, Tue, 7/7/2020 (firm).
Final Exam 9:30am-11:30am, Tue, 8/4/2020 (firm).
Class Resources
Description   :   textbooks, topics covered, grading policies, additional resources, etc.
Lectures   :   information about lectures (and lectures slides in PDF format).
Videos   :   information about DEN lectures and discussion sections videos.
Discussions   :   information about discussion sections.
Projects   :   programming assignments (please also see important information about the class projects below.)
Forum   :   Google Group online forum for discussing course materials and programming assignments. You are required to be a member of this group. (This group is initially by invitation only.) Please do not send request to join this group until after the first lecture.
(in reversed chronological order)
  • 6/30/2020: Midterm rehearsal is tomorrow (7/1/2020) at 10am. Here is the instructions for the midterm rehearsal. If anything is not clear, please feel free to ask me.

    • Make sure you have setup an e-mail filter to never miss an e-mail from <> (and never have it go into your spam folder).

    • By 9:55am, get your desktop ready. Display a clock app and a web browser as shown. Then follow the instructions to start Zoom just in case you may lose Internet connection later. Don't start recording your desktop yet. Just go as far as seeing the main Zoom window. You might also want to have your submission PIN handy because you will need it later. Set an alarm for 10:39:00am to remind yourself that the exam is about to end soon (and make sure the time on your alarm clock is correct).

    • Watch your inbox. You will get an e-mail from me right before 10:00:00am and you can start working on the exam as soon you get my e-mail. There will be 2 links in the e-mail. The first link is for downloading a ZIP file which contains the exam questions and an answers text file. Click on it to download the ZIP file and then open it. Save a copy of the answers text file on your desktop for easy access. The second link is for submitting your answers text file when you are done. You should click on it and look at the submission web page. Right above the submission web form, you should see the current time on the submission server. If that time is different from the time on your desktop clock app, you should fix your desktop clock app to sync your desktop clock with a recommended clock server for your computer.

    • If by 10:00:00am, you have not received my e-mail, please send me an e-mail to as soon as possible.

    • Go to your desktop and click open the answers text file and work on your exam. Feel free to make submissions if you are done early.

    • When your alarm goes off at 10:39:00am, you need to wrap things up and get ready to submit your exam answers text file.

    • At 10:40:00am, you must stop working on your answers. Save your answers text file and go to the submission web page. (Of course, if you have already made a successful submission and have saved a copy of the ticket you got and you haven't changed your answers, you are done and you can stop right here.)

    • Reload/refresh the submission web page and make sure that you are seeing the current time on the submission server right above the submission web form. If reloading the web page failed, you must follow the instructions (all the way to the end of that web page) to use Zoom to record your desktop and your exam answers and e-mail photos of your exam answers to me.

    • If reloading the web page was successful, you should fill out the submission web form and click on the Choose File button and select the answers text file that you have just filled out saved. Click on the Upload button. If you get any popup messages, please read them carefully and follow the suggestions there. If the submission server is busy, you should not be surprised because many students are making submissions simultaneously. So, all you have to do is to repeat the previous step and this step repeatedly until you can make a successful submission (i.e., you are presented with a submission ticket and you should save a copy of that ticket).

    Since this is a rehearsal, I would strongly recommand and everyone try out the procedure to use Zoom to record your desktop and your exam answers and take photos of your exam answers (and you can e-mail the photos to yourself as a test) and try it for a few times until you feel comfortable with the procedure just in case you may lose your Internet connection when you are submitting the real exam answers next week.

  • 6/26/2020: On slide 50 of Lecture 12, I mentioned that we will have a midterm rehearsal at 1pm on Thursday, 7/2/2020. I have decided to move the rehearsal to Wednesday, 7/1/2020 at 10am (since the real midterm will start at 10am as well). If you are not available at that time, it's not a big deal. You can try out the procedure at any time afterwards. It's important that you try out the procedure so you can plan things out for the real midterm exam (such as where to put your answers text file to make it super easy to submit it, practice Zoom recording of your desktop when you are submitting, etc.)

  • 6/25/2020:  The midterm exam will be a 40-minute long take-home exam (open book and open notes), although you are only permitted to work on the exam during 10:00am-10:40am on Tue, 7/7/2020 (you can work up to the time instance right before 10:40am). You will be required to sign and submit an Academic Integrity Honor Code Pledge where you will promise that you will work on the exam alone and you will only work on the exam during the assigned exam time.

    Starting at 10:40am, you have 3 minutes to submit your answers text file (submission procedure is very similar to the submission procedure of programming assignments). It should be clear from above that during these 3 minutes, you must not be working on your exam. If your submission timestamp is later or equal to 10:43am, your submission is considered late and you will lose 5% for each late minute, starting at 10:43am.

    Some students will claim that they have Internet connectivity problem and that's why they cannot submit on time. The ONLY way the late submission penalty can be waived is for you to submit PROOF (using a Zoom video) that you had Internet connectivity problem during the submission process. The Zoom video must show that you started to have Internet connectivity problem during the first 3 minutes starting at 10:40am and the video must continue to record until you have made a successful submission. I know this can be stressful if you often experience Internet connectivity problem. Therefore, if you often have Internet connectivity problem, you need to practice recording such a Zoom video in case you will need it when you submit the real midterm. Please follow the posted instruction and practice the recording of submitting a small text file provided here using the web form for submitting Warmup #1.

    Please note the following:

    • Please do not record anything before 10:40am.
    • You can make as many submission as you'd like before 10:40am.
    • Since you must not be working on your exam after 10:40am, all your submissions made after 10:40am should be identical. Therefore, by default, we will grade your first submission after 10:40am, unless it's very obvious that you have selected a wrong file to submit.
    • If you did not make a submission after 10:40am, by default, we will grade your last submission (unless I got an e-mail from you asking me to grade an earlier submission).

    Please note that every time you reload a submission web page, the time at the submission server displayed right above the web form will be refreshed. If you can successfully reload the web form and see the time change, it means that you do NOT have a Internet connectivity problem! In this case, if your submission attempt failed, most likely it's because the submission server is busy due to many students submitting at the same time. Therefore, please keep reloading and re-submitting and before long, your submission should go through. On the other hand, if reloading the submission web page does not work, then you must record your desktop with Zoom and keep the recording going until you get your Internet connection back and you can make a submission. Please see the posted instruction to know when to stop recording.

    The midterm exam will cover everything from the beginning of the semester to slide 40 of Lecture 12 on 6/25/2020, MINUS Chapter 5 (i.e., material in Ch 5 is excluded from the midterm). Also included are discussion section slides from Week 1 through Week 6.

    Regarding what types of questions will be on the midterm, please see the Exams section of the course description web page and slides 42 through 53 of Lecture 12 on 6/25/2020.

    Here is a quick summary of the midterm exam topics (not all topics covered may be listed):

    • Ch 1 - Introduction
      • introduction
      • a simple OS
      • files
    • Ch 2 - Multithreaded Programming
      • thread creation, termination
      • thread synchronization
      • thread safety, deviations
    • Ch 3 - Basic Concepts
      • context switching, I/O
      • dynamic storage allocation
      • static linking and loading
      • booting
    • Ch 4 - Operating-System Design
      • a simple system
      • storage management
    • Warmup assignments 1 & 2
      • specs
      • FAQs
      • my posts to class Google Group
    • Kernel assignment 1
      • spec
      • FAQ
      • my posts to class Google Group

    Please note that kernel 1 is included in the midterm coverage but Chaper 5 is not. This mean that I can ask weenix-specific questions in the midterm exam.

  • 5/26/2020:
    • As I have mentioned in my previous e-mail, there is no live lecture today at 9:30am.

      Please watch the 2 recorded videos on either D2L or Blackboard.

      • On D2L, there are 4 files.  Two of them are the videos and the other two are the corresponding audio transcripts. Unfortunately, the video and the corresponding audio transcript are not synchronized.

      • On Blackboard, you should be able to see the video with a synch'ed audio transcript so you don't have to scroll the transcript yourself. But there is no way for me to rename the Zoom recordings and the recordings have exactly the same name!  Here are the 2 videos:
        • ID: 911-100-48383 is Lecture 1 Part 1
        • ID: 932-565-74255 is Lecture 1 Part 2

      Please watch two lecture videos to understand how this semester will proceed.

      I will record a discussion section video for tomorrow and will post it before 6pm today. Tomorrow, the TA will hold a live Zoom meeting at 10:00am to answer your questions about this discussion section video. So, please make sure you watch this video tonight.

      If you have questions, please send me e-mail or post a message to the class Google Group.

  • 5/16/2020:
    • Watch this area for important announcements.

    • To get user ID and password for accessing protected area of this web site, please visit the request access page after summer session starts and submit the requested information. (You do not have to be registered for the course to get the password. You just need to have an USC e-mail address.)

    • Please do not send request to join the class Google Group until after the first lecture.
Some people mistakenly think that this is an introductory CS class! This class has CS prerequisites! In the official syllabus, it is listed that the prerequisites are:
(CSCI 201L or CSCI 455x) and (EE 357 or EE 352L)

Please see:

Apparently, they are the prerequisites for undergraduate students only. The CS department would waive these prerequisites for graduate students. Since undergraduate students are required to take CS 350 for OS credit, there should only be graduate students enrolled in CS 402. Therefore, these prerequisites are really not prerequisites. They should be considered recommended preparation for graduate students. The basic idea behind these prerequisites is that you are expected to know how to program and you are expected to know something about computer architecture (such as what a CPU does).
The programming assignments of this class will be very demanding. You will be required to write C code. Since C is a proper subset of C++, knowing C++ well would give you enough background. However, some of the things that available in C++, such as strings and streams, are not be available in C. So, you need to know how to do things such as manipulating null-terminated array of characters (using functions such as strchr, strrchr, strlen, strcmp, strncpy, etc.) and performing console and file I/O (using functions such as printf/snprintf, fread/fwrite, read/write, fgets, etc.) in C. No other programming language will be accepted. We will not teach C in this class. You are expected to pick up C on your own if you are not familiar with it.

You should also get familiar with the Unix/Linux development environment (vi/pico/emacs, cc/gcc, make, etc.). You are expected to know how to use Unix/Linux. If you are not familiar with Unix/Linux, please read Unix for the Beginning Mage, a tutorial written by Joe Topjian. If you forgot how to use Unix, please summary of some commonly used Unix commands.

All programming assignments must run on a 32-bit Ubuntu 16.04 (Ubuntu 12.04 is acceptable if you have a machine with only 2GB of memory). The kernel programming assignments is meant to only run on a 32-bit Ubuntu 16.04. Therefore, you should install a 32-bit Ubuntu 16.04 (or Ubuntu 12.04 if your machine has only 2GB memory) on your laptop or desktop as soon as possible. If you do not have a personal laptop or desktop that runs Windows or Mac OS X, please contact the instructor as soon as possible.

These days, I have been using VagrantBox (i.e., Vagrant with Virtualbox) to install and run Ubuntu 16.04. I think it has a better integration with Windows 10 than other systems. If you are running Windows and you are comfortable with commandline interface to Linux/Unix systems (since Vagrant does not have a "desktop UI"), I would recommend installing Vagrant on your laptop/desktop.

If a student registered late for this class or could not be present at the beginning of the summer session, he/she is still required to turn all programming assignments on time or he/she will receive a score of 0 for these assignments. No exceptions!