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.
 

  DEN Section (29945D+29946D) PM Section (30197D)
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 MW 10:00am - 11:50am  MW 12:00pm - 1:50pm 
Location OHE 132  (NEW) DMC 261 
TAs Zhuojin Li, E-mail: <zhuojinl@usc.edu>,
Office Hours: Wed 4:00pm-5:00pm and Fri 10:50am - 11:50am on on Zoom
Graders
Anish Deshmukh, E-mail: <anishdes@usc.edu>
(If needed, the grader will hold office hours the week after the announcement of each assignment's grades.)
Midterm Exam [10:00:00am-10:40:00am), Wed, 10/25/2023 (firm) [12:00:00pm-12:40:00pm), Wed, 10/25/2023 (firm)
Final Exam [9:00:00am-9:40:00am), Mon, 12/11/2023 (firm). [11:00:00am-11:40:00am), Fri, 12/8/2023 (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 lectures and discussion sections videos on D2L.
Discussions   :   information about discussion sections and quizzes.
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. All important announcements will be made using this online forum. Therefore, you are required to be a member of this group. (This group is by invitation only and you need to make sure that you are a member.) Please do not send request to join this group until after Lecture 1.
(in reversed chronological order)
  • 12/6/2023: Below are the links for starting the final exams. These links will become active approximately 3 minutes before the respective exam start time and you can start working on the exam as soon as you have downloaded the exam.

    Plesae make sure you have done the following:

    No matter how late you start your exam, your exam must end at the same time as everyone else who is taking the same exam.
  • 11/30/2023: Please download, fill out, sign, and submit the Final Exam Academic Integrity Honor Code Pledge as soon as possible. Please understand that if I don't get a signed pledge from you, I will not send a final exam to you because I need you to promise me that you won't cheat before I can send you an exam.
  • 11/29/2023: The final exam will be a 40-minute long take-home exam (open book and open notes), and it will be conducted in the same manner as the midterm exam (please see live DEN section Lecture 18 on 10/18/2023 for the exam instructions and replace the date and time with what's appropriate for your final exam). No matter how late you start your exam, your exam must end at the same time as everyone else who is taking the same exam.

    The final exam will cover everything from slide 30 of the 2nd part of Lecture 13 to slide 53 of the 2nd part of Lecture 15, PLUS, from slide 43 of the 2nd part of Lecture 17 to the last slide of Lecture 29. Also included are discussion section materials from Week 8 through Week 13.

    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 algorithm described in Lecture 28 (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 implementation strategies
      • threads implementations
      • interrupts
      • scheduler activations model
      • 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
      • discussion section slides
      • spec
      • FAQ
      • my posts to class Google Group

  • 11/27/2023: Zhuojin Li's office hour this week has been moved to 4-6pm on Wed, 11/29/2023.

  • 11/13/2023: Quiz 10 this Friday will mainly focus on Weeks 12/13 discussions and Lectures 23/24/25/26 and it will start at 3pm (USC time), on Friday, 11/17/2023. The starting point of your Quiz 10 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 10 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 11/17/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 11/8/2023: No quiz or discussion section this Friday since it's a university holiday.

  • 10/31/2023: Quiz 9 this Friday will mainly focus on Week 11 discussion and Lectures 21 and 22 and it will start at 3pm (USC time), on Friday, 11/3/2023. The starting point of your Quiz 9 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 9 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 11/3/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 10/26/2023: Quiz 8 this Friday will mainly focus on Week 10 discussion and Lectures 19 and 20 and it will start at 3pm (USC time), on Friday, 10/27/2023. The starting point of your Quiz 8 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 8 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 10/27/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 10/20/2023: Below are the links for starting the midterm exams. Currently, they are inactive/invalid. They will become valid and active approximately 3 minutes before the respective exam start time and you can start working on the exam as soon as you have downloaded your exam.

    Plesae make sure you have done the following:

    No matter how late you start your exam, your exam must end at the same time as everyone else who is taking the same exam.


  • 10/19/2023: Please download, fill out, sign, and submit the Midterm Exam Academic Integrity Honor Code Pledge as soon as possible. (Please note that submitting a signed pledge doesn't mean that you cannot decide to opt out of the exam later.) Please understand that if I don't get a signed pledge from you, you will not be able to download your midterm exam this coming Tuesday because I need you to promise me that you won't cheat before you can download your exam.

  • 10/18/2023:  The midterm exam will be a 40-minute long take-home exam (open book, open notes, open Internet).

    The midterm exam will cover everything from the beginning of the semester to slide 21 of Lecture 17, MINUS Chapter 5 (i.e., material in Ch 5 is excluded from the midterm, i.e., slides 30 through 60 of Lecture 13, all slides in Lecture 14, and slides 4 through 53 of Lecture 15 are excluded from the midterm coverage). Also included are discussion section slides from Week 1 through Week 7.

    Regarding what types of questions will be on the midterm, please see the Exams 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
      • discussion section slides
      • specs
      • FAQs
      • my posts to class Google Group
    • Kernel assignment 1
      • discussion section slides
      • 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.

    During today's DEN section primary live lecture, I went over the midterm exam logistics and talked about how to use the Panopto recorder to record your desktop offline. Here are some important links into the Panopto recorder installation and setup web page:


  • 10/17/2023: Something came up and I won't be able to hold office hours tonight at 9pm.  So, I'm moving it one hour early to 8:00pm-9:00pm.  Sorry about the short notice and inconvenience..

  • 10/17/2023: Quiz 7 this Friday will mainly focus on Weeks 8 and 9 discussions and Lectures 15, 16, 17, and 18 and it will start at 3pm (USC time), on Friday, 10/20/2023. The starting point of your Quiz 7 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 7 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 10/20/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 10/12/2023: As mentioned on slide 2 of Lecture 15, this Thu/Fri is fall recess. So, no office hours this Thu/Fri and no quiz this Friday.

  • 10/3/2023: Quiz 6 will mainly focus on Week 7 discussion and Lectures 13 and 14 and it will start at 3pm (USC time), on Friday, 10/6/2023. The starting point of your Quiz 6 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 6 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 10/6/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 9/27/2023: Quiz 5 will mainly focus on Week 5 discussion and Lectures 11 and 12 and it will start at 3pm (USC time), on Friday, 9/29/2023. The starting point of your Quiz 5 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 5 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 9/29/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 9/21/2023: Quiz 4 will mainly focus on Week 5 discussion and Lectures 9 and 10 and it will start at 3pm (USC time), on Friday, 9/22/2023. The starting point of your Quiz 4 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 4 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 9/22/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 9/20/2023: Something came up and I won't be able to hold office hours tonight at 9pm.  So, I'm moving it to 3:30pm-4:30pm.  Sorry about the short notice and inconvenience..

  • 9/19/2023: Something came up and I won't be able to hold office hours tonight at 9pm.  So, I'm moving it to 10:30pm-11:30pm.  Sorry about the short notice and inconvenience..

  • 9/14/2023: Quiz 3 will mainly focus on Week 4 discussion and Lectures 7 and 8 and it will start at 3pm (USC time), on Friday, 9/15/2023. The starting point of your Quiz 3 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 3 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 9/15/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 9/6/2023: Quiz 2 will mainly focus on Week 3 discussion and Lectures 5 and 6 and it will start at 3pm (USC time), on Friday, 9/8/2023. The starting point of your Quiz 2 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 2 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 9/8/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please note that if I don't get a signed Academic Integrity Honor Code Pledge For Quizzes from you, you will not be able to download your quiz and you will get a zero for your quiz.


  • 9/1/2023: Quiz 1 will start at 3pm (USC time), on Friday, 9/1/2023. The starting point of your Quiz 1 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 1 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 9/1/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please note that if I don't get a signed Academic Integrity Honor Code Pledge For Quizzes from you, you will not be able to download your quiz and you will get a zero for your quiz.


  • 8/26/2023: Quiz 0 (a rehearsal for quizzes) will start at 3pm (USC time), on Monday, 8/28/2023. The starting point of your Quiz 0 is at:

    Currently, the above link is inactive/invalid. It will become valid and active around the Quiz 0 start time. The timestamp of your submission ticket must be at or before 11:59:59pm, 8/28/2023 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 8/26/2023: Please download, fill out, sign, and submit the Academic Integrity Honor Code Pledge For Quizzes as soon as possible. Please understand that starting with Quiz 1, if I don't get a signed pledge from you, you will not be able to download your quizzes because I need you to promise me that you won't cheat before I can send you a quiz.
  • 8/25/2023:
    • We are in the process of hiring a 2nd TA to lead the 12pm discussion section. So far, we haven't hired anyone for the job.  Therefore, there will be no 12pm discussion section today. The 10am discussion will be lead by Zhuojin Li and it will be recorded and you can watch the recorded video when it becomes available. Sorry about the short notice and inconvenience.

    • My machine died yesterday (I think it's due to some hardware failure). Looks like I won't be able to set up Quiz 0 in time for today. Since this is just a rehearsal, we will just do it at a different time.

  • 8/21/2023: I turned my ankle when I was walking to the PM section lecture and it's hurting quite a bit. Since I would arrive to the PM section lecture quite late and I won't be able to finish the lecture material, I have decided to cancel today's PM section lecture. If you are in the PM section, please watch the DEN section lecture video at https://merlot.usc.edu/cs402-f23/lectures.html when it becomes available (I will post a message in the class Google Group), Sorry about the short notice and inconvenience.

  • 8/19/2023:
    • Watch this area for important announcements.

    • To get username 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.)

    • Due to security concerns, we cannot post Zoom meeting IDs in public area of the class website. A summary of Zoom meeting IDs and links are provided here (password protected).

    • Please do not send request to join the class Google Group until after the Lecture 1.
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. Unfortunately, looks like this book has just disappeared from the web. You can also visit UNIX Tutorial for Beginners or Learn tcsh in Y Minutes. If you already know how to use Unix/Linux before and just need a refresher, please review my summary of some commonly used Unix commands and my tcsh scripting tutorial. If you knew how to use Unix/Linux before and just need a refresher, please review a summary of some commonly used Unix/Linux commands.

All programming assignments must run on 32-bit Ubuntu 16.04. The kernel programming assignments will only work on a 32-bit Ubuntu 16.04 system. Therefore, you should install a 32-bit Ubuntu 16.04 on your laptop or desktop as soon as possible and start using it right away. 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 an Intel-based laptop that runs Windows or Mac OS X.

If the only computer you have access to is the new Mac running on a non-Intel/AMD CPU, then it may not be possible to install VirtualBox into your machine. If that's the case, please read here.

If a student registered late for this class or could not be present at the beginning of the semester, the student is still required to turn all projects and homeworks on time or the student will receive a score of 0 for these assignments. No exceptions!