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, Fall 2024

Current Offering: Fall 2019

Lecture MWF 13:00-13:50, Hochstetter 114
Lab A1-A6, A8:    MTWRFS Check HUB, Bell 340
Office Hours M 14:00-15:00
W 10:00-11:00
TA Office Hours (See Piazza)

Syllabus

The course syllabus is here.

Lectures

LectureDate
Introduction (pdf) 2019-08-26
Introduction to C (pdf) 2019-08-28
Variables, Strings, and Loops (pdf) 2019-08-30
Conditionals and Control Flow (pdf) 2019-09-04
Memory and Pointers (pdf) 2019-09-06
Programming Practices (pdf) 2019-09-09
A Tour of Computer Systems (pdf) 2019-09-11
Structs and Dynamic Allocation (pdf) 2019-09-13
Structs and Dynamic Allocation continued 2019-09-16
Integers and Integer Representation (pdf) 2019-09-18
Integers and Integer Representation 2019-09-20
Floating Point Numbers (pdf) 2019-09-23
Alignment, Padding, and Packing (pdf) 2019-09-25
Alignment, Padding, and Packing continued 2019-09-27
Bitwise Operations (pdf) 2019-09-30
Process Layout (pdf) 2019-10-02
Process Layout continued 2019-10-04
Midterm Review (pdf) 2019-10-07
Live Coding: PA2 2019-10-09
Midterm Examination 2019-10-11
The Compiler and Toolchain (pdf) 2019-10-18
Midterm Exam Walkthrough 2019-10-21
Compiler Optimization (pdf) 2019-10-23
Compiler Optimization continued 2019-10-25
Dynamic Memory Allocation (pdf) 2019-10-28
Dynamic Memory Allocation 2 (pdf) 2019-10-30
Development Strategies (ptrmath) 2019-11-01
Caching (pdf) 2019-11-04
Virtual Memory (pdf) 2019-11-06
Virtual Memory continued 2019-11-08
Processes, Threads, and Concurrency (pdf) 2019-11-11
Processes, Threads, and Concurrency continued 2019-11-13
Races and Synchronization (pdf) 2019-11-15
Races and Synchronization continued 2019-11-18
POSIX Threads and Synchronization (pdf) 2019-11-20
System I/O (pdf) 2019-11-22
System I/O continued 2019-12-02
Exceptions (pdf) 2019-12-04
Final Review (pdf) 2019-12-06

Labs

LabWeek
Introduction to Git (pdf) 2019-08-26
Lab 02: Introduction to Make (pdf) 2019-09-02
Lab Exam 1 2019-09-09
Lab 03: Testing 2019-09-16
Lab 04: Introduction to gdb (pdf) 2019-09-23
Lab Exam 2 2019-09-30
Lab 05: Pointer Math 2019-10-14
Lab 06: Untabify 2019-10-21
Lab 07: Bit Strings 2019-10-28
Lab Exam 3 2019-11-03
Lab 08: Malloc Help 2019-11-04

Assignments

AssignmentDue
AI Quiz 2019-09-06 23:59:00
PA0: Command-Line Calculator 2019-09-06 23:59:00
PA1: Conway’s Game of Life 2019-09-20 23:59:00
PA2: Priority Queue 2019-10-04 23:59:00
PA3: Instant Messenger 2019-10-25 23:59:00
PA4: Dynamic Allocator 2019-11-15 23:59:00
PA5: Synchronization 2019-12-06 23:59:00

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.

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

Course Structure

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 at least 50% of the final course grade, with the remainder being quizzes and exams.

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.