Course Syllabus
Science/Computer Science
CS 149, Operating Systems, Section 3, FALL 2024
Required Texts/Readings
Textbook
There are required two textbooks for this course. Both are free!
To get hands-on experience working with OS code, we will be implementing many of the ideas that we will study in class. This will require you to write C programs.
References for learning Unix and C
Here is an excellent (introductory level) free UNIX tutorial
Here are a few references that will help you learn C programming
- An excellent tutorial on C by Christian Miller (UT-Austin)
- A free tutorial on Pointers and Arrays in C
- A standard reference for the C language is The C Programming Language book by Brian Kernighan and Dennis Ritchie.
- Bit-twiddling tricks that every systems programmer should know.
Reading
To get the most out of this class, prior to each lecture, students are encouraged to read the relevant chapter from the OSTEP book. Additionally, look at the corresponding chapter in xv6 book, which has hyperlinks that point to the related source code.
Here is the Github repo that contains the related code from OSTEP book.
Here is the Github repo that contains the HW problems from OSTEP book.
Other technology requirements / equipment / material
Programming assignments will be a significant part of this course. We will build C programs and use run them using qemu on Linux (Ubuntu 22.04). Hence, access to a computer that runs Linux (specifically, Ubuntu 22.04 distro) will be required.
Course Requirements and Assignments
I do not grade on a curve. The exams and projects measure what you are expected to have learned. There aren't many opportunities for extra credit apart from potential bonus questions on exams.
Programming Project: We will be doing individual programming assignments. Individual programming assignments are not group projects. If students get help on assignments, even to resolve a seemingly trivial problem, it must be documented in the code with the name of the person rendering the help and a brief description of the help provided. Extensive help on a project will result in a reduced grade. Failure to document help, or any other forms of cheating will result in a failing grade on the assignment at a minimum and may result in failure of the course. See Integrity for more information. Even in open source, you cannot copy code from one open source project to another without attribution.
Programming assignments will be distributed via Github. Please create a Github account (if you don't already have one). We will use Gradescope for assignment submission and grading.
Help on Labs: Thinh Bui (course grader) will have weekly in-person "lab hours" in to help you with the labs. Please seek his help whenever needed.
The University Policy S16-9, Course Syllabi (http://www.sjsu.edu/senate/docs/S16-9.pdf) requires the following language to be included in the syllabus:
“Success in this course is based on the expectation that students will spend, for each unit of credit, a minimum of 45 hours over the length of the course (normally three hours per unit per week) for instruction, preparation/studying, or course related activities, including but not limited to internships, labs, and clinical practica. Other course structures will have equivalent workload expectations as described in the syllabus.”
Final Examination or Evaluation
This course will have a cumulative final exam given during exam week. Per University schedule this is on Friday, Dec. 13 from 9:45a-12p.
There will be two in-class exams given in the semester (the last being the final exam).
Grading Information
Determination of Grades
Grades will be calculated based on the individual project grades, the two mid-semester exams, the final, discussion participation. Briefly, the weighted distribution is,
Programming Project |
40% |
Midterm 1 |
15% |
Midterm 2 |
15% |
Final |
20% |
Class Participation |
10% |
The grade distribution will be:
Percentage |
Grade |
98 and above |
A+ |
92-97 |
A |
90-91 |
A- |
88-89 |
B+ |
82-87 |
B |
80-81 |
B- |
78-79 |
C+ |
72-77 |
C |
70-71 |
C- |
68-69 |
D+ |
62-67 |
D |
60-61 |
D- |
59 and below |
F |
Classroom Protocol
This is your class. Please ask questions. Please come prepared. Do not engage in activity that may distract other students.
I do not take attendance except for the first two classes. Students not attending either of the first two classes will be dropped to make room for students on the waiting list. Attempting to get marked as present (by have someone else attend in your place or using technological deceptions) will be considered academic dishonesty and at a minimum will result in you getting dropped from the course.
Course material developed by the instructor is the intellectual property of the instructor. Students should not publicly share or upload instructor generated material for this course such as exam questions, lecture notes, hands-on exercises or homework solutions without instructor permission.
This is my first time teaching this class. The schedule listed below is tentative and may change based on student needs. Furthermore, the programming project is new and we will learn by doing :-).
Class Participation
We will have weekly short quizzes in-class that covers material from the C/Unix tutorials linked above. Additionally, I will provide worksheets that we will do in-class and you can upload them to canvas. These will complement material covered in class.
University Policies
Per University Policy S16-9, university-wide policy information relevant to all courses, such as academic integrity, accommodations, etc. will be available on Office of Graduate and Undergraduate Programs’ Syllabus Information web page at http://www.sjsu.edu/gup/syllabusinfo/” Make sure to review these policies and resources.
Programming Project
This programming project comprises of individual programming assignments. Individual programming assignments are not group projects. The programs you submit must be your work and your work alone.
Caveats:
- A requirement is that you do not publish solutions on public GitHub repos.
- The labs are known to be demanding and debugging can be time consuming. So, please get started early for each lab.
Early submission:
- Submissions that are at least 2 or more days earlier than the deadline will get a 10% bonus.
Late Submissions:
- Submissions that are up to a week late will be penalized 10% of the score.
- Submissions that are up to two weeks late will be penalized 50% of the score.
- I will not accept submissions that are more than two weeks beyond the submission date. This will be considered as a non-submission.
- At my discretion, non-submissions will likely result in a grade penalty.
Cheating/Academic Dishonesty
I take issues of Academic Dishonesty very seriously. Do not cheat. Do not share code. If we detect cheating in a programming assignment, you will get a 0 for that lab. Repeat offense will likely lead to a F grade in the course.
Artificial intelligence (AI) tools like ChatGPT, Google Gemini, and GitHub Copilot are not permitted to be used as a replacement for the writing or problem-solving components of this class. SJSU’s subscription to Turnitin has an AI-detection feature, and assignments that have been determined by that application or by other convincing evidence to have been written by AI in substantial fractions will receive an automatic zero. The incident will also be reported to the University as academic misconduct.
Course Schedule
(Tentative) Course Schedule
Week | Date | Topic/Theme | Reading(s) |
Pre-work: Learn UNIX command line tools | UNIX Tutorial | ||
Pre-read | C tutorial | ||
Part I: Processes | |||
1 | 8/22 | Introduction to OS | OSTEP: Chapter 2 |
2 | 8/27 | Process Abstraction |
|
8/29 | Process management APIs |
|
|
3 | 9/3 | Pipes, Traps, System calls | |
9/5 | Scheduling | ||
4 | 9/10 | Scheduling, Multi-level Feedback Queue | |
9/12 | Proportional share Scheduling | OSTEP: Chapter 9 | |
Part II: Memory | |||
5 | 9/17 | Intro to Virtual Memory | |
9/19 | Midterm I | ||
6 | 9/24 | Address Translation. Segmentation (intro) | OSTEP: Chapter 15 OSTEP: Chapter 16 |
9/26 | Segmentation (wrapup). Memory allocation and free space management | OSTEP: Chapter 17 | |
7 | 10/1 | Paging, Page Tables, and TLBs. | |
10/3 | Page Tables and TLBs (Wrapup). Optimization | OSTEP: Chapter 19 OSTEP: Chapter 20 |
|
8 | 10/8 | Demand Paging | |
10/10 | COW and other cool tricks | OSTEP: Chapter 23 | |
Part III: Concurrency | |||
9 | 10/15 | Intro to threads and concurrency | |
10/17 | Locks | ||
10 | 10/22 | Lock-based concurrent data structures | OSTEP: Chapter 29 |
10/24 | Condition variables | OSTEP: Chapter 30 | |
11 | 10/29 | Semaphores | OSTEP: Chapter 31 |
10/31 | Concurrency bugs | OSTEP: Chapter 32 | |
12 | 11/5 | Midterm II | |
Part IV: I/O and Filesystems | |||
11/7 | Files and directories | OSTEP: Chapter 39 | |
13 | 11/12 | Hard disks and RAID | |
11/14 |
Filesystem Implementation and Fast filesystem (FFS) |
||
14 | 11/19 | Fast filesystem (FFS) and Log structured filesystem (LFS) | |
11/21 | Crash consistency (FSCK) | OSTEP: Chapter 42 | |
15 | 11/26 | Data integrity and Protection, and RAID | |
11/28 | Thanksgiving Holiday (No Class) | ||
16 | 12/3 | Flash-based SSDs | OSTEP: Chapter 44 |
12/5 | Review, Wrap-up | ||
12/13 | Final Exam: 9:45a-12p |