CS 45: Operating Systems — Spring 2020

Announcements

  • Most announcements will be on Piazza.

Class Info

Class: Tuesday / Thursday, 11:20 AM - 12:35 PM, SCI 101

Professor: Kevin Webb

Piazza: Q&A Forum

Office hours: Tuesday 4:00 PM - 5:00 PM, Wednesday 2:00 PM - 3:30 PM, or by appointment.

Office: Sci 255

Welcome to CS 45. This course will introduce fundamental ideas in operating systems. The structure of this course may be different from many other CS courses at Swarthmore. We’ll be using a teaching model called peer instruction, which places a strong emphasis on classroom discussion and student interaction.

The course is composed of the following:

  • Readings: The readings serve as a first exposure to new topics, where students learn the basics of the material.

  • Class meetings: The classroom material will cover the difficult concepts and facilitate student discussions.

  • Exams: The midterm exam and a final exam (both closed-book) cover the material in the class meetings and labs.

  • Labs: Several lab programming assignments (mostly in C) explore various aspects of operating systems.

    Section A

    Friday 2:15 - 3:45

    SCI 240

    Section B

    Friday 4:00 - 5:30

    SCI 240

Required Materials

iClicker

This course will use iClicker devices to facilitate feedback and discussion during class. For many upper level courses including CS 45, we are requiring that students purchase their own clicker for personal use. Clickers may be purchased at the college bookstore or online. Please register your clicker online as soon as possible!

Supplemental Textbook (Optional)

Operating Systems Concepts Essentials by Silberschatz, Galvin, and Gagne

ISBN: 978-1118804926

We’ll be using the second edition.

Goals for the course:

By the end of the course, we hope that you will have developed the skills to:

  • Describe the importance of abstraction in modern systems.

  • Characterize the roles of major subsystems in an OS (e.g., scheduler, memory management, file systems, etc.).

  • Differentiate between policy and mechanism.

  • Evaluate the suitability of policies for various operating environments and use cases.

  • Refine C programming skills in the context of systems design, development, and debugging.

  • Build and deploy customized Linux kernels on a virtual machine.

Lab Schedule

Please familiarize yourself with the course’s partnership expectations before starting the lab.

Weeks Lab Topic

1

Lab 0: Shell Refresher & Environment Setup

2-3

Lab 1: Shell Redux

4-5

Lab 2: Implementing System Calls

6-7

Lab 3: Building a Synchronization Primitive

8-9

Lab 4: Simulating a Page Table

10-13

Lab 5: Building a File System

Lab 6: A Modular Device Driver

Class Schedule

This is a tentative schedule; it may change as we go.

All readings refer to the textbook unless otherwise indicated (e.g., there’s a link to some other source).

To access the recordings, you’ll need to be signed in to your @swarthmore.edu Google account.

Week Date Topic Supplemental Reading Slides Recordings

1

Jan 21

Course Introduction

slides

recording

Jan 23

OS Structure

1.5 - 1.5.1, 2.7 (skip 2.7.2)

slides

recording

2

Jan 28

Processes, Context Switching, and Scheduling

3.1 - 3.1.3

slides

recording

Jan 30

Processes, Context Switching, and Scheduling

recording

3

Feb 4

Processes, Context Switching, and Scheduling

recording

Feb 6

Interprocess Communication

3.4 - 3.4.2.3

slides

recording

4

Feb 11

Interprocess Communication

recording

Feb 13

Threads and Synchronization

4.1 - 4.2.2

slides

recording

5

Feb 18

Threads and Synchronization

5.2 - 5.4

recording

Feb 20

Memory Management

7.1 - 7.1.3, 7.3.2 - 7.3.3

slides

recording

6

Feb 25

Memory Management

recording

Feb 27

Virtual Memory

7.4 - 7.5.1

slides

recording

7

Mar 3

Midterm Review — TBD

slides

recording

Mar 5

Midterm

Spring Break

8

Mar 24

Page Replacement

8.1 - 8.3

slides

recording

Mar 26

Page Replacement

recording

9

Mar 31

File System Structure

11.1

slides

recording

Apr 2

File Systems, continued

slides

recording

10

Apr 7

File System Performance and Abstractions

recording

Apr 9

File System Performance

recording

11

Apr 14

Input / Output

12.1 - 12.2.0, 12.3.1

slides

recording

Apr 16

Input / Output

recording

12

Apr 21

Protection

slides

recording

Apr 23

Security

slides

recording

13

Apr 28

Security

recording

Apr 30

Security

recording

Grading

Grades will be weighted as follows:

37.5%

Lab assignments

30%

Final Exam

25%

Midterm Exam

7.5%

Class Participation

Paper Discussion

To prepare for paper discussions, you should bring a marked/annotated/highlighted copy of the paper to class with you. You should mark or briefly note:

  • Who are the authors, and is there any important background information about them?

  • What are the major conclusions, findings, or highlights from the paper?

  • What are two+ things that you found most interesting or liked best? What are two+ things that you’re skeptical of, didn’t care for, or found to be incomplete?

  • For older papers, what portions work same way as what we do now / discussed in class? What is different? (e.g., terminology, system structure, etc.)

  • Do you have any questions about things that were unclear?

