CS 406: Operating Systems 2019

Spring 2019

Welcome to Operating Systems!

All the homework/labs/lectures will be distributed on Moodle.

We meet MWF, 1:10-2 pm, AEC 500.

Course Description

Course Description

This course introduces you to operating systems, their relationship to the computer hardware, and the system programming techniques you can use to take fuller advantage of the operating the system to write more powerful application programs. As Alison Norman has said in the description of her Computer Systems Course at the University of Texas at Austin:

Students graduating with CS degrees should believe “there is no magic”: they should be able to describe the chain of events that occurs when they hit a key and cause a letter to appear on the screen from the register level (or logical gate level or transistor level) to the system architecture level to the operating system level to the application level. This is philosophically important, but it is also of practical interest to developers who need to figure out how to make a system do what they want it to do. [Syllabus of Computer Systems Course, retrieved January 21, 2018]

In this course you will learn about the fundamental abstractions in modern operating systems including processes, threads, virtual memory, protection, file systems, and i/o. You will have a chance to implement some operating system functions in these areas. You will also learn about concurrency, and how to write concurrent software. Understanding concurrency is essential not only in operating systems but also in most systems that serve groups of users or attempt to take advantage of modern multi-core processors. A database system, for example, uses concurrent programming techniques to run multiple transactions simultaneously while making it seem that they run in serial order.

Perhaps, one cautionary announcement is in order. Operating systems require detailed, precise work. Software that is right 99% of the time is not good enough. Software needs to be correct to avoid things like deadlock, resource exhaustion, and process starvation. Bugs that cause these problems are often difficult to find during testing. These problems need to be prevented during design and coding. That’s part of what this course is about. There will be several programming assignments during the course of the term. While I’m not expecting them all to be lengthy, they will require time because you will need to think deeply, build your understanding of computer systems, and then code with precision.

On the other hand, there’s nothing like operating systems programming to give you a feeling of accomplishment. In systems programming, you have complete control over the system. You can write more powerful and persistent programs with great impact. It’s another thing that I really enjoy in computer science, and hope you will enjoy it as well.


Instructor Information(back up↑)

  • Instructor: Dr. Joann J. Ordille
  • Email: ordillej at lafaytte.edu
  • Office: 522 AEC
  • Office Phone: (610) 330-5416
  • Office Hours: MW: 4-5, T: 1-2, F 2-3. Please email me if you would like to meet at another time. Also, if my door is open, feel free to drop in.


Useful Links(back up↑)

CATME is the class tool for creating teams and evaluating the contribution of team members. This is a general information site. You will receive email for team creation and evaluation.

  • Papers published in the computer science literature as announced on Moodle.

We will read two or more papers together to broaden our perspective on operating systems. Reading computer science papers is a primary way to keep up with the state of the art once you graduate. You will learn approaches to reading a computer science paper that will increase your understanding of it.

  • Moodle

We will use Moodle extensively. In particular, detailed information for class activities and assignments will be available weekly. Please check Moodle frequently, and whenever you receive an email notification to do so.

Course Information

Course Information(back up↑)

  • Web Page:http://sites.lafayette.edu/ordillej/cs406-operating-systems-syllabus-spring-2019/
  • Textbooks:
    • Computer Systems: A Programmer’s Perspective, 3rd edition, by Randal E. Bryant and David R. O’Hallaron. (ISBN: 978-0-13-187325-409266-9), Pearson.

      This book is on reserve in the library.

    • Operating Systems: Three Easy Pieces, by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau.

      This book has a free online version, and some some additional relatively inexpensive versions. You can obtain the free online version and other versions from this web site: http://pages.cs.wisc.edu/~remzi/OSTEP/My Sites

    • Operating Systems and Middleware: Supporting Controlled Interaction, by Max Hailperin.

      This book is available free online. You can obtain it from this web site: https://gustavus.edu/mcs/max/os-book/

    • The C Programming Language, 2nd edition, by Brian W. Kernighan and Dennis M. Ritchie, (ISBN: 978-0131103627) Prentice Hall.

      This book is the classic for learning C, known in the programming community as the K & R. It’s clear and concise, and a favorite of mine. It’s recommended here, because you need to know C for this class.

  • Prerequisites:

    Students are required to complete CS 203 (Computer Organization) or ECE 313 (Computer Organization) successfully before registering for this course. Students are also required to co-register in CS 205 (Software Engineering).

