NOTE: this website is out of date. This is the course web site from a past quarter. If you are a current student taking the course, you should visit the current class web site instead. If the current website is not yet visible by going to cs111.stanford.edu, it may be accessible by visiting this link until the new page is mounted at this address. Please be advised that courses' policies change with each new quarter and instructor, and any information on this out-of-date page may not apply to you.
Based on documents by Julie Zelenski, Cynthia Lee, Jerry Cain, John Ousterhout, and others
Last updated January 5, 2024
Instructor: Nick Troccoli (troccoli+cs111@stanford.edu for CS111 emails, troccoli@stanford.edu for non-CS111 emails).
Head TA: Isaac Gorelik (gorelik+cs111@stanford.edu)
Helper Hours on helper hours calendar
All course staff: See front page
Course Essentials
-
The class website for CS111 is located at https://cs111.stanford.edu. Please regularly check the course website as we will post important announcements there, as well as the course schedule, lecture materials, handouts, assignments, and more.
-
We will have lecture on Mondays, Wednesdays and Fridays, 1:30 - 2:20PM in Hewlett 200.
-
We will be using Canvas to store lecture recordings and access Zoom links for remote helper hours, and to record lecture grades. Access our Canvas course.
-
We will be using Poll Everywhere to record lecture participation and do in-class polls. Access Poll Everywhere with your Stanford email here.
-
The discussion forum on Ed is the place for students to ask questions and discuss course topics with peers and staff. Visit helper hours if you have more specific debugging or conceptual questions.
-
The
mythservers (accessible viassh) are our remote workspaces for completing programming assignments. Read more in our getting started guide
Course Overview
CS111 is Stanford's introductory operating systems course. The CS106 courses provide you with a solid foundation in programming methodology and abstractions, and CS107 builds up and expands your breadth and depth of programming experience and techniques, working from the C programming language down to the microprocessor to de-mystify the machine. CS111 leverages this programming experience to introduce operating systems and how they work. With an understanding of both how to leverage operating system functionality in your own programs as well as how operating systems manage tasks behind the scenes, you will have a better understanding of how operating systems work, the kinds of design challenges present in operating systems and other large systems, and key computing ideas such as virtualization that are applicable in many different areas. Topics covered include: filesystems, system calls, concurrency, multiprocessing, multithreading, race conditions, synchronization primitives, virtual memory, demand paging and operating system design challenges.
CS111ACE
CS111ACE, also called CS111A, Pathfinders (or ACE), is a supplementary instruction program that meets for a weekly section and holds Pathfinders-specific review sessions. CS111ACE is application-only; CS111ACE is done in addition to all the normal requirements for CS111. You will receive an extra unit of course credit for the work you do in this program. Enrollment in CS111ACE is by application, and you can find more information at this link: click here. Once enrollment decisions are made, students who are accepted will then be given a permission number to enroll in CS111ACE on Axess. If you have questions about CS111ACE, please email the ACE CA (contact information listed on the course homepage).
Prerequisites
The prerequisite for CS111 is CS107 (or equivalent). You should have practical C/C++ skills and be able to write programs with complex use of memory and pointers and dynamic memory allocation (malloc/realloc/free/new/delete). You should understand C++ classes, methods, and be able to work with appropriate data structures (arrays, maps, etc.) and standard algorithms (searching, sorting, hashing). (There are C++ features you're not expected to know, but you should be comfortable picking those features up and consulting references as needed). You should be familiar with programming in a Unix/Linux environment using tools such as make, gcc/g++, valgrind, gdb, etc. and have a working understanding of the basics of computer architecture (x86-64 as it’s taught in CS107, or exposure to some other architecture and the ability to pick up x86-64 as we reference it). Come talk with us if you need help determining the right placement for you.
Units
If you are a matriculated Stanford graduate student, you may enroll in CS111 for 3-5 units based on your schedule. Otherwise, you are required to enroll in CS111 for 5 units. In particular, anyone enrolled as a Stanford undergraduate must register for the full 5 units, or you will not be assigned a grade in the course. Taking the course for reduced units does not alter the course requirements.
Guiding Principles
We have designed the course to the best of our ability to provide flexibility. There are campus resources, such as accommodations, undergraduate advising directors, well-being coaches, counselors, academic coaches, Hume Center writing tutors, and the FLI opportunity fund for broader needs you might have. For information about specific policies and procedures for the quarter, Student Affairs has the most up-to-date information for students. If there are additional ways we can support you in the course, please feel encouraged to reach out to us. Without requesting or expecting details of your situation, we will do everything we can to ensure your course learning is productive and enjoyable.
Course Accommodations
If you are ever sick, in COVID-19 isolation, encounter an emergency, or other exceptional circumstance, we have a variety of accommodation mechanisms for each course component, and we encourage you to reach out to let us know how we can help! The accommodation mechanisms include:
- late days on assignments (see assignment late policy)
- attending a makeup section or getting an excused section absence (see sections)
- lecture pre-excused misses (see lectures)
- accommodations for exams due to illness, COVID-19 isolation, or other emergency (see exams)
- students who are ill, in COVID-19 isolation, have an emergency, or other exceptional circumstances may temporarily attend all helper hours remotely with course staff permission (see Getting Help)
If you feel ill or are sick, for the wellbeing of yourself and others please stay home, take care of yourself, take advantage of these accommodations, and reach out to us - we never want you to feel that you must attend class if you are not feeling well! Similarly, if you have an emergency or exceptional circumstance, please take advantage of these accommodations and reach out to us so that we can help.
Course Environment
In CS111, there will be significant programming assignments and you can expect to work hard and be challenged by this course. Your effort can really pay off - once you understand operating systems and how to maximally take advantage of the hardware and operating system software available to you, you will have powerful skills to bring to any future project! To make that happen for everyone, we strive to create an inclusive and equitable class. We further depend on you to help each other obtain excellence rather than mistaking Stanford or this class as zero-sum. We ask that you do your part by seeking to promote the success of others, and by treating each other in ways that respect and celebrate the diversity of talent that is drawn to our exciting field of Computer Science. Here are several aspects of our policy for creating an inclusive and equitable class:
-
Preparation: Perhaps more than many other subjects, students come to computer science with greatly varying previous exposure to the subject. Regardless of your background, as long as you meet the course prerequisites, you are well-prepared to succeed in CS111. Just ask the students who are now your TAs!
-
Classroom Environment: We are happy to answer questions you have through various course support channels (helper hours, discussion forum, etc.). However, during lectures, we request that any questions you ask be clarifications for yourself or others of the course material being discussed, rather than a question or comment intended to demonstrate additional knowledge beyond the scope of the current topic or the course, which may intimidate or discourage other students. If you do have such questions or comments, we are more than happy to discuss them during helper hours, or before/after any lecture!
-
Access and Accommodations: Stanford is committed to providing equal educational opportunities for disabled students. Disabled students are a valued and essential part of the Stanford community. We welcome you to our class. If you experience disability, please register with the Office of Accessible Education (OAE). Professional staff will evaluate your needs, support appropriate and reasonable accommodations, and prepare an Academic Accommodation Letter for faculty. To get started, or to re-initiate services, please visit oae.stanford.edu. If you already have an Academic Accommodation Letter, we invite you to share your letter with us. Academic Accommodation Letters should be shared at the earliest possible opportunity so we may partner with you and OAE to identify any barriers to access and inclusion that might be encountered in your experience of this course.
-
Name and Pronouns: We want you to be you in our class. You are always welcome to put your preferred name on all classwork and exams. If you have a name and/or pronoun that doesn’t match our registrar-provided class roster, please let us know and we will ensure that we use it in our class.
-
Course Expenses: If obtaining any material or resource for use in our class presents a financial hardship for you, please let us know and we will work with you to accommodate.
-
Feedback: Please do not hesitate to reach out to the course staff or the instructor, anonymously if you prefer (there is an anonymous feedback link on the main page of the course website), if any aspect of our course or community can be improved.
Course Structure
Course Grades
Final grades for the course will be determined using the following weights:
- 55% Assignments
- 5% Section Participation
- 5% Lecture Points
- 15% Midterm Exam
- 20% Final Exam
Final course grades will be calculated by determining the raw overall score, and then breaking the score distribution into different letter grades. We do not decide these letter grade cutoff points until the end of the quarter, based on the course distribution - for that reason, we cannot guarantee in advance that a particular raw overall score will translate to a particular letter grade. However, we will guarantee that the cutoff for a C- grade will be at most a 70% (in other words, if your raw score is at least a 70%, you will get at least a C-, and the cutoff may be lower than 70%).
If you choose to take the course CR/NC, your final grade must be satisfactory or better--in other words, you need a C- or better to get a CR.
Lecture
Lectures are held in person on Mondays, Wednesdays and Fridays. The best way to take advantage of all that lecture has to offer is to attend live in person; you can ask questions, participate in activities, and guide our focus in lecture based on your questions.
Because CS111 is on SCPD (for professional development students) this quarter, the course lectures are recorded for later viewing. (You can find a full list of when courses are offered on SCPD here).
Lecture will be a small part of the course grade, to incentivize you to stay up to date with the material for both starting early on assignments and having all the material you need for each week's section activities. There are two ways to get credit for a lecture:
- you get a score of 100% for a lecture if you attend a lecture in person and submit responses for all the PollEverywhere questions during that lecture. Poll responses are graded only on completion, not correctness. This is the easiest way to get credit; come to lecture, ask any questions you have, complete the polls while you're there, and you're all set! (Note: lecture polls can only be completed in person during lecture - they cannot be completed later or when watching lecture online).
- an alternative way to get lecture credit is to watch the video recording for the lecture and complete the corresponding Canvas check-in quiz by 30 minutes prior to the start of the next lecture. For example, the quiz for a Wednesday lecture would be due by 1PM PDT that Friday. Each quiz should take about 10-15 minutes, and is intended to verify that you have watched and followed along with the lecture. Unlike the in-class poll questions, they are graded for correctness, but permit up to 3 total submissions per quiz if you get any answers incorrect. Your score for that lecture is your quiz score percentage.
Each quiz / lecture is worth the same amount of points. We will also drop the two lowest scores, which is intended to cover for lectures where you are both unable to attend in person and also unable to complete the quiz by the next lecture. (Late days are applicable for assignments only, and do not apply for lecture quizzes). Beyond this, only the Head TA can grant accommodations for lecture credit.
Sections
In addition to lecture, you must also sign up for a weekly 50-minute in-person section led by one of our CAs. Each section will have about 10-13 students, and in section, students work together and in small groups on guided exercises. Sections encourage participatory collaborative learning - the goal is for everyone to come away with a clear understanding of the section concepts and be prepared to go on to individually complete the assignments.
Part of your course grade comes from arriving on time, attending, participating in and completing the work in your section each week. At the end of the section, you will submit a checkoff sheet to record your section participation / attendance grade. Arriving late or leaving early will result in not receiving section credit.
You must submit your section time preferences using a link posted on the main course webpage starting on Tue Jan 9 5:00 pm PDT. Note that signups are not first-come, first-serve; you may submit your preferences any time up to Sun Jan 14 7:30 pm PDT. You may also come back and update your preferences until this time as well. Our typical weekly schedule offers sections Wed, Thurs and Friday at various times throughout the day. Sections begin the second week of classes. Note that you must sign up for sections via the course website (you do not sign up for sections on Axess).
If you cannot make your section during a given week, you may attend a section other than your assigned one as a "visitor" up to 2 times during the quarter. Visitors are accommodated when space is available, but priority is given to the assigned students. You must email both your section TA and the section TA whose section you would like to attend that week to confirm that there is space. Otherwise, there may not be space available. We ask that you please attend your assigned section unless extenuating circumstances (illness, COVID-19 isolation, emergency, etc.) prevent you from attending. Students find that they learn best with a regular timeslot, the same section TA, and a recurring section group, and too many visitors to a single section may mean we will be unable to accommodate all visitors. If you need to attend more than 2 makeup sections during the quarter, please email the Head TA.
If you have an extenuating circumstance (illness, COVID-19 isolation, emergency, etc.) and cannot make any sections during a given week, please email the Head TA for accommodations. Otherwise, if you do have to miss attending the section entirely, we strongly encourage you to work through the exercises for your own benefit, but there is no makeup credit for missed participation.
Assignments
There will be seven assignments throughout the quarter, all of which are to be done individually. Assignments are due at 11:59pm PT sharp on the dates specified and are written and submitted electronically using the myth cluster of Unix workstations in the Gates Computer Science Building. These machines are accessible remotely from other machines such as your personal computer, and they are pre-installed with all software used for sections and assignments. Students edit, compile, and debug on the myth systems using a suite of open source development tools including gcc/g++, make, gdb, and valgrind.
Assignments may consist of written portions and coding portions, and are graded and returned to you electronically via the course website. The course staff grades each programming portion on functionality (is the program’s behavior correct from an external perspective?) and style ("code review" - is the code clean, well-written and elegant?). Functionality is measured by how successfully the program executes on a comprehensive set of test cases. We create our test suite by working from the original program specification to identify a list of expected behaviors and write a test case for each. We use the autotester to run a submission on each test and award points for each successful result. Thus, the resulting functionality score is a direct reflection of how much observably correct behavior your program exhibited. This process is completely automated; the grader does not search your code to find bugs and deduct for them, nor do they appraise the code and award points for tasks that are attempted or close to correct. There may also be some limited points awarded manually by TAs for other functionality aspects not covered in the automated test cases.
All assignments are weighted equally, with the exception of assignments 0 and 2, which are together weighted as "one assignment" (as they are shorter than the other assignments). For each assignment, functionality is weighted 85% of the overall score, and style is weighted 15% of the overall score.
Style is measured via several quality metrics (such as building cleanly, cleanly running under Valgrind, etc.) as well as a code review by the course staff. The style guide outlines further guidelines. Your style score is mapped to the following scale; from past experience, most grades will be around minor-issues:
greatAn outstanding job; reflects code that is notably clean, elegant and readable, with no issues present.minor-issuesA good job; reflects code that demonstrates solid effort and is fairly successful at meeting expectations, but also has opportunities for improvement.major-issueHas more problems, but shows some effort and understanding. There was either a large concern, or several smaller concerns, in the submission.multiple-major-issuesHas significant issues, either several large issues or a multitude of smaller ones, that together constitute very poor style work.0No work submitted, or barely any changes from the starter assignment.
Using these categories means that the course staff can focus on the assignment’s learning goals rather than spending time justifying each point. Our goal is to maximize the learning experience in doing the assignments, and we have found the "bucket" grading system to work much better for style feedback than assigning numeric grades from a pedagogical perspective over many quarters of experience.
Disputes about homework grading must be submitted to the course staff within 1 week of receiving your grade. For more information about the assignment grading process, please see our page on how assignments are graded.
Assignment Late Policy
Every student begins the quarter with five free "late days," to be used only for assignments. Each late day allows you to submit an assignment up to one calendar day late without penalty. For example, if a due date is Wednesday at 11:59PM PT, using 1 late day allows you to submit until that Thursday at 11:59PM PT without penalty, and 2 late days allows you to submit until that Friday at 11:59PM PT without penalty. Late days may only be used in 24-hour increments. We will not accept assignments more than 2 days late and no late days may be used for the first or last assignments.
After the late days are exhausted, submissions that come in late will be assessed a late penalty per day late. Specifically, if you submit up to 1 day late, your score will be capped at 80% of possible points. This means that if you have a score above 80%, then your score will be lowered to 80%. If you have a score at or below 80%, your score will remain the same. Similarly, if you submit between 1 and 2 days late, your score will be capped at 60% of possible points.
You should think of free late days as extensions you have been granted ahead of time and use them when you might have otherwise tried to ask for an extension. Beyond these 5 late days, we will grant additional extensions only in cases where exceptional circumstances necessitate more than a 2-day extension, or when you have used your 5 late days and further extenuating circumstances necessitate additional accommodations. As a result, getting an extension for exceptional circumstances beyond the provided free late days must be approved by the Head TA. Only the Head TA will be able to approve extensions. In particular, do not ask your section TA. All extension requests must be received in advance of the assignment on-time deadline, or as soon as possible if extenuating circumstances occur later, or extenuating circumstances prevent reaching out prior to the deadline. Please do not hesitate to reach out to the course staff or the instructor if any personal circumstances or issues arise!
Examinations
The midterm examination is in-person and will be administered outside of class on Thurs. 2/15 7-9PM. If you have an academic or University conflict with this time, and absolutely cannot make the regularly scheduled midterm, you must send a request by email to the Head TA by 11:59PM on Friday, January 26 to arrange an alternate exam time. Please include in your email all the possible times you are able to take the exam from Wed 2/14 to Fri 2/16. Any alternate midterm exam must be within this window.
The final examination is in-person and scheduled for Wednesday, March 20th from 3:30-6:30PM PDT. There will be no alternate time for the final exam, except for those with relevant official university athletics or Office of Accessible Education accommodations. Please make sure that you can attend the final exam at the specified time before enrolling in the class.
If you become ill, must enter COVID-19 isolation, or have another emergency around the time of or during an exam, please contact the instructor as soon as possible for accommodations.
The Honor Code
Academic conduct for students at Stanford is governed by the Honor Code. Part of the Honor Code is a pledge and expectation to participate in class without seeking inappropriate help on graded work such as assignments and exams. Please read the separate Honor Code page; you are responsible for knowing all of the details at this link, and for following the Honor Code in this course. Violations of the Honor Code are taken very seriously; we reserve the right to use software tools to compare your submissions against those of all other current and past students, and will refer all suspected violations to the Office of Community Standards (OCS). Any cases determined by the OCS process to be Honor Code violations will result in zero credit for the work of concern plus a course grade penalty of at least a one grade bucket decrease (e.g. B to B-) up to failing the course, depending on the circumstances.
Artificial Intelligence (AI) tools: While artificial intelligence (AI) tools can be valuable in certain contexts, in this course it is important that students develop their own skills and abilities to write, debug and think critically, without the use of this technology. For the assignments in this course, it will be the effort and process (not just the product) that is most valuable to your learning, and while useful, AI tools can inhibit the gains from working through this process. For that reason, you should only use AI tools in the same way that you would ask a friend in the class for help – high level questions, citations where needed, etc. Please see our Honor Code page for more information.
Course Resources
Technology
You will need to have access to a computer such as a Windows, Mac or Linux computer with an internet connection to complete assignments. If you don't have access to such a device, you can check out computers at the Lathrop Learning Hub or use on-campus library cluster computers. Read more about getting set up for assignment in our getting started guide.
Textbook
There is no required textbook for CS111: the material of the course is defined by the lectures and does not exactly correspond to any existing book. However, we recommend the following book if you would like an additional source of material to supplement lectures:
Operating Systems: Principles and Practice (2nd Edition), by Thomas Anderson and Michael Dahlin.
Each lecture lists related readings in this book on the first slide, where applicable. Most students find that the material from lecture is sufficient for their course needs, so we recommend that you start the course without the book and only purchase the book if you decide you would like additional material and explanations beyond what is in lecture.
Getting Help
We want to enable everyone to succeed in this course and offer several help resources. Read more about getting help in CS111.
-
Discussion Forum: The online discussion forum lets you search, ask and answer questions posted by fellow classmates. The course staff will also monitor and periodically respond to posts. The discussion forum is best for course policy questions, general course topic questions, general assignment questions or small debugging questions. It should not be used for larger or more detailed questions about your assignment code.
-
Helper Hours: Helper hours are offered throughout the week, and are where you can sign up in a queue and get help from the course staff. Helper hours are best for course topic questions, general assignment questions, or in depth questions about your code. We will offer both remote and in-person helper hours; students who are ill, in COVID-19 isolation, have an emergency, or other exceptional circumstances may temporarily attend all helper hours remotely; please contact the Head TA.
-
Head TA Email: For private matters such as grade questions or accommodations, please feel free to email the Head TA directly or stop by their helper hours to talk privately.
-
Instructor Email / Helper Hours: For other private matters, please feel free to email the instructor directly or stop by their helper hours to talk privately.
-
The course website houses various useful documents, such as how-to guides for the tools, and advice pages. Please take advantage of these resources!
Other Information
Retraction Policy
You may contact the instructor at any time prior to the start of the final exam to retract all or part of previously-submitted assignment work, no questions asked. We will record a 0 as the grade for the work in question and act as though it was not submitted.
COVID-19 Precautions
Stanford University is no longer mandating the use of masks indoors in most circumstances. However, masking indoors continues to be strongly encouraged. We strongly recommend wearing a mask in lecture, during section, during helper hours, and during exams. Some of us might feel more comfortable wearing masks or sicla distancing even when it is not required. All of our preferences are reasonable, and it is important that we treat each others’ preferences with respect and care. You can find the most current policies on campus masking requirements on the COVID-19 Health Alerts, and policies on student testing here.
Stanford Focus Listening System
Stanford Focus Listening System is available in our classroom! First, install the Mobile Connect app, available in the Apple App Store or Google Play. Then scan the posted QR code at the front of the classroom to access the direct audio feed with your headphones or hearing aids (connected to a phone). Additional information can be found at the Stanford Focus Listening System instructions.
Planning for the Unexpected
While this course has been designed as a primarily in-person course, we may need to pivot to a fully online course in the event of a campus closure. If that happens, we will notify you of this change via email and the course website. Our lectures will then move to a fully online format, along with helper hours and sections. Exams will be administered online. We will do our best to support you through the transition to online learning. For additional information and updates, check out the Start Safe Stay Safe Website: http://www.umsl.edu/staysafe/. Please be sure to sign up for emergency notifications from the University: https://safety.umsl.edu/police/notification/index.html.
Affordability of Course Materials
All students should retain receipts for books and other course-related expenses, as these may be qualified educational expenses for tax purposes. If you are an undergraduate receiving financial aid, you may be eligible for additional financial aid for required books and course materials if these expenses exceed the aid amount in your award letter. For more information, review your award letter or visit the Student Budget website. (https://financialaid.stanford.edu/undergrad/budget/index.html)
Lecture Video Notice
Video cameras located in the back of the room will capture the instructor presentations in this course. For your convenience, you can access these recordings by logging into the course Canvas site. These recordings might be reused in other Stanford courses, viewed by other Stanford students, faculty, or staff, or used for other education and research purposes. Note that while the cameras are positioned with the intention of recording only the instructor, occasionally a part of your image or voice might be incidentally captured. If you have questions, please contact a member of the teaching team.