CS4414: Systems Programming
Systems programming is a new course. It was introduced in the fall of 2020, and is gradually becoming one of the main options for students in the major as a primary way to learn about systems (side by side with CS3410, which teaches you about computer architecture, and optionally, with CS4410, which teaches how operating systems are implemented).
The class aims at students who are proficient in an object-oriented programming language like Java or Python, and have completed a course on data structures, but would like a deeper understanding of how "real world" computing systems are built. In CS4414 you will learn an additional programming language, C++, and will learn to use the Linux system as a way to create high quality software. This pair of technologies has gained nearly universal adoption at every level, from small devices hidden within "smart things" to the world's largest cloud computing systems. As such, the skills you gain in CS4414 are very broadly relevant, no matter what you plan to do in your career.
We expect a mix of students: some may have only taken CS2110 and be taking this as a second or third course in computing; others could be declared CS majors, ECE majors, or even MEng students seeking to broaden their programming skills. CS4414 may also be of interest to students exploring embedded device programming in robotics, digital agriculture, Internet of Things, or other settings where sensors and actuators are deployed. Because this is a new course, we are capping enrollment for the first few years, using the standard CS policies to prioritize the wait list. However, over time, we hope to increase the cap, until the class reaches the same size as other undergraduate courses.
Among our practical goals will to learn to leverage existing Linux tools, to learn how to write correct code in C++, and how to achieve performance and efficiency. Like any programming language, you really teach yourself by doing, but we will present C++ and Linux in the required section. Assigned readings and homeworks will help you build up hands-on proficiency. C++ and Linux are easy to learn if you are comfortable in some other object oriented programming language like Java, so we will move quickly (this is not a course for people who struggle with programming or who have never seen object-oriented code and learned about data structures). You'll also be reading a famous C++ self-teaching textbook, written by the inventor of the language. This will begin early in the semester, so be ready to work hard in the first few weeks!
CS4414 is really not a programming course, or a Linux course. The core intellectual material focuses on the way that modern applications are often created by combining two or more programs, which talk to one-another over some mixture of pipes, files, mapped files (shared memory), networking (messages sent over tcp), etc. We will discuss and security abstractions for isolation and authorization, and the best ways of building applications that use these technologies in correct ways. All of these are concepts you'll find valuable in your work, no matter where computing might lead you.
Modern computers are based on NUMA processors (chips with multiple CPUs in the single machine), and leveraging NUMA sometimes entails writing programs with multiple threads running in parallel while sharing memory. NUMA computers have a variety of interesting features that include hardware support for parallelism (such as for image processing, computer vision tasks, machine learning), multiple levels of hardware caching (important for performance), and can support many styles of locking and synchronization. We'll focus on monitors, an approach that is highly flexible, nicely supported in C++, and promotes correctness. Late in the semester, we will also look at some distributed systems abstractions that extend the idea of correct synchronization to cover applications spanning more than one computer, specifically state machine replication, leader election and crash-failure tolerance.
Although there is some overlap between CS4414 and other CS courses, such as CS3410 (computer architecture) and CS4410 (operating systems), most material in CS4414 isn't covered in any other existing class, and this course is not really intended as a replacement for either of those, nor do we assume you have taken either of them.
Prerequisites: CS4414 is not an introduction to programming. Everyone is expected to already know an object-oriented language such as Java, at the level of CS2110 or equivalent (object oriented programming and data structures). CS3410 would be useful, but is not required, and CS4414 can be taken side by side with that course.
We do assume that you have encountered C in the past, but we really don't assume very much experience in C programming. Students who are very nervous about their programming skills should take CS3410 first; they will learn C in that context, will get additional coding experience, and thus will enter CS4414 with a solid background (for example, they would know how to write methods in C, and how to use malloc and free, and how to write code that includes pointers, loops over arrays, etc). But CS3410 is not a prerequisite for CS4414: 4414 will teach you everything you need to know with respect to the aspect of computer architecture (NUMA machines) that is important in the CS4414 setting, and in contrast, CS3414 has very little NUMA material. The small amount of C that CS3410 students already know doesn't given them any major advantage, and students who enjoy programming and yet have never seen C can easily pick up this background by applying themselves and studying in the first few days of the class.
Use for the systems requirement: It has been proposed that CS 4144 be approved as a way to satisfy either the systems course requirement in the CS major, or the practicum (but not both -- a student would need to designate their preference). This proposal has NOT yet obtained department and CIS approval. Until it does, CS 4414 does not satisfy either requirement.