Course Goals and Outcomes

Course Goals and Outcomes(back up↑)
Course Goals:

The goals of this course are to convey:

  • Understanding of the fundamental concepts in modern Operating Systems: processes, threads, synchronization (essential to concurrent programming), scheduling (for the processes and threads), memory management, i/o, and file systems.
  • Understanding of multi-programming and synchronization in such programming models.
  • Skill in presenting materials on group projects.

Course Outcomes: After successfully completing this course, students will be able to:

  • Design, implement, and evaluate a computer-based system, process, component, or program to meet desired needs.
  • Function effectively on a team to accomplish a common goal.
  • Communicate effectively with a range of audiences.

Assignment Types

(back up↑)Assignment Types

Class Attendance: Class attendance is critical to success. Students typically find the concepts in operating systems challenging when they first encounter them, so don’t put yourself at a disadvantage by skipping class. Every effort should be made to arrive on time and remain attentive for the entire class. In addition to unexcused absence, a pattern of late arrival, early departure or inattentiveness will be considered a violation of the attendance requirement. For every unexcused absence, you will lose 0.5 points from your final grade up to a total of 3 points. If you have a dean’s excuse or a coach’s letter for a particular day, you will be excused from class.

Class Participation: Class participation includes asking or answering questions, expressing an opinion about a topic of discussion, meeting with me during office hours, and reporting on activities in a group project, a reading group, or other group activity. All sincere efforts to participate are admired, so don’t worry, just speak up. You are even welcome to express an opinion different than mine. All types of participation count except participation that shows you failed to prepare for class. For example, asking: “Who is Ada Lovelace?” when the assignment was to read the Countess of Lovelace’s biography would not count as class participation.

Reading Groups: Before the second class meeting, we will form reading groups of four students. Two or more times during the semester, you will read a paper in the computer science literature, and meet with your reading group to discuss it. I will provide you with a strategy for reading the paper well, and some questions for discussion. Your group will be responsible for submitting a summary of your discussion in writing before the class meets to discuss the paper with me. You may also want to meet with your reading group to study for exams. Teams for the software projects may be different from your reading group. Failure to write and submit summaries of the paper discussions will negatively impact your participation grade.

Quizzes: To help you stay current with the assigned reading, there may be unannounced quizzes. The quiz will test whether you completed the reading assignment. The intention here is to encourage you to complete reading assignments before class. If it appears that students in the class are falling behind, there will be announced quizes that cover material from the previous week. The intention here is to encourage you to review the material each week in preparation for the next week.

Homework: Homework assignments will be listed in Moodle to help all of us track them. Completing the homework, as well as the labs, will deepen your understanding and assist you in preparing for exams.

Group Projects: There will be three or four programming projects throughout the term to familiarize you with parts of the operating systems. You will work on the projects in groups of two or more as specified in the project description. For the first project, you will build a shell program for Linux. In this project, you have the option to work singly or in pairs. If you work in pairs, I urge you to use pair programming techniques to ensure that you both completely understand the solution. In pair programming, one person programs while the other watches both for understanding and to catch mistakes. The person who programs and the one who watches should switch roles frequently, so they are each at the keyboard about half the time. This technique was frequently used by the developers of the Unix Operating System. If it worked for them, it should also work for you. An intimate knowledge of the projects will be important in scoring well on the exams, so don’t miss a chance to learn all you can.

Exams: In addition to the ability to answer homework type problems, questions on the midterm and final exams will also test your conceptual understanding of operating systems. Are you able to synthesize solutions to new problems from what you have learned? We will discuss the types of possible exam questions before each exam. All work on the exam must be your own. There will be no make-up or early exam sittings without a request from the Dean on your behalf.

