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) PM Section (30197D)
Instructor Bill Cheng (click to see office hours)
Email: <bill.cheng@usc.edu>
Time MW 10:00am - 11:40am  MW 12:00pm - 1:50pm 
Location OHE 132  MRF 340 
TAs Zhuojin Li, Email: <zhuojinl@usc.edu>,
Office Hours: (NEW) Fri 10:00am-11:00am and Fri 12:00pm - 1:00pm on on Zoom
Graders
Abhi Singh, Email: <asingh17@usc.edu>
Anurag Sethuram, Email: <anuragse@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/30/2024 (firm) [12:00:00pm-12:40:00pm), Wed, 10/30/2024 (firm)
Final Exam [8:00:00am-8:40:00am), Mon, 12/16/2024 (firm). [11:00:00am-11:40:00am), Fri, 12/13/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)
  • 12/5/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.

  • 12/4/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 10/23/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. (A slide number refers to the number in the lower-left corner of a slide.) 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 the 2nd part of 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

  • 12/26/2024:
    • Below is the grade normalization information for kernel3. Please note that this only applies to the grader-dependent part of your grade. If you are graded by Abhi Singh <asingh17@usc.edu>, his kernel3 average was 81.57 with a standard deviation of 31.94. If you are graded by Anurag Sethuram <anuragse@usc.edu>, his kernel3 average was 82.32 with a standard deviation of 23.06. The overall class average for kernel3 was 81.92 with a standard deviation of 28.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 kernel3, 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+(81.92-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.


  • 12/3/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 a take-home exam.
  • 11/25/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 Abhi Singh <asingh17@usc.edu>, his kernel2 average was 91.37 with a standard deviation of 17.10. If you are graded by Anurag Sethuram <anuragse@usc.edu>, his kernel2 average was 92.39 with a standard deviation of 12.33. The overall class average for kernel2 was 91.74 with a standard deviation of 14.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 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.74-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.


  • 11/21/2024: Zhuojin's office hour tomorrow is moved to 10:50-11:50am and 12:50-1:50pm. Sorry about the short notice and any inconvenience this may cause.
  • 11/19/2024: Quiz 6 will mainly focus on Discussions 10 & 11, Lectures 21 through 24. It will start at 3pm (USC time), on Friday, 11/22/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, 11/22/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.


  • 11/7/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 Abhi Singh <asingh17@usc.edu>, his kernel1 average was 89.72 with a standard deviation of 5.88. If you are graded by Anurag Sethuram <anuragse@usc.edu>, his kernel1 average was 92.74 with a standard deviation of 7.01. The overall class average for kernel1 was 91.17 with a standard deviation of 6.62. 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+(91.17-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.


  • 11/5/2024: Quiz 5 will mainly focus on Discussions 8 & 9, Lectures 17 through 20. It will start at 3pm (USC time), on Friday, 11/8/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, 11/8/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.


  • 10/28/2024: I won't be able to get to campus give the primary live lectures in person today. Therefore, I will be giving the primary live lectures for both the DEN section and the PM section on Zoom only. There is no need to go to the lecture classrooms. Sorry about the inconvenience and short notice.
  • 10/24/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.


  • 10/22/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). (A slide number refers to the number in the lower-left corner of a slide.) 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/20/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 on the day of the exam because I need you to promise me that you won't cheat before you can download your exam.

  • 10/17/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 Abhi Singh <asingh17@usc.edu>, his warmup2 average was 84.70 with a standard deviation of 28.52. If you are graded by Anurag Sethuram <anuragse@usc.edu>, his warmup2 average was 85.51 with a standard deviation of 22.29. The overall class average for warmup2 was 85.05 with a standard deviation of 25.99. 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+(85.05-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.


  • 10/7/2024: Quiz 4 will mainly focus on Discussions 6 & 7, Lectures 11 through 16. It will start at 3pm (USC time), on Friday, 10/18/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, 10/18/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.


  • 10/6/2024: I won't be able to get to campus in time to give the DEN section lecture in person tomorrow. Therefore, I will be giving the primary live lectures for both the DEN section and the PM section on Zoom only. There is no need to go to the lecture classrooms. Sorry about the inconvenience and short notice.
  • 10/1/2024: Tomorrow's office hour is moved down by half an hour. So, it will go from 9:30pm to 10:30pm. Sorry about the short notice and any inconvenience this may cause.
  • 9/24/2024: Tomorrow's PM section secondary live lecture is cancelled. I will extend tomorrow's office by half an hour, i.e., it will go from 9pm to 10:30pm. Please see my post in the class Google Group. Sorry about the short notice and any inconvenience this may cause.
  • 9/23/2024: Due to some urgent family matters, I won't be able to come to campus today. I will be giving the primary live lectures for both the DEN section and the PM section on Zoom only. So, there is no need to go to the lecture classrooms. Sorry about the inconvenience and short notice.
  • 9/23/2024: Quiz 3 will mainly focus on Discussion 5, Lectures 9 and 10. It will start at 3pm (USC time), on Friday, 9/27/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, 9/27/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.


  • 9/22/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 Abhi Singh <asingh17@usc.edu>, his warmup1 average was 92.07 with a standard deviation of 16.97. If you are graded by Anurag Sethuram <anuragse@usc.edu>, his warmup1 average was 91.71 with a standard deviation of 16.83. The overall class average for warmup1 was 91.89 with a standard deviation of 16.90. 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+(91.89-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.


  • 9/15/2024: Quiz 2 will mainly focus on Discussion 3 and 4, Lectures 5, 6, 7, and 8. It will start at 3pm (USC time), on Friday, 9/20/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, 9/20/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.

    Please note that if I don't have 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/4/2024: Quiz 1 will mainly focus on Discussion 2, Lectures 3 and 4. It will start at 3pm (USC time), on Friday, 9/6/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, 9/6/2024 or your submission is considered late and starting at 12:00:00am, you will lose 5% for every late minute.

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.

    Please note that if I don't have 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/30/2024: Please note that there are no separate quizzes for the DEN and PM sections. Therefore, if you are in the PM section and see that a quiz is for the DEN section, that's also your quiz! (This will not be the case for midterm and final exams since the two sections have different exams.)

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

    Please remember that the only timestamp that we are allowed to consider is a timestamp inside a ticket issued by my submission server.


  • 8/28/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.

  • 8/22/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.

    • Please be familiar with the course preparation material in the Course Preview web page.
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!