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 2020

Lecture MWF 13:00-13:50, Cooke 121
Lab A1-A9:    MTRFS Check HUB, Bell 340
Office Hours M 14:00-15:00, Davis 334
W 10:00-11:00, Davis 334
TA Office Hours (See Piazza)

Syllabus

The course syllabus is here.

Lectures

LectureDate
Introduction (pdf) 2020-01-27
Introduction to C (pdf) 2020-01-29
Variables, Strings, and Loops (pdf) 2020-01-31
Conditionals and Control Flow (pdf) 2020-02-03
Memory and Pointers (pdf) 2020-02-05
Memory and Pointers continued 2020-02-07
Programming Practices (pdf) 2020-02-10
Porgramming Practices continued 2020-02-12
A Tour of Computer Systems (pdf) 2020-02-14
Memory Allocation (pdf) 2020-02-17
Integers and Integer Representation (pdf) 2020-02-19
Integers and Integer Representation continued 2020-02-21
Alignment, Padding, and Packing (pdf) 2020-02-24
Alignment, Padding, and Packing continued 2020-02-26
Floating Point Numbers (pdf) 2020-02-28
Floating Point Numbers continued 2020-03-02
Bitwise Operations (pdf) 2020-03-04
Bitwise Operations continued 2020-03-06
Midterm Review (pdf) 2020-03-09
Midterm Examination 2020-03-11
Distance Learning Overview & Q&A 2020-03-13
Process Anatomy (pdf) 2020-03-23
Process Anatomy continued 2020-03-25
The Compiler and Toolchain (pdf) 2020-03-27
Compiler Optimization (pdf) 2020-04-01
Dynamic Memory Allocation (pdf) 2020-04-03
Virtual Memory (pdf) 2020-04-06
Virtual Memory continued 2020-04-08
Caching and Locality (pdf) 2020-04-10
Caching and Locality continued 2020-04-13
More on GDB 2020-04-15
Processes, Threads, and Concurrency (pdf) 2020-04-17
Processes, Threads, and Concurrency continued 2020-04-20
Races and Synchronization (pdf) 2020-04-22
Races and Synchronization continued 2020-04-24
Races and Synchronization continued 2020-04-24
POSIX Threads and Synchronization (pdf) 2020-04-27
POSIX Threads and Synchronization continued 2020-04-29
The Kernel and User Mode (pdf) 2020-05-01
Input and Output (pdf) 2020-05-04

Labs

LabWeek
Lab 01: Introduction to Git (pdf) 2020-01-27
Lab 02: Introduction to Make (pdf) 2020-02-03
Lab 03: Testing 2020-02-10
Lab Exam 1 2020-02-17
Introduction to GDB (pdf) 2020-02-24
Lab 05: Pointer Math 2020-03-02
Midterm Exam, NO LABS 2020-03-09
Lab 06: Untabify 2020-03-23
Lab 07: Bit strings 2020-03-30
Lab 08: Malloc Help 2020-04-06
Lab Exam 2 2020-04-13
Lab 09: Memory Mapping 2020-04-20
Lab 10: Implementing Mutexes with Compare-and-Swap 2020-04-27

Assignments

AssignmentDue
Programming Assignment 0: Command-Line Calculator 2020-02-07 23:59:00
Programming Assignment 1: Conway’s Game of Life 2020-02-21 23:59:00
Programming Assignment 2: Priority Queue 2020-03-06 23:59:00
Programming Assignment 3: Instant Messenger 2020-04-03 23:59:00
Programming Assignment 4: Dynamic Allocator 2020-04-24 23:59:00
Programming Assignment 5: Synchronization 2020-05-08 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

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

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 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. There are four practical lab exams, which require implementing similar solutions to those seen in programming assignments and previous labs.

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.