Academic Honesty

(back up↑)Academic Honesty

It is essential that you follow the Lafayette College Code of Conduct with respect to academic honesty and avoidance of plagiarism as described in the Student Handbook. The beginning of the semester is a good time to review the handbook in this regard.

“To maintain the scholarly standards of the College and, equally important, the personal ethical standards of our students, it is essential that written assignments be a student’s own work, just as is expected in examinations and class participation. A student who commits academic dishonesty is subject to a range of penalties, including suspension or expulsion. Finally, the underlying principle is one of intellectual honesty. If a person is to have self-respect and the respect of others, all work must be his/her own.”

The Handbook gives the following examples of intellectual dishonesty:

  1. Submitting someone else’s work as your own.
  2. Incorporating someone else’s ideas or work into your own without attribution.
  3. Paying or arranging for someone else to do your work.
  4. Re-using material from another course without permission of your instructor.
  5. Engaging in unauthorized collaboration including asking for homework or programming assignment answers from an online discussion group.
  6. Obtaining the Instructor’s Answer Guide to the exercises in the book and using it. (This would also constitute theft, since the guide is only licensed to instructors.)

Academic dishonesty also includes copying explanatory material, such as descriptions of software packages, into documentation without indicating the source of the text and that it was copied.

When in doubt about whether an action is considered academic dishonesty, it is best to consult with me before you act. Cases of suspected intellectual dishonesty will be reported to the Dean, and the Dean will investigate and impose penalties.


(back up↑)Grading

Graded Material:
The course grade is based on the materials listed below graded on a 100 point scale, with each item contributing a specified percentage to the overall score. As specified in the student handbook, A will reflect excellent work, B will reflect good work, C will reflect acceptable work, and D will reflect passing work.

Class Attendance & Participation 5%
Quizzes and Homework 10%
Group Projects 34%
Midterm 1 24%
Final Exam 27%

Grading Scale:
Typically, grades are assigned as follows from your final numerical grade:

A: 93-100 B+: 87-89 C+: 77-79 D+: 67-69 F: 0-59
A-: 90-92 B: 83-86 C: 73-76 D: 63-66
B-: 80-82 C-: 70-72 D-: 60-62

Tentative Schedule

(back up↑)Tentative Schedule*

Wk. Dy. Date Topic

(C: Computer Systems,
P3: Three Easy Pieces,
M: OS and Middleware)
1 M 1/28
Course Overview
W 1/30
History of Operating Systems
F 2/1
P3: ii, iv, vii,Section 1 and 2
(Try the code!)
2 M 2/4
Enabling Technologies:
Dual Mode Execution
C: 8-8.1
W 2/6
P3: Sections 3-6
C: 8.2-8.4
F 2/8
Processes and Concurrency, System Services
C: 8.5
3 M 2/11
Fork and Exec
W 2/13
Exec and Signals
F 2/15
Safe Signal Handling
C: 8.5.5,
C: 8.7-8.8
4 M 2/18
P3: 7-8, 11
W 2/20
Scheduling Exercise
F 2/22

P3: 25-27

C: 12.3-12.4
M: 4.2
5 M 2/25
Threads and Locks
P3: 28
W 2/27
P3: 31-32, 34
C: 12.5-12.5.3
Figure 12.17 has an error
F 3/1
Semaphore and Lock Exercises
P3: 28
6 M 3/4
Pintos Project Discussion
W 3/6
Semaphore and Lock Exercises
F 3/8
P3: 32
7 M 3/11
Thread Performance and Safety
C: 12.6-12.8
W 3/13
F 3/15
8 M 3/18
Spring Break
W 3/20
Spring Break
F 3/22
Spring Break
9 M 3/25
Mesa Monitors Paper
(Sections 4, 4.1, 3.2), P3: Monitors
W 3/27
Monitor Semantics, Monitor Deadlock
F 3/29
Debugging in Pintos
10 M 4/1
Therac-25 Discussion
W 4/3
Intro to Virtual Memory
P3: 12-15
F 4/5
P3: 16
11 M 4/8
Free Space Management, The Memory Hierarchy
P3: 17
C: 6.1.1, 6.1.2, 6.3
W 4/10
C: 6.4-6.4.5
F 4/12
Caching, Intro to Paging
P3: 12-17,
C: 9-9.6
12 M 4/15
C: 9-9.6
W 4/17
Advanced Paging
P3: 20
F 4/19
Swapping, Replacement Algorithms
P3: 21-22
13 M 4/22
File Systems
C: 6.1.3-6.1.4, P3: 35, 39
W 4/24
File System Design
P3: 40-41
M 4/26
File System Crash Recovery
P3: 42
14 M 4/29
Journaling File System
P3: 43, 51
W 5/1
Access Rights
M: 7.4-7.6
F 5/3
M: 11
15 M 5/6
Mini OS Conference
W 5/8
Mini OS Conference
F 5/10

