CS4414: Systems Programming

Fall 2020, Tuesday and Thursday 3pm-4:30pm, with a required recitation Monday 4:10-5:25
Online lectures, hybrid recitations, streamed synchronously with recordings for asynchronous viewers.  Ken Birman
3 credits, letter grades only.  Enrollment capped at 75.  

Systems programming is a new course being introduced in the fall of 2020.  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 core in C++, and how to achieve performance and efficiency.  We will teach C++ and Linux in the required section, and will also assign readings and homeworks that 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.  You'll also be reading a famous C++ self-teaching textbook, and you'll have homework assignments intended to rapidly build up a level of comfort with this language.  This will happen early in the semester, so be ready to work hard in the first few weeks! 

The core intellectual material focuses on the way that Linux applications are often created by combining two or more programs, which talk to one-another over some mixture of Linux 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.

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. 

Course Syllabus

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. 

Getting Help

Piazza TBD
Office Hours Held online in Zoom
Office hour specifics can be found here.

Course Materials

Schedule Lecture schedule, slides, recitation notes, readings, and code
Assignments We post the assignments and quizzes on CMS.
Exams There will not be any in-person exams.
Lab Machines Instructions for using the lab machines
Resources Additional course resources

Course Information

For details See the course syllabus for details.
Lectures Tuesday and Thursday 3pm-4:30pm, with a required recitation Monday 4:10-5:25
Textbooks [1] Randal E. Bryant and David R. O'Hallaron,
Computer Systems: A Programmer's Perspective, Third Edition, Pearson, 2016
  [2] Bjarne Stroustrup,
A Tour of C++ (2nd Edition), Addison-Wesley Professional, (July 9, 2018)
  [3] Linux.  In fact we are not going to recommend a Linux book, although there are a great
many of them.  Linux has online documentation for all the commands we expect you to use, and
also for the "system calls" your code will use from C++.  Moreover, there is a built-in help feature in
the bash shell, so you can easily obtain a list of shell commands, or details on how each specific
command works and what arguments to use if you want custom behavior.  We prefer that you use
these standard ways of getting help.  Linux textbooks are fine but not really better in any sense.
Credit 3 credits
Grading In fall 2020, grading will be based on lab (homework) 75% and take-home quizzes 25%.
Labs There are 7 labs, not evenly weighted. See the assignments page for the breakdown.
Exams There are 5 take-home quizzes, which should be completed within 24 hours after you download them
Home http://www.cs.cornell.edu/courses/cs4414/2020fa
Questions Piazza, office hours, email
CMS We are using the department's CMS system for this course.


Name Ken Birman
Contact ken@cs.cornell.edu,
Office 435 Gates Hall
Office Hours TBD