CS4414: Systems Programming (Fall 2024)

Instructor:  Ken Birman.  4 credits, letter grades only, no 5xxx version offered.   Fall 2024: Tuesday and Thursday, 2:55-4:10 in G01 Uris Hall.  Recitation Friday 2:55-4:10, same room.  The ugrad TAs will run additional coding workshops each week with hands-on demos building and debugging C++/Linux applications.

Systems programming aims at students who are proficient in an object-oriented programming language like Java or Python, and who 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 aim at two groups of students.  One group will have already taken CS4410 and CS3410 and will be seeking additional perspective on the creation of large, complex, software systems.  These students would have gained extensive programming experience along the way and will be very comfortable in object-oriented programming with a language like Java.  A second group might have less formal background, but already be sure they can handle a more advanced programming class.  Such a person could enroll in CS4414 fairly early, before taking 3410, but after discovering a significant love "hard core" programming and gaining some experience programming on Linux in C or C++.  

CS4414 can be challenging for student who are not yet confident programmers with a good level of understanding of computing environments and tools, and the ability to pick things up with relatively little direct guidance.  That sort of student should first get more experience before enrolling in the course -- CS4414 is not an easy class, moves very quickly, and has a lot of hands-on programming assignments (CS4410, in contrast, actually has very little coding unless you take CS4411 at the same time).  CS4414 is absolutely not the place to develop basic programming and object oriented computing skills.  You will fall behind quickly if you lack that sort of prior background and experience.

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.  However, none of those are topics we will cover in CS4414 itself: We'll be learning a technical skill set valuable in those settings, but you would need to take follow-on courses or join project teams to take that next step of applying these skills.

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 thinks of coding as a skill and a tool, and we do teach you the subtleties of C++ programming, but we assume everyone is already a comfortable programmer (mostly in some other language).  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), ECE3400 (computer architecture and embedded systems) 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 any of those, nor do we assume you have taken any of them.   In fact, as noted above, many CS4414 students take CS3410 and CS4410 before deciding to take CS4414 -- a good sequence for a person who really enjoys systems. 

Prerequisites: CS4414 has no explicit course prerequisites, but you do need to be proficient in an object-oriented programming language such as Java or Python.   This is quite an important expectation.  If you lack experience really writing code in Java or OO Python, delay taking CS4414 until you have deeply mastered the language and can write substantial programs without much hassle or stress.  Otherwise, you will be trying to learn OO programming while everyone else is transitioning to C++, which is a very uncomfortable experience.

CS Major: CS4414 is one of the courses that can be used to satisfy the systems-area course requirement.  It does not have an associated practicum, however, so it does not satisfy the practicum requirement.

Grading: We compute a weighted curve (a ranking) based on your scores, and assign letter grades based on this ranking.  Grades generally range from B- to A, with half or more of the students receiving A or A- grades.  At the instructor's discretion a few A+ grades are also awarded, but these are not purely based on the score ranking (attendance and participation are also considered, and prelim performance is given a slightly higher weighting). 


Getting Help

Ed Discussions Link
Office Hours Held online in Zoom
FAQ Link

Course Materials

Schedule Lecture schedule, slides, recitation notes, readings, and code
Lab Machines Instructions for using the lab machines are on the CS ugrad/MEng web pages
Resources Additional course resources are listed in the right-hand column on the syllabus

Course Information

For details See the course syllabus for details.
Lectures Tuesday and Thursday 2:55-4:10, with a required recitation Friday 2:55-4:10
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.  And now that Chatbots are universal (at Cornell, we even get access to a professional version: CoPilot for Office 365), we prefer that you use these standard ways of getting help.  Linux textbooks are fine but not really better in any sense.
Credit 4 credits
Grading In fall 2024, grading will be 50% exam performance, 50% assignments.
ChatBots They aren't super useful for C++, especially when coding or debugging or performance-tuning, but can definitely help with Linux.  We do not consider it to be cheating to make use of these tools.  But check anything they recommend -- our entire course is on a topic they aren't very well "trained" on, so they are prone to hallucinations.
Homework There will be 5 or 6 homeworks, some fairly short and focused, and others more "project styled".  We post the assignments and quizzes on CMS, but you will need to use Canvas for handing in work that will be "autograded".  We don't use Canvas for anything else.
Exams We have two prelims (for details see the exams tab in the menu to the upper left).  Based on prelims and homework performance we assign  a tentative grade, releasing this during study week.  This tentative grade is guaranteed: If you skip the final, or if you already have an A or A+ grade, your tentative grade becomes the final one.

If you have an A- tentative grade or lower and think you did poorly on a prelim and could do better on the final, this is totally your call.  If you do take the final we average it with the two prelim grades, so it won't erase a poor grade and in fact, a very poor final could bring your grade down.

Please note: We never raise a grade from A to A+ based on the final.  If you already have an A or an A+, do not take the final.
Home http://www.cs.cornell.edu/courses/cs4414/2024fa
Questions Ed Discussions Web Site, office hours, email
CMS We are using the department's CMS system to track grades for this course, not Canvas.  Just the same we do have a
Canvas web site and will try to keep it up to date. 

Main Instructor

Name Ken Birman
Contact ken@cs.cornell.edu,
x5-9199
Office 435 Gates Hall
Office Hours After class T/Th (or by appointment: email Ken to find a good time)

Recitation Instructors

Name Alicia Yang

Undergraduate TAs

Name TBA