*Tentative schedule, subject to change. Check Moodle for the most up to date information.

**No travel arrangements should be made until the final exam schedule has been issued

Additional Information

(back up↑)Additional Information

SMS Advisor: Sexual Misconduct Support Advisors, formerly SASH, is a campus organization that seeks to prevent sexual and gender based violence and harassment. It also provides services to those who have suffered from such violence or harassment. I am an SMS Advisor, and will be on call 24/7 for one week this semester. During that week, in the unlikely event that I receive a call during class, you will continue with your lab or assignment while I assist the caller. If you or a friend ever needs an advisor, call or text 484 548-0325.

Respect for classmates, colleagues and team members: All students are expected to show respect and courtesy to each other. Mutual respect is a high ideal in academic, business, and personal life. It is central to learning well together. Disagreements over ideas or constructive criticism of someone’s work is in keeping with this ideal. Attacking or disparaging someone is not, and will not be tolerated. In group projects, mutual respect also includes reliably contributing to the project and keeping your commitments to the group.

We follow the College Diversity Statement which says in part:

All members of the College community share a responsibility for creating, maintaining, and developing a learning environment in which difference is valued, equity is sought, and inclusiveness is practiced.

To learn more about how these principles are followed in the computing industry, view the Google video:

Diversity at Google (https://youtu.be/_3RoQRN65AI)

and the eBay video:

Diversity Workshop at eBay, Europe (https://player.vimeo.com/video/159767606)

Privacy: Moodle contains student information that is protected by the Family Educational Right to Privacy Act (FERPA). Disclosure to unauthorized parties violates federal privacy laws. Courses using Moodle will make student information visible to other students in this class. Please remember that this information is protected by these federal privacy laws and must not be shared with anyone outside the class. Questions can be referred to the Registrar’s Office.

Equal Access: In compliance with Lafayette College policy and equal access laws, I am available to discuss appropriate academic accommodations that you may require as a student with a disability. Requests for academic accommodations need to be made during the first two weeks of the semester, except for unusual circumstances, so arrangements can be made. Students must register with the Office of the Dean of the College for disability verification and for determination of reasonable academic accommodations.

Important Dates:

  • Normal Add/Drop deadline: February 8th
  • Spring Break: March 18th – 22nd
  • Last day to Withdraw (WD): April 22nd
  • Classes end: May 10th
  • Final Exams: May 13th – 20th

Federal credit hour statement: The student work in this course is in full compliance with the federal definition of a four credit hour course. Please see the Registrars Office Website (https://registrar.lafayette.edu/wp-content/uploads/sites/193/2013/04/Federal-Credit-Hour-Policy-Web-Statement.doc) for the full policy and practice statement.

Credits: A special thank you to Alison Norman, University of Texas at Austin, for access to her syllabus and materials for a similar course. They were very helpful in developing this course.

Photo of Computer Systems: A Programmer’s Perspective Textbook Copyright © Pearson. Photo of Operating Systems: Three Easy Pieces Textbook Copyright © Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau. Photo of Operating Systems and Middleware: Supporting Controlled Interaction Textbook Cover Copyright © Max Hailperin. Photo of The C Programming Language © Prentice Hall.