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.
My actual CS 402 class web site for Fall 2019 is not ready yet.
Since many students are registering now, I felt that I
should post some important
rules about my sections so students can know what to expect and register accordingly.
I tend to be a stickler to rules, so there will be no exceptions
(In general, I'm bound by my own written rules and I have to stick to them.)
- 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.
- DEN lecture videos will be made accessiable to all of the non-DEN sections (although you may not be able to download any of these videos).
- You must take all the exams in the section for which you are registered.
- The dates and times for the final exams are deteremined by the university and there is absolutely
no way to change them for you. 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.
- 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.
- If you want to audit this course unofficially, I will have to say no to you.
- 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. Teams form fairly
quickly soon after the semester starts. So, you should do this as early as possible.
Grade Normalization of Programming Assignments
- 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 assignment grade according to the average and standard deviation for each grader and
extrapolate your grade according to the overall class average and standard deviation.
For example, if the average for a particular grader is 85 and standard deviation is 10 and you got a score of 87.5 (i.e., average plus a quarter of a standard deviation),
your "normalized" score will be the overall class average plus a quarter of the overall class standard deviation.
This means that if you were graded by an "easy grader", your normalized score may be lower than your original score.
If you were graded by a "harsh grader", your normalized score may be higher than your original score.
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 you can have flexibility when you choose which section to enroll.
This is only done for programming assignments since the pgoramming assignments are identical for every student,
no matter which section you belong. For exams, each section gets a different exam, and therefore,
grade normalization is not needed and will not be performed.
- Even though you are on the wait list and there is no guarantee that you will get in,
if you intend to take this class, you are expected to attend every lecture and
submit all assignments on time (i.e., same deadlines as students who are already registered).
So, even if you get in on Friday of the 3rd week of classes,
you will be expected to turn in warmup #1 by late night that Friday just like everyone else.
- You can earn up to 4% extra credit for class participation. But you will only
earn extra credit if you attend the lectures and discussion sections for which you are registered.
(It's perfectly fine if you sit in another lecture or discussion section and you don't need prior approval.
You just won't get class participation extra credit if you do that.)
For students registered in the "remote DEN section" (i.e., section 29946D),
you get the participation extra credit automatically (i.e., without signing roll sheets).
- The recommended preparation for this class are (1) CSCI 201L or CSCI 455x, and (2) EE 357 or EE 352L.
Basically, you should know how to program and you should know what's inside a processor/CPU and
how it works (i.e., how it executes machine instructions).
- The programming assignments of this class will be very demanding (kernel 3 will be extremely difficult and very very time-consuming).
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,
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 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 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 place 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 data type
(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.
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 some 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. 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 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.)
If you don't have access to a Unix/Linux machine, you can install your own.
Our kernel programming assignments must run on Ubuntu 16.04
(if your machine is slow or has less than 4GB memory, Ubuntu 12.04 is also acceptable). Therefore, you
might as well install Ubuntu 16.04 on your laptop or desktop as soon as
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.
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 text editor (such as vi, emacs, or pico)
to create and edit C program source code.
- (Aug 26, 2019) - first day of class
- (Sep 2, 2019) - Labor Day, university holiday
- (Sep 13, 2019) - warmup1 due
- (Oct 4, 2019) - warmup2 due
- (Oct 25, 2019) - kernel1 due
- (Oct 30, 2019) - midterm for DEN and PM sections (firm)
- (Oct 31, 2019) - midterm for TT sections (firm)
- (Nov 15, 2019) - kernel2 due
- (Nov 27-29, 2019) - Thanksgiving recess
- (Dec 6, 2019) - kernel3 due
- (Dec 12, 2019) - TT section final exam, 11am - 1pm (firm)
- (Dec 13, 2019) - PM section final exam, 11am - 1pm (firm)
- (Dec 16, 2019) - DEN section final exam, 8am - 10am (firm)
Please note that
"DEN section" means "local DEN section" (section 29945D) AND
"remote DEN section" (section 29946D) with lecture time on MW starting at 10am,
"PM section" means section 30243D with lecture time on MW starting at 12pm, and
"TT section" means section 30203D with lecture time on TuTh starting at 9:30am.
If you have questions, please e-mail me at <email@example.com>.