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: <bill.cheng@usc.edu>.  (Please do not send HTML-only e-mails. They will not be read.)
Time TuTh 9:30am - 11:25am 
Location OHE 136 
TA Ben Yan, E-mail: <wumoyan@usc.edu>
Office Hours: Mon 4:00pm - 5:00pm and Wed 9:00am - 10:00am in SAL 200
Grader Spandan Kanubhai Kachhadiya, E-mail: <kachhadi@usc.edu>.
(If needed, the grader will hold office hours the week after the announcement of each assignment's grades.)
Midterm Exam during class, 9:30am-10:50am, Tue, 7/2/2019 (firm), in MHP 101,  (MHP is located in section 7D of the campus map).
Final Exam 9:30am-11:25am, Tue, 7/30/2019 (firm), in SLH 200,  (SLH is located in section 6C of the campus map).
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.
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)
  • 7/25/2019: The final 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 final exam will cover everything from slide 1 of Lecture 10 to slide 67 of Lecture 11 PLUS everything from slide 45 of Lecture 12 to the last slide of Lecture 21. Also included are discussion section slides from Week 7 through Week 10.

    Since the 2nd part of the course depends on stuff covered by the midterm, I cannot say that I will not ask anything covered by the midterm and you do need to know the material covered by the midterm. Therefore, it would be more appropriate to say that the final exam will focus on the material not covered by the midterm.

    Regarding what types of questions will be on the exam, please see the Exams section of the course description web page. Regarding regrade policy, please see the Regrade section of the course description web page.

    Please note that if you are asked to run the Stride Scheduling algorithm, to get any credit, you must run the one described in Lecture 21 (and not the one in the textbook).

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

    • Ch 3 - Basic Concepts
      • shared libraries
    • Ch 4 - Operating-System Design
      • devices
      • virtual machines, microkernels
    • Ch 5 - Processor Management
      • threads implementations
      • interrupts
      • scheduling
    • Ch 6 - File Systems
      • the basics of file systems
      • performance improvements
      • crash resiliency
      • directories and naming
      • RAID, flash memory, case studies
    • Ch 7 - Memory Management
      • virtual memory
      • OS issues
    • Kernel assignments 2 & 3
      • spec
      • FAQ
      • my posts to class Google Group

  • 6/24/2019: 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. There will be assigned seating.

    The midterm exam will cover everything from the beginning of the semester to slide 41 of Lecture 12 on 6/20/2019, 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 45 through 54 of Lecture 12 on 6/20/2019. 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
      • 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.


  • 6/13/2019:
    • Since no one has sent me e-mail saying that they would come to office hour today, the office hour today is canceled.

  • 6/11/2019:
    • I have recorded a lecture (Lecture 10) for this Thursday and it's already available on D2L. Therefore, the in-class lecture is canceled for this Thursday (6/13/2019). Lecture 10 gives you everything you need to finish kernel 1.

  • 6/8/2019:
    • The specs for the kernel assignments will be ready tomorrow. If you are done with warmup2 and would like a head start, please read the weenix document from Brown University. Please understand that the "weenix document" is a requirement for a Brown University class. It's not our requirement! We are not even doing all the assignments in that document! We are using it as an introduction to our kernel code since our kernel code is from Brown University. Our requirements are our specs and our grading guidelines and those will not be ready until tomorrow.

  • 5/28/2019:
    • The elevator in SAL is being repaired. If you want to come to office hour, please take the stairs near the CS Department office to 3rd flood. I have the door propped open.

  • 5/16/2019:
    • After I sent invitations to everyone this afternoon to join the class Google Group, if you tried to join using the 2nd method mentioned in class, it didn't work because there was no "Apply for membership" link on the Google Group web page! Not sure what happened. But a few hours later, it started to work and it seems to be working now (although once in a while it would disappear). If you tried it before and it didn't work, please try it again. As I have mentioned in class today, Approach/option (2) is the preferred way to use the class Google Group because you get a web user interface to the group (which makes it much earsier to perform searches later).

  • 5/15/2019:
    • 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.
  • 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/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!