COMP 530: Operating Systems

Syllabus and Policies

  1. Bulletin Description
  2. General Course Info
  3. Instructor Info
  4. Teaching Assistant(s)
  5. Textbooks and Resources
  6. Course Description
  7. Target Audience
  8. Prerequisites
  9. Goals and Key Learning Objectives
  10. Course Requirements
    1. Lecture Recordings
  11. Key Dates
  12. Grading
    1. Examinations
    2. Homework
  13. Course Policies
    1. Lateness
    2. Collaboration vs. Cheating
    3. Cheating Yourself
  14. Disclaimer
  15. Acknowledgements

Bulletin Description

Types of operating systems. Concurrent programming. Management of storage, processes, devices. Scheduling, protection. Case study. Course includes a programming laboratory.

General Course Info

Term: Fall 2016
Department: COMP
Course Number: 530
Section Number:001
Time: MW, 11:15-12:30
Location: SN 014

Instructor Info

Name: Dr. Donald Porter
Office: Sitterson 362
Email: porter at cs dot unc dot edu
Phone: 919-590-6044
Office Hours: MW 12:30 - 1:30 PM, Tues 4-5 PM, or by appointment.

Teaching Assistants

NameOfficeEmailOffice Hours
Rohan PrinjaSN 373rohan at cs dot unc dot eduTTh 2-3:30pm, W 9:30-10:30 am, or by appointment.
Stephen TangSN 373sytang at cs dot unc dot eduMF 4:30-6:30pm, or by appointment.

Textbooks and Resources

Required Textbook: We will be using this book for required course readings, as listed on the course schedule. The readings will not necessarily be in order, and I will supplement the book with additional required and optional resources as needed. All required readings will be placed on the course schedule.

The book is available from the university book stores as well as Amazon and your neighborhood book store.

Most of the course materials will be on the course website. We will also use Piazza for class discussions, and Sakai only for posting assignment grades.

A number of helpful references for the labs are available on the References page.

Optional Textbooks: The following books are useful references for this course and OS kernel programming in general. These books are available from amazon, and several are available for free online via the UNC library (links below).

Other recommended operating system textbooks and references (in no way are these required purchases for the course):

If you need help with C or Unix, I recommend these texts:

If you are interested in more detail on Linux kernel programming, I recommend these references:

Course Description

An operating system is an essential part of almost all computer systems. In fact, your cell phone, your car, and most consumer appliances that contain a processor have an operating system inside. Your car probably has at least 10 different operating systems lying about.

At a high-level, the principles of operating systems include topics such as how to securely and fairly share resources among multiple applications; how to design abstractions for hardware resources that balance ease of programming with expressive power; and techniques for coordinating concurrent access to a resource.

More specifically, this course will primarily study general purpose, time-shared operating systems. In this context the operating system is the software system that provides the interface between users, their applications, and the underlying hardware. The purpose of this course is to introduce some of the fundamental concepts in the design of a time-shared operating system. These include:

More philosophically, a computer scientist with an bachelor's degree should not view any part of the computer as "magic," but should either understand how it works or have the tools to figure it out. For instance, when one types a command at the console, what is the chain of hardware and software events that lead to the command returning the correct value?

Thus, an important part of the course will be the hands-on experience. For that, you will developing assignments on a Linux system. Some assignments will require low-level user-level programming.

Target Audience

The course is geared towards advanced undergraduate computer science majors and first year graduate students in computer science. Operating systems is a classic topic in a computer science curriculum as the problems of resource allocation, management of concurrency, and file storage have always been present in some form in nearly all computing environments. You can’t understand how a computer operates until you understand what an operating system is, how it functions, and how it is organized.


The prerequisites for this class are:

These courses are necessary background. If you have not completed COMP 410 and 411 you will be dropped from the class.

If you've taken equivalent courses elsewhere, and they include actual programming experience in C/Unix, please speak to me first to get an approval to take this class. If you've never taken an introductory C/C++ course before, you may not take this class; in some cases, having industry experience in the same field is enough.

C Programming: You should already know the basics of programming and debugging in C programming language. This course will be taught in C, and you will complete substantial, user-level programming assignments in C. We expect that a typical student will become much more proficient in C over the course of the semester. However, because this is not a C course, the time spent in class on C will be minimal.
If you do not know C and would like to take the course, I would recommend reading "The C Programming Language" by Kernighan and Ritchie and working the exercises in the book BEFORE THE FIRST DAY OF CLASS. A dedicated student that is proficient in another language (e.g., Java) can probably accomplish this in a week or two.

