Systems Programming

UB Catalog information for CSE 220

This information is advisory only. The authoritative course description and requirements for a given semester are defined by the course syllabus.

Overview

This course is a required course in the 2018 and later curriculum. It covers low-level systems programming in userspace at the userspace/kernel boundary. Students will learn about the C programming language, system calls, memory management, threads, and concurrency.

Offerings

Spring 2019, Fall 2019, Spring 2020, Fall 2020, Spring 2021, Fall 2021, Spring 2022, Fall 2022, Spring 2023, Fall 2023, Spring 2024

Current Offering: Spring 2021

Lecture A:    MWF 09:00-09:50, YouTube Live (see Piazza)
Lab A1-A9:    WTh Check HUB, Zoom (see Piazza)
Office Hours M 10:00-11:00, Zoom
Th 14:00-16:00, Zoom
TA Office Hours (See Piazza)

Syllabus

The course syllabus is here.

Lectures

LectureDate
Introduction to Systems Programming and C (pdf) 2021-02-01
Variables, Strings, and Loops (pdf) 2021-02-02
Conditionals and Control Flow (pdf) 2021-02-05
Memory and Pointers (pdf) 2021-02-08
Memory and Pointers continued 2021-02-10
Programming Practices (pdf) 2021-02-12
A Tour of Computer Systems (pdf) 2021-02-15
A Tour of Computer Systems continued 2021-02-17
Memory Allocation (pdf) 2021-02-19
Integers and Integer Representation (pdf) 2021-02-22
Integers and Integer Representation continued 2021-02-24
Alignment, Padding, and Packing (pdf) 2021-02-26
Alignment, Padding, and Packing continued 2021-03-01
Floating Point Numbers (pdf) 2021-03-03
Bitwise Operations (pdf) 2021-03-08
Process Anatomy (pdf) 2021-03-10
Midterm Review (pdf) 2021-03-15
Midterm Examination 2021-03-17
The Compiler and Toolchain (pdf) 2021-03-19
The Compiler and Toolchain continued 2021-03-22
Compiler Optimization (pdf) 2021-03-24
Dynamic Memory Allocation (pdf) 2021-03-29
Virtual Memory (pdf) 2021-04-02
Caching and Locality (pdf) 2021-04-07
Processes, Threads, and Concurrency (pdf) 2021-04-12
Races and Synchronization (pdf) 2021-04-19
POSIX Threads and Synchronization (pdf) 2021-04-23
The Kernel and User Mode (pdf) 2021-04-30
Final Review (pdf) 2021-05-07

Labs

LabWeek
Introduction to Git (pdf) 2020-02-01
Testing 2020-02-15
Introduction to Make 2021-02-08
Introduction to GDB (pdf) 2021-02-22

Prerequisites

Students are expected to have a solid grasp of simple data structures (such as lists and arrays) and some programming experience. (CSE 116 or equivalent experience.)

Text

There are two texts for this course:

  • Computer Systems: A Programmer’s Perspective, Third Edition, by Randal Bryant and David O’Hallaron.

  • The C Programming Lanuage, Second Edition, by Brian W. Kernighan and Dennis M. Ritchie.

Both of these books are truly excellent, and I recommend that you consider buying a copy to keep for your career.

Unfortunately CS:APP is quite expensive (more expensive than I would expect, given the number of copies that must be sold per year!). The least expensive legitimate method I am aware of for purchasing this book is RedShelf. I have not used their reader software an cannot attest to its quality. I do know that there is a Second International Edition PDF floating around the Internet that students often pirate; be warned that it has many errors and is different from the required Third Edition text. If you are purchasing a used textbook online, try to make sure you are getting the US Edition, as the International Edition has more errors.

Policies

The ultimate authority for course policies is the course syllabus. However, my general academic integrity policy can be found here and my list of policies is here

Topics

The topics to be covered in this course include:

  • The C programming language
  • Compiler and linker invocation and their roles in program development
  • Version control, build, and other systems
  • Representation of in-memory data structures
  • Memory management
  • The kernel/userspace boundary and the system call interface
  • Threads
  • Synchronization primitives and concurrency

Advice

You can find advice for succeeding in CSE 220 here. This is likely to be one of the more difficult courses you take in your career at UB, both due to the content of the course and to the position it has in the curriculum. Work hard, ask questions, and get help when you need it.

Course Structure

This course will be conducted entirely online. There is no requirement for students in this course to appear on campus for any reason. (You may be required by other courses you are taking, however!) Details are provided in the syllabus, with links to course content on the course Piazza instance. You will be added to the Piazza instance by course staff, which may take up to a day after your registration status changes. Please be patient.

The primary deliverables for this course are weekly labs and several larger projects. Labs will consist of short exercises intended to deepen student understanding of course material (and perhaps cover background material for course projects), and will be evaluated in-lab. Course projects will be C language implementations of concepts discussed in class. Projects and labs will make up about half of the final course grade, with the remainder being quizzes and exams.

There is one midterm and one (cumulative) final for this course. These written exams cover theoretical and fundamental materials beyond the specific implementation details required for the programming assignments and labs. A variety of short quizzes will cover lecture content, lab procedures, course policies, and other important material.

There are no graded homeworks for this course. Written homework assignments may be given to help students understand the material, and any material covered in homeworks may appear on exams or quizzes, but such assignments will not be directly evaluated.

Programming Assignments

All projects for this course must be implemented in C and compile and run correctly on the course-provided virtual machine image. Students will be expected to use version control and appropriate build tools (such as make) to manage their projects.

Virtual Machine

The virtual machine image can be downloaded here.

Avatar
Ethan Blanton
Assistant Professor of Teaching

Ethan Blanton is an Assistant Professor of Teaching in the Department of Computer Science and Engineering at the University of Buffalo.