Course-Info

Official course outline. See sidebar (on right) for many details.

Getting Extra Help

Some great ways to get extra help are:

  • Lab
    Please come to the labs to gain some practical experience with the course topics. This is the best place to start your journey of writing code to apply what is covered in lecture, and to prepare for writing assignments.
  • Piazza discussion forum
    Check out classmate's questions and answers. Answer someone else's question, or ask your own. You can even post anonymously! Great for questions that everyone can check out. Also used for requesting regrading of assignments (see below). Link in sidebar.
    Note: Piazza is hosted outside of Canada; it is not mandatory to use; you can sign-up under an expendable email account; emailing Dr. Brian is always an option.
  • Discord Chat
    Connect with classmates, instructor, and TAs using Discord. Channels are setup for talking to course staff, for asking questions, and for chatting with fellow students. Great for chatting and immediate help; not as good for someone seeing/answering later.
    Note: Discord is hosted outside of Canada; it is not mandatory to use; you can sign-up under an expendable email account; emailing Dr. Brian is always an option.
  • Office Hours
    Both the instructor and TA have online office hours. Great for getting one-on-one help or discussing personal concerns. Details in sidebar (right). Also, seeing TAs in-person during lab times can be very effective. Most office hours held using Discord. If you object to using Discord, email/zoom are also options as needed.
  • Peer Tutoring Drop in to CS Peer Tutoring available online or in-person. Get help from your fellow students who have already taken the course! They can help you identify and tackle your issues in the courses. Come early to stay ahead of the curve. See your tutors' office hours on the website (scroll down to Peer Tutoring)
  • Email Less efficient than Discord, but private. Good for private questions. Please include course number email's subject line. See sidebar for emails.

About CMPT 201 - System Programming

The School of Computing Science is introducing a new course, CMPT 201 Systems Programming, that will satisfy the curriculum requirements currently met by CMPT 300 Operating Systems for both CS and SoSy students. In other words, any students who take this course will be able to use it toward satisfying CMPT 300 requirements.

By taking this course, students will learn:

  • User-level services and abstractions provided by operating systems, and
  • How to write low-level programs that utilize those services and abstractions correctly, efficiently, and reliably, using Linux.

Although this course is known to be a challenging course, it is not designed for an advanced programmer. The training that this course aims to provide is to get students out of the beginning stage and move them to an early intermediate stage. Students have to make that jump at some point in their college career. This course forces students to make that jump, so they can advance much further with upper-level courses.

Prerequisites are:

  • (CMPT 125 or CMPT 135) and MACM 101, all with a minimum grade of C-
    • This course assumes that students thoroughly understand the intro programming materials and they do not struggle with them at all. This includes, but not limited to, basic programming constructs (e.g., loops, conditionals, functions/methods/modules, etc.) as well as basic data structures (e.g., linked lists, hashing and hash tables, etc.).
  • Proficiency in C programming
    • This course uses C but does not teach C.
    • This course assumes that students thoroughly know C. This includes, but not limited to, the syntax of C, C structs, C strings and how to manipulate them, arrays and pointers, the use of malloc() and free(), etc.
    • Knowing C++ is better but not enough. C is still different from C++.
    • A very basic test is asking yourself, "Can I write a doubly-linked list in C without getting any help (with all the features, creating/appending/deleting a node and traversing the list)?"
    • The following seem to be good resources to learn C.
  • Experience in using the command-line interface on Linux
    • We do not expect students to have proficiency but some experience.

Upon completion of this course, students are expected to achieve proficiency in the following areas:

  • Interacting with, and programming in, a Linux environment using the command-line interface.
  • Utilizing programming tools such as build systems and debuggers.
  • Programming with processes and threads.
  • Understanding concurrency concepts such as semaphores, locks, critical sections, deadlocks, common concurrency patterns, etc.
  • Manipulating and managing data in memory correctly.
  • Understanding file system abstractions and programming with them.
  • Understanding communication abstractions such as IPC, sockets, and RPC and programming with them.
  • Understanding cryptographic functions and programming with them.

Use of Generative AI Tools

Large Language Models (LLMs) such as ChatGPT and Copilot are very powerful for assisting programmers. However, they also make it really easy to not learn how to code! To be a good software developer you need to know how to write the code yourself (with and without the AI tools). For this course, here are the rules:

  • You must have written the code yourself, and be able to re-create the application on an exam (or job interview)!
  • If use use an AI tool, you must mention it in your code, such as putting the following comment at the top of your file:
    // Used help from ChatGPT to find null pointer in tokenization code.
    • If you are finding that you need a lot of specific mentions on what AI is doing for you, then you are likely relying on it too much and not building your own software development and systems programming skills.
  • Incorrect use of AI tools is considered a violation of the course's academic honesty policy and will earn a grade of 0 and an academic dishonesty report being filed with the university.

Allowable uses of AI

  • Experiment with code shown in lectures.
  • Help understand concepts.
  • Help understand code and its behaviour.
  • Answer questions such as:
    1. "Explain the return values of fork()?"
    2. "In this example, what are the arguments to fork()?"
    3. "Why does this code crashes when I enter an empty string?"
      (Note: you should first use the debugger and build your skills, but the AI can help)

Forbidden uses of AI

  • Don't use it to write your lab or assignment code for you.
  • Don't ask questions like:
    1. "What is an implementation of the following assignment?"
    2. "Write a C function which reads in user input and tokenizes it into an array."
    3. "Write a C program which passes the following tests."

Coding practice (assignments) are heavily weighted to encourage everyone to solve problems and learn to code. We give grades for what you have learned, not what your AI tool can do for you.