You should already have basic exposure to Unix commands and the command line. You should know what commands such as ssh, gcc, make, man, ls, mkdir, vi/emacs, and gdb do, or be able to figure this out on your own (via google and friends). In general, we will not teach you how to use Unix (we'd like to spend the time teaching you about operating systems instead), although we may discuss particularly tricky commands.

If you do not fulfill the above requirements, you should very strongly consider postponing COMP 530 until you are more prepared.

Goals and Key Learning Objectives

Students will learn how to write concurrent programs, how to synchronize concurrently executing processes, and how to communicate data between such processes. They will learn how to allocate system resources such as memory and processor cycles to processes and how such allocation decisions affect system performance. They will also learn how system resources can be virtualized and shared between processes so as to provide the abstraction that each process is executing on a dedicated machine.

Course Requirements

The course is taught in an interactive lecture style. Although there are slides and planned topics to discuss, students are expected to answer questions during the lecture and ask questions. Attendance is expected, but will not be recorded.

To help students review and synthesize course concepts, we will assign worksheets, to be completed in a small group outside of class. Worksheets will be “discussed” between groups using a social media site for the course. The groups will change approximately every week and in total students will complete approximately 8-10 worksheets.

Students are also expected to complete roughly 4 programming assignments. The programs will be written in the C programming language on a departmental Linux server and will each emphasize some aspect of operating system design and implementation.

Lecture Recording

Lectures will be recorded and be made available to the students in the class. These recordings are intended to help students review the material after attending lectures, and are not a substitute for attending lectures in person. Lecture attendance is still expected, to facilitate questions, announcements, and discussion. If lecture recording substantially harms attendance, it will be discontinued.

This is a best-effort service and should not replace lecture attendance. Student questions, chalkboard drawings, and other materials may not record properly. Moreover, my experience has been that a few lectures are lost each semester for unforeseen technical difficulties (e.g., the recording space fills up mid-lecture, a file gets corrupted).

Key Dates

There will be two in-class exams: Wed 10/05, and Wed 11/9, held during class time.

There will be a final exam on Tuesday 12/13 at noon.

Please mark your calendars now. If you have a conflict with the midterm, tell the instructor during the first two weeks of class, and we will schedule a makeup for a time before the exam is given to the rest of the class.


The final grade will be determined as follows: The raw scores obtained by all students on each assignment and exam will be standardized for that particular assignment or exam either (at my discretion) by converting them to percentile scores, or else by applying a linear transformation to map the scores to a standard [0, 100] scale. A weighted sum of the resulting standardized scores will then be formed (with weights as shown below) to obtain a composite score for each student.

Finally, the composite scores will be ranked, and I will apply a subjective method of my choice to determine the cutoffs for each grade category. Absolute performance standards, the distribution of composite scores, information derived from late homeworks, and class participation are factors likely to contribute to this decision.

Attendance and participation in classes, in particular, will be factors that can offset borderline grades. This includes conversations with the instructor and TA over email, contributing on Piazza, and so on. I also often take into account evidence of improvement over the course of a semester. However, I will not entertain end-of-term pleas to get a certain grade.

So that you can get an idea of how you are doing as the term progresses, I will report rough percentile information when I hand back each assignment. Final percentile scores will not be computed until after all grade changes and corrections have been taken into account at the end of the term.

The exams are closed book and include a mix of multiple-choice, short answer, and programming questions.

Re-grading: after each grade is given out, you will have a chance to discuss it with the grader and the instructor. You must first discuss your grade with the grader, within the first 48 hours after the grade has been handed back. It's highly recommended that you take some time to review your entire grade before discussing it with the grader. After discussing your grade with the grader, if you wish, you may discuss it with the instructor during office hours or by appointment. If, after discussion with the grader or instructor, you ask for an assignment to be regraded, the entire assignment will be regraded. Your grade can be improved or harmed by regrading.

Extra credit: Some labs may include optional challenge problems, which may be completed for extra credit. Please indicate if you do these in your lab's challenge.txt file. The instructor may also assign bonus work in class at my discretion. Any extra credit points accrued by any student will be used as follows. The final course grade will be assigned as a letter grade which excludes all extra credit points. Then I will apply a subjective method to determine how much value to assign to extra credit points. Extra credit points can only be used to raise your final course letter grade. In other words, you are not obligated to do any of the extra credit work, and you can still get an A in this course.
A note of caution: in the past, some students have spent too much time working challenge problems and gotten behind on core assignments; note that the relative value of extra credit is small compared to the main course assignments.

Working alone: Some of you may choose to work alone on assignments in which may I permit teams. In general, there is no extra credit for working alone---I prefer that you work together. I reserve the right in exceptional cases to adjust a score for a student that works alone, but this is rare and typically invoked only when there are other mitigating issues.


These exams will be closed book.

Special offer: you can write your own exam questions! Submit a question with your solution to course staff in advance of the exam, and if we like it, it will appear on the exam.


The out-of-class work in this course will consist of three types of activities:

  1. Reading from the textbook, assigned papers, and Linux source code. The main purpose of reading is to provide you with other means to learn the material. Reading in advance of class and giving the basics time to digest also helps one understand more subtle concepts that are explained in class. You obviously won't be graded on the readings per se, but reading can improve your exam scores.
    Note also that you are resposible for reading all of the posts on the class mailing list (on Piazza this semester). The list will be an invaluable informational resource for you throughout the class (that's why you must subscribe to it).

  2. Worksheets handed out in class. You are expected to complete these in teams, in order to help you gain experience reasoning about the issues discussed in class. The worksheets will not be graded, but can affect your participation grade (directly) and working them should improve your exam scores.

  3. Labs in which you will gain hands-on experience using operating system features. Each homework assignment will be graded, and you will be expected to do this with a team.

Reading will take place on an ongoing basis throughout the semester. There will be roughly five programming assignments, with each assignment due a few weeks after it is issued. If you work with a partner, all members you should understand the code, as the exam will also include questions about the labs.

You may work alone or with a partner on all labs. You may change partners between assignments. Larger partnerships will not be permitted.

Course Policies

The course final is given in compliance with UNC final exam regulations and according to the UNC Final Exam calendar.


Each student has 72 late hours to be used at his/her discretion on programming assignments throughout the semester. After your late hours are exhausted, each additional day late will incur a full letter grade penalty. In your lab handin code, you must include a file called slack.txt that lists how many late hours you have used.

Conflicts with other courses, research deadlines, holidays, etc. are unavoidable. Thus, you are expected to budget these to account for your other obligations, as well as plan ahead and start early.

The lowest grade you will receive for lateness is a D. If you turn nothing in by the last day of classes for a given lab, you will get an F for that lab. If you turn in all programming assignments on the last day, late assignment may receive up to 60% of the credit.

I would recommend turning in what you have by the deadline for a lab, and then submit an updated version late if it will improve your grade after the deducted late penalties. Course staff will generally not grade labs until several days to a week after they are turned in.

Exemptions to the lateness rule will be allowed in three cases:

  1. Illness, which has to be documented by a doctor and approved by the university.
  2. Death in the immediate family.
  3. Accomodations for students with disabilities, as prescribed by the university.

No extensions will be given for any other reason.

Honor Code

All enrolled students must complete this homework, which explores academic integrity. Course staff will not grade any assignments for a student until this form is received.

Students are encouraged to work together on written homeworks (worksheets), and to study together. The policies below apply to programming assignments (labs).

In the labs you may work with a partner. If you work alone, you submit your own work. If you work in a team, you will submit your assignments jointly with your team. Whether or not you work in a team, you may discuss the programming assignments with anyone you like in general terms, but you may not share code with anyone other than your partner. The code you and your partner submit must be your own work, and only your own work. Any evidence that source code has been copied, shared, or transmitted in any way between non-partners (this includes using source code written by others in previous semesters, or at other universities!) will be regarded as evidence of academic dishonesty.

Handing in someone else's work is expressly forbidden.

Some more specific guidelines for the labs:

Note that the course staff will use tools such as MOSS to detect cheating. These tools are very good at comparing large sets of programing assignments and correlating those that have a shared code basis, even if the code has been changed significantly!

You are welcome to use existing public libraries in your programming assignments (such as public classes for queues, trees, etc.) You may also look at operating systems code for public domain software such as Linux. Such activities qualify under approved collaboration practices, and you are welcome to take advantage of them. Note that you must cite and acknowledge those sources properly. Not doing so constitutes academic plagiarism, and will not be tolerated.

I am very serious about not tolerating academic dishonesty. Unacceptable collaboration, copying or unapproved use of any code, or failure to attribute sources used to formulate a homework solution will be considered a violation of the UNC Honor Code and will be reported to the Student Attorney General.

Intellectual dishonesty can end your career, and it is your responsibility to stay on the right side of the line. If you are not sure about something, ask.

Cheating Yourself

Let me also appeal to your better nature, and remind you of what you will miss out on if you engage in dishonest behavior.

This is a demanding course, and computer science is a demanding major. A successful CS student will learn many skills that are in high demand on the job market. In this course, I hope you will learn to do low-level system programming---a very valuable skill.

It is my experience that there are some skills that can only be learned through struggling with a problem, such as debugging a complex system or synchronization design. If you "take a shortcut" by cheating, you will nominally complete the assignment, but you are cheating yourself of learning how to fix these problems in the future.

By analogy, this class is like signing up with a personal trainer. If you tell your trainer you did all your exercises while she had her back turned, are you actually going to be stronger?

When you graduate, I hope you will get a good job. Your employer and colleagues will expect you to be a master programmer. If you are not a master programmer, and you won't be if you violate the academic integrity policy, you will not have a long or rewarding career.

In summary, these academic honesty guidelines are in your long-term interest.


The professor reserves to right to make changes to the syllabus, including project due dates and test dates. These changes will be announced as early as possible.


Portions of this course design, organization, policies, syllabus, web design, etc. came from Gene Stark, Erez Zadok, Michael Bender, and Kevin Jeffay.

Last updated: 2016-11-21 21:42:42 -0500 [validate xhtml]