textbooks-1-small.jpg textbooks-2-small.jpg
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) TT Section (30331D)
Instructor Bill Cheng (click to see office hours)
Email: <bill.cheng@usc.edu>.  (Please do not send HTML-only emails. They will not be read.)
Time MW 10:00am - 11:20am  TT 9:30am - 10:50am 
Location OHE 136  WPH B27 
TA Zhuojin Li, Email: <zhuojinl@usc.edu>
Office Hours: Fri 10:50am-11:50am on Zoom
(TBD)
Graders
Anurag Sethuram, Email: <anuragse@usc.edu>
Ramraj Bishnoie, Email: <bishnoie@usc.edu>
(If needed, the grader will hold office hours the week after the announcement of each assignment's grades.)
Midterm Exam (NEW) 10am-10:40am, Wed, 3/20/2024 (firm) (NEW) 9:30am-10:10am, Thu, 3/21/2024 (firm)
Final Exam (NEW) 9am-9:40am, Mon, 5/6/2024 (firm). (NEW) 9am-9:40am, Tue, 5/7/2024 (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 quiz schedule.
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)
  • 4/29/2024: 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.

  • 4/25/2024: 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.
  • 4/24/2024: 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 3/6/2024 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

  • 4/8/2024: Quiz 8 will mainly focus on Weeks 12 and 13 discussions and Lectures 25-27 and it will start at 3pm (USC time), on Friday, 4/19/2024. 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, 4/19/2024 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 haven't received 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.


  • 4/16/2024: It looks like I may not be able to get home by 9pm this Tue, Wed, and Thu. So, I'm moving my office hours to 10-11pm for the rest of the week. Sorry about the short notice and the inconvenience this may cause.

  • 4/14/2024:
    • Below is the grade normalization information for kernel2. Please note that this only applies to the grader-dependent part of your grade. If you are graded by Anurag Sethuram <anuragse@usc.edu>, his kernel2 average was 92.08 with a standard deviation of 12.51. If you are graded by Ramraj Bishnoie <bishnoie@usc.edu>, his kernel2 average was 91.58 with a standard deviation of 14.34. The overall class average for kernel2 was 91.81 with a standard deviation of 13.53. Please note that if one grader's average is higher than another grader's average, it doesn't necessarily mean that one grader is a tougher grader and the other grader is an easier grader. It may be the case that one grader just happen to get more submissions with lower grades, no matter which grader grades them.

      To figure out your normalized score for kernel2, here's what you can do. If your grader-dependent part of your grade is X and your grader's average is A, your normalized grader-dependent part of your grade would be X+(91.81-A). Your minimum score is still one point if you have submitted something for grading and your maximum grader-dependent part of your score is still 100.

      As I have mentioned in Lecture 1, although this kind of normalization is not perfect, since this is what was announced at the beginning of the semester, 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.


  • 4/14/2024: Zhuojin's office hour this week on Friday has been moved to 2-4pm on Tue 4/16/2024.

  • 4/9/2024: Quiz 7 will mainly focus on Weeks 10 and 11 discussions and Lectures 21-24 and it will start at 3pm (USC time), on Friday, 4/12/2024. 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, 4/12/2024 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 haven't received 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.


  • 3/26/2024:
    • 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 Anurag Sethuram <anuragse@usc.edu>, his kernel1 average was 91.30 with a standard deviation of 7.49. If you are graded by Ramraj Bishnoie <bishnoie@usc.edu>, his kernel1 average was 90.55 with a standard deviation of 5.56. The overall class average for kernel1 was 90.97 with a standard deviation of 6.70. Please note that if one grader's average is higher than another grader's average, it doesn't necessarily mean that one grader is a tougher grader and the other grader is an easier grader. It may be the case that one grader just happen to get more submissions with lower grades, no matter which grader grades them.

      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, your normalized grader-dependent part of your grade would be X+(90.97-A). Your minimum score is still one point if you have submitted something for grading and your maximum grader-dependent part of your score is still 100.

      As I have mentioned in Lecture 1, although this kind of normalization is not perfect, since this is what was announced at the beginning of the semester, 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.


  • 3/25/2024: Quiz 6 will mainly focus on Weeks 8 and 9 discussions and Lectures 17-20 and it will start at 3pm (USC time), on Friday, 3/29/2024. 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, 3/29/2024 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 haven't received 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.


  • 3/16/2024: 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.


  • 3/7/2024: 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.

  • 3/6/2024:  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:


  • 3/6/2024:
    • 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 Anurag Sethuram <anuragse@usc.edu>, his warmup2 average was 80.71 with a standard deviation of 26.28. If you are graded by Ramraj Bishnoie <bishnoie@usc.edu>, his warmup2 average was 78.54 with a standard deviation of 31.41. The overall class average for warmup2 was 79.53 with a standard deviation of 29.21. Please note that if one grader's average is higher than another grader's average, it doesn't necessarily mean that one grader is a tougher grader and the other grader is an easier grader. It may be the case that one grader just happen to get more submissions with lower grades, no matter which grader grades them.

      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, your normalized grader-dependent part of your grade would be X+(79.53-A). Your minimum score is still one point if you have submitted something for grading and your maximum grader-dependent part of your score is still 100.

      As I have mentioned in Lecture 1, although this kind of normalization is not perfect, since this is what was announced at the beginning of the semester, 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.


  • 2/28/2024: Quiz 5 will mainly focus on Lectures 15-16 and it will start at 3pm (USC time), on Friday, 3/1/2024. 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, 3/1/2024 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 haven't received 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.


  • 2/19/2024: Quiz 4 will mainly focus on Weeks 6 and 7 discussions and Lectures 11-14 and it will start at 3pm (USC time), on Friday, 2/23/2024. 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, 2/23/2024 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 haven't received 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.


  • 2/7/2024: Quiz 3 will mainly focus on Week 5 discussions and Lectures 9-10 and it will start at 3pm (USC time), on Friday, 2/9/2024. 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, 2/9/2024 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 haven't received 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.


  • 2/6/2024:
    • 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 Anurag Sethuram <anuragse@usc.edu>, his warmup1 average was 90.39 with a standard deviation of 16.81. If you are graded by Ramraj Bishnoie <bishnoie@usc.edu>, his warmup1 average was 91.44 with a standard deviation of 20.07. The overall class average for warmup1 was 90.91 with a standard deviation of 18.51. Please note that if one grader's average is higher than another grader's average, it doesn't necessarily mean that one grader is a tougher grader and the other grader is an easier grader. It may be the case that one grader just happen to get more submissions with lower grades, no matter which grader grades them.

      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, your normalized grader-dependent part of your grade would be X+(90.91-A). Your minimum score is still one point if you have submitted something for grading and your maximum grader-dependent part of your score is still 100.

      As I have mentioned in Lecture 1, although this kind of normalization is not perfect, since this is what was announced at the beginning of the semester, 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.


  • 2/1/2024: I won't be able to come come to campus in time for class this morning. So, today's TT section primary lecture will be on Zoom only. Please don't go to WPH B27. Sorry about the short notice and inconvenience.

  • 1/29/2024: Quiz 2 will mainly focus on Weeks 3 and 4 discussions and Lectures 5-8 and it will start at 3pm (USC time), on Friday, 2/2/2024. 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, 2/2/2024 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 haven't received 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.


  • 1/17/2024: Quiz 1 will mainly focus on Weeks 1 and 2 discussions and Lectures 1-4 and it will start at 3pm (USC time), on Friday, 1/19/2024. 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, 1/19/2024 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.


  • 1/15/2024: Please download, fill out, sign, and submit the Academic Integrity Honor Code Pledge For Quizzes. Please understand that starting with Quiz 1, if I haven't received 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.

  • 1/12/2024: Quiz 0 will mainly focus on Week 1 discussion and Lectures 1 and 2 and it will start at 3pm (USC time), on Friday, 1/12/2024. 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, 1/12/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.


  • 1/11/2024: For tomorrow's 10 AM discussion section, the TA cannot lead the discussion section. Therefore, I will lead the discussion on Zoom and there is no need to go to OHE 136 at 10 AM since you can join from D2L/Zoom. Also, since we don't have a 2nd TA yet, there will be no discussion at 1 PM. Please do not go to SLH 102 at 1 PM. If you are registered in the 1 PM discussion section, please watch the recorded live discussion video for the 10 AM section when it becomes available some time in the afternoon (and end of day at the latest).

  • 1/8/2024: I caught COVID last week and finally tested negative yesterday for the first time. I'm supposed to be wearing a mask when I'm around people for the next 5 days. Since I really don't want to give lectures in a mask, Lectures 1 and 2 will be conducted on Zoom only (and they will be recorded). So, please don't go to OHE 136 or WPH B27 for live lectures this week.

  • 1/7/2024:
    • 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 email 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!