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

Current Offering: Fall 2021

Lecture A:    MWF 12:40-13:30, Cooke 121;
B:    MWF 15:00-15:50, Knox 110
Lab A1-A8, B1-B5, B7-B9:    Check HUB
Office Hours Mo 10:00-11:00, Davis 334
Th 13:00-15:00, Zoom
TA Office Hours (See Piazza)

Syllabus

The course syllabus is here.

Lectures

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

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 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 in-person, pending contradictory guidance from SUNY or the University at Buffalo. Students are expected to attend lectures and office hours unless they have a University-approved reason to miss. Students must not attend if they are unwell or have reason to believe that they may have contracted COVID-19, with or without noticeable symptoms.

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 a Teaching Assistant Professor in the Department of Computer Science and Engineering at the University of Buffalo.