This is an undergraduate course on computer operating systems.
(Although this course is for graduate students only! 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!)
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.
Please note that this class does not use Blackboard.
Everything about this class can be found on the CSCI 402, Spring 2024 class website
(if you see this page again, it means that the class website is under construction).
PREVIEW
My actual CS 402 class website for Spring 2024 is not ready yet.
Since many students are registering now, I felt that I
should post some important information about CS 402 (especially about rules) so students can know what to expect and register accordingly.
I tend to be a stickler to rules, so there will be no exceptions.
The rules are not just for students. I'm bound by my own written rules and I have to stick to them.
Some students don't understand why I am so strict with rules. Some think that it's just a power trip for me.
It's actually just the opposite!
The reason for sticking to rules is that I have the responsibility of treating all students fairly!
If I apply one rule to one student and don't apply the same rule to another student, I think that's totally unfair.
I think fairness is very important. Without fairness, grades have no meaning.
The only way I know how to be fair is to have rules that are written down clearly and stick to all the written rules.
When you ask me to bend a written rule for you, please understand that you are asking me to be unfair to all other students;
and therefore, I will not bend the rule for you. You see, this actually takes power away from me because I am bound by my own rules
and you can demand that I stick to my own rules!
D-clearance
- I do not sign D-clearances and I will not sign anything to put one student ahead of everyone else.
Please see your adviser to get your D-clearance.
Late Registration
- Even though you might be considering other classes at the beginning of the semester,
if you have any intention to take this class, you are expected to watch every lecture video on time and
submit all assignments on time (i.e., same deadlines as students who are already registered).
So, even if you get in on the last day that you are allowed to register for classes,
you will be expected to turn in all programming assignments by their submission deadelines, even if some deadlines have past, just like everyone else
(see below for deadlines for all assignments).
To get access to course material so you can work on the assignments, you just need to be a USC student and have a USC email address.
Syllabus
Lectures
- We will be using a flipped classroom model during this semester.
(Although in a regular flipped classroom model, during live lectures, students will be taking quizzes and doing exercises.
Since we have so many programming assignments to do in this class, it would be too much to ask students to do more exercises
during live lectures. We will have quizzes to encourage students to keep up with the assigned lecture and discussion material.)
Lectures will be pre-recorded into multiple videos (and posted on D2L)
and will be made available before 6pm the day before the scheduled lecture time (and usually, way before that time).
You are expected to have watched the pre-recorded lecture videos before you come to a "live and in-person" class during the scheduled lecture time.
During a live and in-person lecture, since you are supposed to have watched the pre-recorded lecture videos,
I will not repeat what's in a pre-recorded video and I will not be teaching any new materials during a live and in-person lecture
because students would complain that this would be too much materials for a 4-unit course!
Instead, I will first go over some administrative information, then I will do a quick recap of what's in the pre-recorded lecture videos,
and then I will be answering your questions about lecture material.
If you have questions about programming assignments, I would also be happy to answer your questions as well.
I will be available during the entire live lecture time. Therefore, if you would prefer to watch the pre-recorded lecture video during live lecture time,
you are welcome to to do so and you can pause the video and ask me questions at any time!
Since live and in-person lectures are conducted this way, live and in-person lectures are totally optional and
there is no requirement that you come to live lectures at all (although you are still required to view the administrative information)!
The reason we are using this format is that students in this class have very diverse backgrounds
(usually, over 50% of the students are in the MS in Computer Science for Scientists and Engineers program)
and many students would need individualized help to understand the course material and to get going with the programming assignments.
With the flipped format, I can give attention to students who need the individual and specific help.
Please take advantage of this format and ask me questions about pre-recorded lecture and discussion videos or
if you have any question about programming assignments and do this as early and as often as possible.
Time Conflicts
- If you have another class that has a time conflict with our lecture time, I will not approve such a time conflict.
Even though all our lectures will be recorded, you are required to be available during the entire lecture time for every lecture!
- If you have another class that has a partial time conflict with our discussion section, I would consider approving such a time conflict.
But you should contact me via email first and give me all the details before filing a petition.
Videos
- All recorded videos will be made available on D2L
(although you may not be able to download any of these videos). Every registered student will be given a D2L account.
Exams
- Each section has different exams!
Some students acaully think that the exams in one section is always easier than the exams in another section! Unbelievable, rigth?!
So, you get to choose which exams you want to take!
The only requirement is that
you have to take all the exams in the same section. If you are registered in one section and would prefer to take all the exams in a different section, you need to
let me know before the midterm exam (this is referred to as being "virtually switched" to a different section).
Once you have taken the midterm in one section, you must take the final exam for that section and I cannot make an exception.
So, please choose very carefully!
Please be familiar with the exam schedule in the Important Dates section below and
make sure that you are available to take the exams.
All exams are take-home exams, and midterm exams will be taken during lecture times of the respective section.
If you would like to be "virtually switched" to another section, please send an email to the instructor after the end of the 3rd week of classes.
- The dates and times for the final exams are determined by the university and there is absolutely
no way to change them for you. Also, according to university policy, no one is permitted to take the final exam at a time different from their classmates.
If you know that you cannot come to the final exam for a particular
section, do not register for that section because I will not change the date or time of your final exam
or have a separate exam for you (the end result is that you will get a 0 for your final exam). Of course, you can request to be virtually switched to another section
to take all exams in that section and agree to be graded on the same curve as the students in that section.
- If you miss the final exam due to documented illness or documented family emergency (i.e., death in the family), you will be given a grade of incomplete
and that's the only way a student can get a grade of incomplete in this class.
Quizzes
- We will have quizzes on Fridays and they will be take-home quizzes.
The purpose of the quiz is to make sure that you are following the pace of the course (i.e., you are keeping up with lectures and discussions material).
The first quiz is considered a quiz rehearsal and it will not count towards your grade.
We will automatically drop the lowest two quiz scores when we calculate your final class grade.
Audit
- If you are officially auditing this course (i.e., register for this course under the no-grade option), you will get the same course
materials as everyone else. However, you will not be permitted to
form or join a team with students who are taking this course for grades to do the kernel assignments
since your level of commitment is different from students who are taking this course for grades.
- If you want to audit this course unofficially, I will have to say no to you.
Workload
- This class is very demanding and the last programming assignment is
extremely difficult and very very time-consuming. The coverage of this class is very vast.
There is really no time for me to explain every topic to the point where every
student in the class understands everything perfectly because we have to move
along quickly to get you ready for the programming assignments.
So, please do not expect "spoon feeding" in this class and you need
to be prepared to figure things out on your own.
(One great thing about the flipped classroom model is that lectures are prev-recorded, so you can watch the videos over and over again
and come ask me questions during a live and in-person class.)
Of course, you are always welcome to come talk to me about anything related to the course material and programming assignments.
So, you are not completely on your own. You will also be expected to
learn certain things on your own.
- Some students mistakenly think that this is a code hacking class and if you spend a lot of time hacking, you can get your programming assignments to work.
That's really the wrong way to go about it. The programming assignments are actually thinking-type assignments. You need to understand all the materials covered
in lectures and discussion sections first, then think very carefully and write code based on your understanding of all the material!
This way, you won't spend all your time coding and chasing bugs.
- Some students have complained that they spent a hundred hours per week doing programming assignments and they think that this is what this class demands.
Clearly, that cannot be the case. You are expected to understand and be familiar with all the course materials that has been covered
before attempting to do a particular programming assignment. The lectures and discussions are designed to give you background to do the assignments.
When you are about to write your code, you need to base your code on everything you have learned so far and you need to write your code every carefully and intently
to avoid introducing bugs in your code. If you just put a bunch of random looking code together and expect that you can just somehow move the code around to get
things to work perfectly, then you shouldn't be surprised that spending a hundred hours a week will not get your code to work correctly.
- This class can also be very rewarding. If you work super hard throughout the entire semester and
implement all the programming assignments yourself,
you will realized that you have learned so much when the course is over.
Class Google Group
- We will use a Google Group for class related communications and discussions.
The class Google Group is an important tool. Everyone must be a member of the class Google Group.
I will explain how to get on the class Google Group during Lecture 1.
Kernel Teams
- Up to 4 students per team will be permitted but no more. You can form a kernel team with students registered in any section.
Please understand that to be fair to all, I cannot get involved in putting teams together. You are completely on your own to form teams.
If you have issues with your teammates, there is nothing I can or will do. You have to choose your teammates very carefully.
- I strongly recommend that you work with (but not copy code from each other) your potential teammates during the beginning of the semester.
Once you like each other and feel that you can trust each other, you can commit to be in the same kernel team.
I would strongly urge you not to form a team with someone you have never worked with
(unless you are willing to let them have a free ride and do all the work for them).
- You can also work on the kernel assignments by yourself. It's do-able if you are a good programmer who knows C well and are good at debugging
Otherwise, you need to get good at C programming and debugging as quickly as possible by working very hard during the first few weeks of the semester!
Grade Normalization of Programming Assignments
- When there are multiple graders, since it's pretty much impossible to have every grader grade identically,
I will track which student is graded by which grader. When I calculate your final class grade at the end of the semester,
I will "normalize" each programming assignment grade according to the average for each grader and
adjust your grade according to the overall class average.
For example, if the average score of your grader is 85 and the overall class average is 86,
this means that your grader's average is slightly lower than the class average (maybe because you were graded by a "harsher grader")
and everyone graded by your grader will get their grade increased by 1 point (so that your grader's average will be 86).
On the other hand, if the average score of your grader is 86.5, this means that your grader's average is slightly above the class average (maybe because you were graded by an "easier grader"),
then everyone graded by your grader will get their grade lowered by 0.5 point (so that your grader's average will be 86).
This is not a perfect system. But I think it's a big improvement over not normalizing your scores and
it's done this way so that the adjustments are typically very small.
- This is only done for programming assignments since the programming assignments are identical for every student,
no matter which section you belong and which grader grades your assignment. For exams, each section gets a different exam and a separate curve for figuring
out your class letter grade, and therefore, grade normalization is not needed for exams and will not be performed.
Preparation
- The prerequisites for this class are (1) CSCI 201L or CSCI 455x, and (2) EE 357 or EE 352L.
But prerequisites are only enforced for undergraduate students. For grad students, they are
turned into "recommended preparation". The way to interprep these recommended preparation is that
you should know how to program in C or C++ and you should know what's inside a processor/CPU and
how it works (i.e., how a CPU executes machine instructions).
Some people mistakenly think that this is an introductory CS class! With the above prerequisites, how can this be an intro CS class?!
- 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 C-strings (i.e., null-terminated array of characters)
using functions such as strchr(), strrchr(), strlen(), strcmp(), strncpy(), etc.
You also need to know how to perform console and file I/O in C
using functions such as read/write(), printf()/snprintf(), fread()/fwrite(),
fgets/getline(), etc.
No other programming language will be accepted.
We will not teach C in this class (since C++ is a prerequisite).
You are expected to pick up C on your own if you are not familiar with it.
You might also want to check out a free online course on C from CodesDope.
(I haven't checked out the contents there. Please feel free to send me feedback.)
One thing I would ask you to avoid is to practice C on a non-Linux system!
You should install a 32-bit Ubuntu 16.04 on your laptop or desktop and practice C on it.
If you are not good with programming in C and you want to get prepared for
this class, you can start by implementing some basic data structures and algorithms.
For example, read a file of integers, sort them in a linked list, and sort the
linked list using selection sort, bubble sort, insertion sort, merge sort, and
quick sort is a good way to start. To practice file I/O and string manipulation,
you can change the file of integers to lines of text and parse the lines into fields
(e.g., separated by semi-colons or tabs) then sort the lines based on a particular
field and print the sorted records. You must understand what a memory address
is and what it means to store the address of a data structure into a pointer
(e.g., in forming a linked list). You then need to be able to follow pointers to traverse a linked list.
Please take a look at my review on pointers and make sure you understand everything there
(you can send me email if you have questions).
Finally, you need to learn to use gdb
to examine memory locations and debug your program.
If you have taken CSCI 455x but feel that you need more background in data structures and algorthms,
I would recommend that you take an online class such as this
Data Structures class at coursera.com (I think you have to pay to get the programming assignments, but you can audit the class for free;
also, I have never taken this class, but the syllabus sounds right).
- You must know how to use Unix/Linux since you were supposed to have learned how to use Unix in the prerequisite classes. If you are not familiar with Unix/Linux,
you must learn it on your own. We will not teach you how to use Unix/Linux in this class.
If you are not familiar with Unix/Linux, I strongly urge you to read
Unix for the Beginning Mage
(this website is not very stable) before the course starts.
You can also visit UNIX Tutorial for Beginners
or Learn tcsh in Y Minutes.
You should also get familiar with the Unix/Linux development environment (vi/pico/emacs, cc/gcc, make, etc.)
You should install a 32-bit Ubuntu 16.04 on your laptop or desktop as soon as possible
to get good at using it.
You should learn how to use the Terminal program to compile, run, and debug programs.
It's probably a good idea to also learn how to use a commandline text editor (such as vi, emacs, or pico)
to create and edit C program source code and not rely on using IDEs with a graphical user interface.
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 thinking about purchasing a laptop, for the purpose of this class, I would recommend that you buy
a Windows 11 or Mac laptop that rusn on an Intel/AMD CPU to minimize compatibility issues.
If the only machine you have access to is one of those new Macs that runs on an non-Intel/AMD CPU,
you can set up a Ubuntu 16.04 system in AWS Free Tier.
Expectations
- This is a hard class! Don't fall behind! You should try to understand a lecture material by the end of the day the lecture was given.
If there is anything you don't understand about the lecture, please send your question to me. In Lecture 1, I will make a promise to
you that I will reply to every private email messages within 24 hours of your email! This is my commitment to you.
- I should also explain that the textbook is designed to give you details a little bit at a time. Therefore, some concepts
are introduced at a very high level at the beginning of the semesters. Then more and more details will be revealed later. By the end of the
semester, you should know how everything is implemented. It can be frustrating that you won't know exactly how things are done when
your learn a particular concept. You can read ahead if you have to know all the details, but that may not be so easy (otherwise, the textbook
would have a different organization).
- The class is designed so that the programming assignments go with the schedule of lectures. If you don't keep up, you may have a very
difficult time implementing the programming assignments. So, don't fall behind!
- If you are having a difficult time with C programming, you need to figure out which concept in C is confusing you and ask me to clarify the concept.
If you don't know how to program at all, then I don't know how to help you. As I have mentioned above, there are prerequisites for this class
and you need to have the minimum background to take this class.
- Ask me questions! I am here to help you with this class. I cannot help you if you don't ask me questions!
Come to live lectures, send me private emails, or post your questions to the class Google Group
(although my 24-hours reply policy does not apply to posting in the class Google Group).
If I don't get questions from you, I would have to assume that you understand everything.
Important Dates
January 2024
Su Mo Tu We Th Fr Sa
Wk 1 7 8 9 10 11 12 13 first day of classes: 1/8
Wk 2 14 15 16 17 18 19 20 MLK day: 1/15
Wk 3 21 22 23 24 25 26 27 warmup1 due 1/26
Wk 4 28 29 30 31
February 2024
Su Mo Tu We Th Fr Sa
Wk 4 1 2 3
Wk 5 4 5 6 7 8 9 10
Wk 6 11 12 13 14 15 16 17 warmup2 due 2/16
Wk 7 18 19 20 21 22 23 24 presidents' day: 2/19
Wk 8 25 26 27 28 29
March 2024
Su Mo Tu We Th Fr Sa
Wk 8 1 2
Wk 9 3 4 5 6 7 8 9 kernel1 due 3/8
10 11 12 13 14 15 16 Spring recess
Wk 10 17 18 19 20 21 22 23 midterm: 3/20-21
Wk 11 24 25 26 27 28 29 30
Wk 12 31
April 2024
Su Mo Tu We Th Fr Sa
Wk 12 1 2 3 4 5 6 kernel2 due 4/5
Wk 13 7 8 9 10 11 12 13
Wk 14 14 15 16 17 18 19 20
Wk 15 21 22 23 24 25 26 27 kernel3 due 4/26
28 29 30
May 2024
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11 DEN final exam: 5/6, 8am-10am, TT final exam: 5/7, 8am-10am
Please note that:
- The "local DEN section" (section 29945D) and "remote DEN section" (section 29946D)
have the same lecture times (MW starting at 10:00am), and therefore, they are considered to be the same section and collectively referred to as
the "DEN section".
- "TT section" refers to section 30331D with lecture time on TuTh starting at 9:30am.
If you have questions, please email the instructor at <bill.cheng@usc.edu>.
|