Grading (tentative)

  • Midterm: 15%
  • Final: 15%
  • Programming assignments: 66%
    • 8 short assignments: 2% each
    • 5 long assignment: 10% each
  • In-class activities: 4%

Course Policies

Pull Request Policy

  • If you see that you have a pull request, please merge it. Pull requests contain updates to the assignments.
  • In order to do it, go to your repo's webpage, check if your Pull requests tab shows a number. If it doesn't show a number, you don't need to do anything as there is no pull requests.
  • If it does show a number, click the tab, click a pull request, scroll all the way down, and click Merge pull request (green button). If there are more than one pull request, please merge each and every one.

Grading Policy

  • All submissions should be done on GitHub Classroom and/or CourSys. Email submissions are not accepted.
  • Submissions that do not follow the instructions down to the letter receive a zero.
  • Late submissions are not accepted.
  • All members of the same group receive the same grade (if there is a group).
  • Students must attain an overall passing grade on the weighted average of exams (quizzes/midterms/final) in the course in order to obtain a clear pass (C- or better).
    • If a student earns a "pass" (50% or more usually) on the weighted average of the final and midterm, then the student gets whatever grade they have otherwise earned in the course.
    • If a student does not earn a pass on the weighted average of the midterm and final, then the student can get at most a D in the class. The grade D is a pass, but means the course cannot be used as a prerequisite for later courses.
    • This policy ensures that students are able to demonstrate they are proficient with the course content in an exam setting in order to earn a C- or better. For example, if a student does not know the course material but has relied too heavily on others for completing their assignments, they will likely have low exam scores and high assignment scores. This policy helps ensure everyone can independently demonstrate their knowledge on exams.

Late Policy

  • Assignment Late Policy
    Each and every assignments may be turned in up to 3 days late with 0% penalty (unless otherwise announced). Later than this is 100% penalty (60 minute grace period). Contact the instructor if there are extenuating circumstances. This applies to each assignment, so a student may turn in each assignment 3 days late and still receive full marks for each.
  • Extensions and Deferrals
    Email Dr. Brian with your request. You may need to complete and email SFU Academic Concession Self-Declaration Form. Doctor's notes are usually not required.

Remark Assignment Process

If a student has a concern with the marking on an assignment then, within 7 days of the grades for an assignment being released to students on CourSys, they must meet with a TA during their office hours (in person, or online) to address the marking issue.

The TA will ask the student to open the CMPT201 container and clone into a fresh directory a copy of the assignment in question. First the student will run git log to show the history of commits to ensure nothing was submitted past the due date. Then the student will run the checker in that folder, and the TA may ask the student to run certain additional steps to demonstrate the solution works.

The TA will then adjust the student's marks according, adding a comment in CourSys explaining what was changed on the marking.

If a student has concerns with the remark procedure, or how it was applied to them, they are invite to talk to the instructor.

Piazza Policy

  • In this course, Piazza is mainly for you to help each other. If you know how to answer a question, please provide your answer and help out others.
  • If no sensitive information is involved, always consider posting a question as a public question, not as a private question. It could be beneficial for other people in class.
  • Depending on the volume of questions, the teaching staff may not be able to answer all questions in a timely fashion.
  • The teaching staff monitors Piazza only during regular work days (Mon-Fri, excluding holidays) and regular work hours (9 am - 5 pm).
  • For coding questions, it is most likely necessary to examine your code carefully and perhaps run it as well. This means that most of the times, it is much better to use the office hours than Piazza.
  • For a followup discussion, always come back and mark it as resolved if the answer has been provided.

Academic Integrity Policy

  • All submitted work should be your own. For example, if you copy code from the Internet, from your peers, or from an AI tool then it is not your own work.
  • You should not allow others to copy your code either. For example, your peer should not copy your code and you should not post your code on the Internet.
  • The MOSS tool will be used to check the originality of all electronic submissions (within this class, and against previous offerings as needed).
  • SFU's Academic Honesty policy is crucial to earning credit in this course. Violations of the policy will be taken seriously and reported to the department and university.

Text books

Recommended Textbooks

The Linux Programming Interface: A Linux and UNIX System Programming Handbook, Michael Kerrisk, 2010.

  • This book is arguably the best book on systems programming using Linux.
  • If someone is looking to purchase one book on systems programming, this book is that book.
  • A lot of the course materials are based on this book.
  • This book is almost required. There are two reasons why it is almost.
    • The book covers much more than what this course covers.
    • The book is not inexpensive.
  • If there is a student struggling with the materials of this course, it is recommended to purchase this book and read along.

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

  • This is a free online book on operating systems.
  • This course teaches some of the concepts described in the book. However, the book goes much more in detail than what this course teaches, hence it is not a required book.
  • Nevertheless, the course lecture notes refer to some chapters of the book and students are expected to read those chapters.

Reference Books

Computer Systems: A Programmer's Perspective, 3rd Edition, Randal E. Bryant and David R. O'Hallaron, 2015.

Advanced Programming in the UNIX Environment, 3rd Edition, W. Stevens and Stephen Rago, 2013

Unix Network Programming, Volume 1: The Sockets Networking API, 3rd Edition, W. Stevens, Bill Fenner, and Andrew Rudoff, 2003

UNIX Network Programming, Volume 2: Interprocess Communications, 2nd Edition, W. Richard Stevens, 1998

The Art of Unix Programming, Eric Steven Raymond, 2003

C Programming Language, 2nd Edition, Dennis Ritchie and Brian Kernighan, 1988

Course-Info