Lab Policy

This course features regular lab assignments that account for the largest component of your course grade. Lab attendance is required by all students, unless you have already completed and submitted the lab assignment for the week. Additionally, the cs labs are open 24 hours a day, 7 days a week for you to use for CS 45 lab assignments. While you must attend the lab session for which you are registered, you may optionally attend additional lab sessions, provided space is available. In case of space constraints, students registered for the lab will have seating priority.

Lab assignments will typically be assigned during the lab sections on Friday and will generally be due by midnight on Thursday 2 weeks later. You are strongly encouraged to start early!

Even if you do not fully complete an assignment, you should submit what you have done to receive partial credit.

Accessing the CS labs after hours

You can use your ID to gain access to the computer labs at nights and on the weekends. Just wave your ID over the onecard reader next to the lab doors. When the green light goes on, just push on the door handle to get in (the door knob will not turn). If you have issues with the door locks, send an email to local-staff@cs.swarthmore.edu. If the building is locked, you can use your ID to enter the door between Martin and Cornell library. For this class, your ID will give you access to the labs in rooms SCI 238, 240, 256, and the Clothier basement.

Absence / Assignment Extension Policy

To help with cases of minor illnesses, athletic conflicts, or other short-term time limitations, we will drop your three lowest reading quizzes and participation grades. You are still responsible for the material, and you should review any missed materials via the class recordings as soon as you can.

All students start the course with two "late assignment days" to be used at your discretion, with no questions asked. To use your extra time, you must email your professor after you have completed the lab and pushed to your repository. You do not need to inform anyone ahead of time. When you use late time, you should still expect to work on the newly-released lab during the following lab section meeting. The professor will always prioritize answering questions related to the current lab assignment.

Your late days will be counted at the granularity of full days and will be tracked on a per-student (NOT per-partnership) basis. That is, if you turn in an assignment five minutes after the deadline, it counts as using one day. For partnered labs, using a late day counts towards the late days for each partner. In the rare cases in which only one partner has unused late days, that partner’s late days may be used, barring a consistent pattern of abuse.

If you feel that you need an extension on an assignment or that you are unable to attend class for two or more meetings due to a medical condition (e.g., extended illness, concussion, hospitalization) or other emergency, you must contact the dean’s office and your instructors. Faculty will coordinate with the deans to determine and provide the appropriate accommodations. Note that for illnesses, the College’s medical excuse policy, states that you must be seen and diagnosed by the Worth Health Center if you would like them to contact your class dean with corroborating medical information.

Academic Accommodations

If you believe you need accommodations for a disability or a chronic medical condition, please contact Student Disability Services (Parrish 113W, 123W) via e-mail at studentdisabilityservices@swarthmore.edu to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible. For details about the accommodations process, visit the Student Disability Services website.

You are encouraged to contact me privately to discuss your academic needs, but all official disability-related accommodations must be arranged through the Office of Student Disability Services. To receive an accommodation for a course activity you must have an official Accommodations Letter and you need to meet with me to work out the details of your accommodation at least two weeks prior to any activity requiring accommodations.

Academic Integrity

Academic honesty is required in all your work. Under no circumstances may you hand in work done with (or by) someone else under your own name. Your code should never be shared with anyone; you may not examine or use code belonging to someone else, nor may you let anyone else look at or make a copy of your code. This includes, but is not limited to, obtaining solutions from students who previously took the course or code that can be found online. You may not share solutions after the due date of the assignment or make them publicly available anywhere (e.g. public GitHub repository).

Discussing ideas and approaches to problems with others on a general level is fine (in fact, we encourage you to discuss general strategies with each other), but you should never read anyone else’s code or let anyone else read your code. All code you submit must be your own with the following permissible exceptions: code distributed in class, code found in the course text book, and code worked on with an assigned partner. In these cases, you should always include detailed comments that indicates on which parts of the assignment you received help, and what your sources were.

Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook:

"Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion."

The spirit of this policy applies to all course work, including code, homework solutions (e.g., proofs, analysis, written reports), and exams. Please contact me if you have any questions about what is permissible in this course.

Exam Integrity

Students must strictly adhere to the following policy, which applies to all exams taken in a Computer Science course at Swarthmore:

Exam takers must place all non-essential items at the front of the room (or other designated area). Unless otherwise permitted, students may not have any electronic devices or course materials in their possession during the entirety of the exam. This includes cell phones, tablets, laptops, smart watches, course notes, articles and books, among others. These items should be placed at the front of the room near the proctor. If you need to leave the room during the exam, you must obtain permission from an instructor first. Any non-permitted discussion or aide in regards to exam material will result in immediate forfeiture of the exam and a report to the College Judiciary Committee. Please discuss any concerns or accommodations with your instructor prior to starting the exam.