Click here to see a PREVIEW of important rules that was posted before the semester 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: <bill.cheng@usc.edu>.  (Please do not send HTML-only e-mails. They will not be read.)
  DEN Section (29945D+29946D) PM Section (30243D) TT Section (30203D)
Time MW 10:00am - 11:20am (NEW)  MW 12:25pm - 1:45pm (NEW)  TT 9:30am - 10:50am 
Location OHE 122  SGM 226  VHE 217 
TA Ben Yan, E-mail: <wumoyan@usc.edu>
Office Hours: Wed/Fri 8:30am - 10:00am in SAL 200
Ben Yan, E-mail: <wumoyan@usc.edu>
Office Hours: Wed/Fri 8:30am - 10:00am in SAL 200
Ting-Ru Lin, E-mail: <tingruli@usc.edu>
Office Hours: Tue 5:00pm - 6:00pm in EEB 302
Graders
Parth Kapadia, E-mail: <pkapadia@usc.edu>
Deepa Sreekumar, E-mail: <dsreekum@usc.edu>
(If needed, the grader will hold office hours the week after the announcement of each assignment's grades.)
Midterm Exam during class time, Wed, 10/24/2018 (firm) during class time, Wed, 10/24/2018 (firm) during class time, Thu, 10/25/2018 (firm)
Final Exam 8am-10am, Mon, 12/10/2018 (firm). 11am-1pm, Fri, 12/7/2018 (firm). 11am-1pm, Thu, 12/6/2018 (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.)
Participation   :   how to earn extra credit for class participation.
Newsgroup   :   Google Group for discussing course materials and programming assignments. You are required to be a member of this group. (This group is by invitation only.) Please do not send request to join this group until after the first lecture.
(in reversed chronological order)
  • 11/8/2018:
    • I have a plumbing emergency at home and I won't be able to make it to the TT section lecture and office hour this morning. So, the TT section lecture and the office hour today is canceled. For the TT section students, please watch the recorded video on D2L. Everyone in the TT section will get rollsheet signing credit for today. Sorry about the inconvenience and the very short notice.

  • 10/27/2018:
    • Below is the grade normalization information for kernel1. Please note that this only applies to the grader-dependent part of your grade. If you are graded by Parth Kapadia <pkapadia@usc.edu>, his kernel1 average was 91.94 with a standard deviation of 6.18. If you are graded by Deepa Sreekumar <dsreekum@usc.edu>, his kernel1 average was 82.57 with a standard deviation of 11.64. The overall class average for kernel1 was 86.87 with a standard deviation of 10.61.

      To figure out your normalized score for kernel1, here's what you can do. If your grader-dependent part of your grade is X and your grader's average is A with a standard deviation of D, then Y=(X-A)/D is the number of standard deviations away your score is from your grader's average. Therefore, your normalized grader-dependent part of your grade would be 86.87+Y*10.61 (i.e., same number of standard deviation away from the overall class average). Your minimum score is still one point if you have submitted something for grading.

      As I have mentioned in Lecture 1, although we assume that we have a bell-shaped curve, when your score is normalized, linear interpolation is used. It's clearly not perfect since the actual curve will never be bell-shaped and linear interpolation is not the same as bell-shaped-curve interpolation. But this is what was announced at the beginning of the semester, and therefore, we will stick to this particular way of normailzation for all the programming assignments for the rest of the semester, knowing that it's not perfect.


  • 10/19/2018:
    • Below is the grade normalization information for warmup2. Please note that this only applies to the grader-dependent part of your grade. If you are graded by Parth Kapadia <pkapadia@usc.edu>, his warmup2 average was 78.10 with a standard deviation of 28.44. If you are graded by Deepa Sreekumar <dsreekum@usc.edu>, his warmup2 average was 80.55 with a standard deviation of 25.47. The overall class average for warmup2 was 79.33 with a standard deviation of 27.03.

      To figure out your normalized score for warmup2, here's what you can do. If your grader-dependent part of your grade is X and your grader's average is A with a standard deviation of D, then Y=(X-A)/D is the number of standard deviations away your score is from your grader's average. Therefore, your normalized grader-dependent part of your grade would be 79.33+Y*27.03 (i.e., same number of standard deviation away from the overall class average). Your minimum score is still one point if you have submitted something for grading.

      As I have mentioned in Lecture 1, although we assume that we have a bell-shaped curve, when your score is normalized, linear interpolation is used. It's clearly not perfect since the actual curve will never be bell-shaped and linear interpolation is not the same as bell-shaped-curve interpolation. But this is what was announced at the beginning of the semester, and therefore, we will stick to this particular way of normailzation for all the programming assignments for the rest of the semester, knowing that it's not perfect.


  • 10/16/2018:  The midterm exam will be closed book, closed notes, and closed everything (and no "cheat sheet"). Also, no calculators, cell phones, or any electronic gadgets are allowed. Please bring a photo ID. Your ID will be collected at the beginning of the exam and will be returned to you when you turn in your exam. Please only go to the exam for the section you are registered. Also, no matter how late you show up for the exam, your exam must end at the same time as everyone else in your section. There will be assigned seating.

    The midterm exam will cover everything from the beginning of the semester to slide 18 of Lecture 17 on 10/15,16/2018, MINUS Chapter 5 (i.e., material in Ch 5 is excluded from the midterm).

    Regarding what types of questions will be on the midterm, please see the Exams section of the course description web page and slides 20 through 29 of Lecture 17 on 10/15,16/2018. Regarding regrade policy, please see the Regrade section of the course description web page.

    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, 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.


  • 10/16/2018:
    • I will be recording a make-up lecture (for yesterday) from 9am to 10:20am today. I will ask DEN to make the video available as soon as the recording is done. Since this recording overlaps with the TT section lecture, the TT section lecture today is canceled. Please watch the recorded lecture when it's released. Sorry about the inconvenience.

  • 10/15/2018:
    • I have to leave campus this morning right after the DEN lecture due to urgent family situation. Sorry that I have to cancel the PM section lecture (please watch the DEN lecture video) and today's office hour. Sorry about the short notice and inconvenience.
    • UPDATE: As it turns out, I have to cancel class today and I won't be on campus today at all. Sorry about it. I will do a make-up lecture tomorrow and will make an announcement once I know when the lecture video will be available.

  • 10/9/2018:
    • I have to leave campus this Thursday (10/11/2018) at 11:45am. So, the office hour this Thursday will only go from 11am to 11:45am. Sorry about the inconvenience.

  • 9/17/2018:
    • Lectures and discussion section today is canceled becuase I was locked out of my office. I will give the TT section lecture tomorrow, although there will be no rollsheet signing (everyone will get credit). Tomorrow's office hour will go from 11am to 11:30am and then from 1:30pm to 3pm. Sorry about the inconvenience and the short notice.

  • 9/16/2018:
    • Below is the grade normalization information for warmup1. Please note that this only applies to the grader-dependent part of your grade. If you are graded by Parth Kapadia <pkapadia@usc.edu>, his warmup1 average was 87.26 with a standard deviation of 19.40. If you are graded by Deepa Sreekumar <dsreekum@usc.edu>, his warmup1 average was 85.97 with a standard deviation of 20.76. The overall class average for warmup1 was 86.61 with a standard deviation of 20.10.

      To figure out your normalized score for warmup1, here's what you can do. If your grader-dependent part of your grade is X and your grader's average is A with a standard deviation of D, then Y=(X-A)/D is the number of standard deviations away your score is from your grader's average. Therefore, your normalized grader-dependent part of your grade would be 86.61+Y*20.10 (i.e., same number of standard deviation away from the overall class average). Your minimum score is still one point if you have submitted something for grading.

      As I have mentioned in Lecture 1, although we assume that we have a bell-shaped curve, when your score is normalized, linear interpolation is used. It's clearly not perfect since the actual curve will never be bell-shaped and linear interpolation is not the same as bell-shaped-curve interpolation. But this is what was announced at the beginning of the semester, and therefore, we will stick to this particular way of normailzation for all the programming assignments for the rest of the semester, knowing that it's not perfect.


  • 9/12/2018:
    • The class web server upgrade is moved to noon tomorrow (Thu, 9/13/2018). Please use the backup server at http://bourbon.usc.edu/cs402-f18/ starting from noon tomorrow.


  • 8/27/2018:
    • I have made an appointment with a doctor tomorrow morning. I'm canceling the TT section lecture and office hour tomorrow (Tue, 8/28/2018). For the TT section students, please watch the recorded video on D2L. Sorry about the inconvenience and the short notice.

  • 8/27/2018:
    • I'm sick today and I don't think I can give two lectures. I will give the DEN section lecture today (from 10am to 11:20am) and I'm canceling the PM section lecture and the office hour this afternoon (I don't want people to get sick from talking to me since I'm coughing quite a bit). For the PM section students, please watch the recorded video on D2L. Sorry about the inconvenience and the short notice.

  • 8/8/2018:
    • 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 semester 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.
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 the 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 development environment (vi/pico/emacs, cc/gcc, make, etc.) You are expected to know how to use Unix. If you are not familiar with Unix, please read Unix for the Beginning Mage, a tutorial written by Joe Topjian. If you forgot how to use Unix, please review a summary of some commonly used Unix commands. The kernel programming assignments must run on Ubuntu 16.04. Therefore, you should install Ubuntu 16.04 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. If you are considering buying a laptop, please buy a laptop that runs Windows or Mac OS X.

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. The down side is that it doesn't have a desktop environment. If you are comfortable with running Ubuntu Linux without a desktop environent, 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 semester, he/she is still required to turn all projects and homeworks on time or he/she will receive a score of 0 for these assignments. No exceptions!