CS 550-Spring 2017: Operating Systems

Time Mondays and Wednesdays, 7:25–8:50 PM
Place EB R15

Kenneth Chiu

E-mail: E-mail intended for me or the TA should be sent to csN-internal@cs.binghamton.edu (replace N with 550 to get the actual e-mail address). This list is read by both me and the TA.

Office: Q-15

Office Hours: TR at 2:40 in Q15. If you wish to meet with me TR at 2:40, you must send me email by noon that day. Otherwise, I may not show up for office hours.

Teaching Assistant

Leijie Hou

Office Hours: W, 5:15-7:15 PM, G25

Xiayu Yu

Office Hours: M, 5:15-7:15 PM, G25

E-mail: For e-mail to the TAs, use the CS 550 internal mailing list address given above.

Web Page http://www.cs.binghamton.edu/~kchiu/cs550/
Mailing Lists

Public, for announcements and discussion: csN@cs.binghamton.edu (replace N with 550 to get the actual e-mail address). Subscribe at http://www.cs.binghamton.edu/mailman/listinfo/cs550/.

Private to me and the TA: csN-internal@cs.binghamton.edu (replace N with 550 to get the actual e-mail address).

Learning Objectives

The objective of this course is to gain a solid understanding of computer systems, with an emphasis on modern operating systems. We will cover classical and current topics in operating systems, focusing on advanced OS concepts. You will also gain familiarity with the workings of a real-world operating system through kernel programming in Linux. This course is not a substitute for an undergraduate-level OS course. Topics we may cover include (but are not limited to):


YOU MUST HAVE A GOOD BACKGROUND IN C. You will have a difficult time getting a grade higher than a C without such a background. You should have taken undergraduate OS, computer architecture, data structures, etc. You should be familiar with threads and concurrent programming, though not necessarily in detail. You should also have some experience in programming in the UNIX environment, and also systems programming and sockets programming in UNIX/Linux.

For C, I recommend Kernighan and Ritchie's The C Programming Language (Second Edition).

For UNIX systems programming, I recommend Steven's Advanced Programming in the UNIX Environment.

For POSIX threads (pthreads) I recommend Butenhof's Programming with POSIX Threads.

All of these are just recommendations, however. You should feel free to use any book of your choosing.

Here are some things you should be familiar with. It is not exhaustive by any means, but is just meant to give you a sample:


Lecture slides will be available via the course web page. Lecture slides are not a substitute for class attendance, since (i) they will not be complete and (ii) significant parts of lectures may not come from the class slides. Also, I sometimes take test questions from questions asked by myself or others during class.

Class participation during lectures is highly encouraged, and will affect your grade. If you don't understand something, please interrupt, since it's likely that others also don't understand. The more effort you make to understand the material during lecture, the less you will need to study for the exams.

Also note that the ability to ask questions is in itself an important and valuable skill.


The text book is still under consideration, but we are going to give this free textbook a try: Operating Systems: Three Easy Pieces a try. We will also refer to xv6: a simple, Unix-like teaching operating system.

Material may also be drawn from:

You will be responsible for the material in any reading assignments.


The tentative grading break down will be:

47% 2 tests
47% 3–4 programming assignments
6% Class participation (including attendance)

Grading will be scaled (on a curve), so the absolute score is not significant. In other words, it is how well you do against your classmates that really matters. All requests for changes of grades must be made in writing, not in person, and you must wait 24 hours after receiving the grade before requesting a change. Resubmit your homework or exam to me, along with a written statement describing why you feel you deserve more points, and I will consider your case.

Programming Assignments

Program assignments will be graded on a combination of the functionality, performance, and the code itself (style, etc.). Functionality is overwhelmingly the most important. In other words, does it work? Of course, it also must meet any implementation requirements. For example, if it works, but does not use the language features that were requested in the assignment description, you will not receive full credit. Included in functionality are memory leaks and other memory errors, as checked by valgrind. These are serious bugs, and will be graded accordingly.

Performance will be a factor if extremely slow, but small differences in performance (such as a few percent) will not be significant.

Your code should compile without warnings when compiled with -Wall -Wextra -pedantic. You are allowed to disable warnings about unused variables or parameters. We will consider allowing the disabling of other warnings on a case-by-case basis. Send e-mail to make a request.

