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 2024Current Offering: Spring 2019
Lecture | MWF 13:00-13:50, Cooke 121 |
---|---|
Lab |
A1: T 10:00-12:00, Bell 340
A2: T 12:00-14:00, Bell 340 A3: M 18:00-20:00, Bell 340 A4: R 10:00-12:00, Bell 340 A5: R 12:00-14:00, Bell 340 A6: W 19:00-21:00, Bell 340 A7: F 08:00-10:00, Bell 340 A8: M 14:00-16:00, Bell 340 |
Office Hours |
M 10:00-12:00 W 15:00-16:00 |
TA Office Hours |
M 12:00-13:00, Davis Hall (Andy, Pururva) M 15:00-16:00, Davis Hall (Arody, Jake) T 09:00-10:00, Davis Hall (Peter) T 10:00-12:00, Davis Hall (Chinmayee) T 13:00-14:00, Davis Hall (Arody) T 14:00-16:00, Davis Hall (Kyle) T 13:00-15:00, Davis Hall (Bryan, Sofiya) W 12:00-13:00, Davis Hall (Andy) W 14:00-16:00, Davis Hall (Chinmayee, Sofiya, Vikram) R 10:00-11:00, Davis Hall (Peter) R 12:00-14:00, Davis Hall (Richard) R 15:00-16:00, Davis Hall (Bryan) R 17:00-18:00, Davis Hall (Chinmayee, Jake) F 11:00-13:00, Davis Hall (Pururva, Vikram) F 14:00-15:00, Davis Hall (Stephen) |
Syllabus
Lectures
Lecture | Date |
Introduction (pdf) | 2018-01-28 |
Introduction to C (pdf) | 2018-02-01 |
Variables, Strings, and Loops (pdf) | 2019-02-04 |
Variables, Strings, and Loops continued | 2019-02-06 |
Integers and Integer Representation (pdf) | 2019-02-08 |
Integers and Integer Representation continued | 2019-02-11 |
Integers and Integer Representation continued | 2019-02-13 |
Integers and Integer Representation continued | 2019-02-15 |
Conditionals and Control Flow (pdf) | 2019-02-18 |
Conditionals and Control Flow continued | 2019-02-20 |
Memory and Pointers (pdf) | 2019-02-22 |
Memory and Pointers continued | 2019-02-25 |
Memory and Pointers continued | 2019-02-27 |
Memory Allocation (pdf) | 2019-03-01 |
Memory Allocation continued | 2019-03-04 |
Aggregate Data Types (pdf) | 2019-03-06 |
Aggregate Data Types continued | 2019-03-08 |
The Compiler and Toolchain (pdf) | 2019-03-11 |
Midterm Examination | 2019-03-13 |
The Compiler and Toolchain continued | 2019-03-15 |
The Compiler and Toolchain continued | 2019-03-25 |
Pointers and Data Representation (pdf) | 2019-03-27 |
Pointers and Data Representation continued | 2019-03-29 |
Floating Point Revisited (no slides) | 2019-04-01 |
Functions and Automatic Variables (pdf) | 2019-04-03 |
Functions and Automatic Variables continued | 2019-04-05 |
Functions and Automatic Variables continued | 2019-04-08 |
The Dynamic Allocator (pdf) | 2019-04-10 |
The Dynamic Allocator continued | 2019-04-12 |
Programming Practices (pdf) | 2019-04-15 |
Programming Practices continued | 2019-04-17 |
Bitwise Operations (pdf) | 2019-04-19 |
Processes, Threads, and Concurrency (pdf) | 2019-04-22 |
Races and Synchronization (pdf) | 2019-04-24 |
Races and Synchronization continued | 2019-04-26 |
Races and Synchronization continued | 2019-04-29 |
POSIX Threads and Synchronization (pdf) | 2019-05-01 |
Guest Lecture (Arody Deleon) | 2019-05-03 |
POSIX Threads and Synchronization continued | 2019-05-06 |
Memory and Concurrency (pdf) | 2019-05-08 |
Labs
Lab | Week |
Introduction to Git (pdf) | 2019-01-28 |
Introduction to Make (pdf) (slides) | 2019-02-04 |
Lab Exam 1 | 2019-02-11 |
Introduction to GDB (pdf) | 2019-02-18 |
Testing | 2019-02-25 |
Lab Exam 2 | 2019-03-04 |
Pointer Math | 2019-03-25 |
Untabify | 2019-04-01 |
Lab Exam 3 | 2019-04-08 |
Dynamic Allocator Assistance | 2019-04-15 |
Bit Strings | 2019-04-22 |
Implementing Mutexes with Compare-and-Swap | 2019-04-29 |
Lab Exam 4 | 2019-05-06 |
Assignments
Assignment | Due |
AI Quiz | 2019-02-08 23:59:00 (extended) |
PA0: Command-Line Calculator | 2019-02-11 23:59:00 (extended) |
PA1: Conway’s Game of Life | 2019-02-22 23:59:00 |
PA2: Doubly-linked List | 2019-03-08 23:59:00 |
PA3: Instant Messenger | 2019-04-05 11:59:00 |
PA4: Dynamic Allocator | 2019-04-26 23:59:00 |
PA5: Semaphores and Producer-Consumer Queues | 2019-05-10 00:00: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.