We won't grade you explicitly on issues such as comments and style, but if you code is well-commented, it will be easier for us to understand it and assign partial credit.

You MUST follow the instructions for submitting assignments exactly. Egregious failure to do so will result in a point deduction. We will use scripts for as much of the grading process as possible.

If you use your own machine to work on the assignments, I strongly suggest that you use a 64-bit OS and compiler, for the most compatibility with the machines that we will use to grade.

Programming Assignment 1: Malloc

Late Policy

Assignments will always be due at 11:59 PM on the day that they are due. Assignments will lose 7% for each day that they are late.

Extensions to programming assignments will not usually be granted, especially when requested at the last minute.


Each test will be in 85 minutes long. The tests will not be cumulative.

Many students do not have English as your native language. If you do not understand the question, PLEASE ask for a clarification. You may also ask questions about terminology. In some cases, I may decline to answer, but feel free to ask.

Due to the difficulty of preparing make-up exams in a fair manner, I will not reschedule exams for individual people, except in the case of medical emergency, with the appropriate documentation.

Class Participation

Attendance is mandatory, and roll will be taken. If you are late and miss your name, that is fine, but you must send e-mail within 24 hours to the internal mailing list so that we have a written record of it. Do not come up after class to tell me that you were late, because I need an e-mail record.

Everyone will be granted five free excused absences.

Some of you will be asking me later for recommendation letters of various types. For me to be able to write a strong recommendations, you will need to interact with me and participate in class. Without something more, the only thing I can say is that you did or did not show up in class, and list your grade. That will not be a very strong recommendation, even if you receive an A in the class.

Academic Integrity

You are free to discuss assignments with one another at a high level. However,


Office Hours, Telephone, E-mail

My door is usually open (at least slightly) if I'm in and available. If so, please come in or knock. If my door is closed, I'm either not in, on the phone, or meeting with someone. I prefer that you don't knock unless you have an urgent matter.

If you verbally arrange a meeting with me or ask me to do something, please follow up with an e-mail so that I will have a written record. Otherwise, it is almost guaranteed that I will forget.


I usually don't use my office phone, and rarely check voice mail.

However, I am happy to do an audio chat (Skype preferred) if the need arises. Arrange it first with e-mail.

Mailing Lists

There are two mailing lists for this course. The first list, csN@cs.binghamton.edu (replace N with 550 to get the actual e-mail address) is an open, public list. Subscribe at http://www.cs.binghamton.edu/mailman/listinfo/cs550/. It will be used by me for announcements, and may be used by students for questions and discussion. This list should be read carefully, and will often contain hints and tips for the programming assignments. You are responsible for any clarifications I or the TA make on the mailing list. The second list, csN-internal@cs.binghamton.edu (replace N with 550 to get the actual e-mail address), is read only by me and the TA, and may be used for administrative issues. You are encouraged to use the public list for questions of a general nature.

You must use the e-mail lists rather than sending questions directly to me. The lists automatically archive e-mails, for future reference. I can then go back to these e-mails later to improve the course.

I may sometimes lose track of what e-mail I've responded to, so don't hesitate to remind me if I seem to have forgotten about your e-mail or request. I never ignore e-mail on purpose.

Schedule and Files

Slides for lectures that have not yet been given are subject to change. You should ignore any hidden slides. Also, some slides have notes.

Date Topic Slides Documents and/or Files Notes
Wednesday, January 18, 2017 Course policies, Background survey

Preliminaries [PPT]

Monday, January 23rd, 2017 Background survey
Wednesday, January 25th, 2017 Introduction to OS

Introduction [PPT]

Monday, January 30th, 2017
Wednesday, February 1st, 2017
Monday, February 6th, 2017 Processes

Processes [PPT]

Wednesday, February 8th, 2017 Limited direct execution

Limited direct execution [PPT]

Monday, February 13th, 2017 Scheduling

Scheduling [PPT]

Monday, February 20th, 2017 Scheduling
Wednesday, February 22nd, 2017 Scheduling, Memory management

Memory management [PPT]

Monday, February 27th, 2017 Memory management