CS 4400 – Computer Systems   Fall 2017

Monday and Wednesday, 1:25pm-2:45pm, WEB L101

Lab sessions on Thursday, WEB L224 CADE

For general information, see the Course Description below.

For CADE lab help hours, see Course Staff below.

Schedule [subject to change]

Aug 21


Organization and introduction   §1






Aug 23


C; Representing numbers   §2






HW 1: match



 In class: mem.cis_neg_int.cis_neg_double.cfp-decodebitset.c

Aug 24


 Lab session: Using gcc and gdb



Aug 28


x86-64 machine model   §3.1-5








 In class: decompile.zipdrawmem.zip

Aug 30


Representing control flow   §3.6








 In class: ctest.cbin.csums.zip

Aug 31


 Lab session: More gdb and mini-bomb



Sept 4


Labor day




Sept 6


Representing procedures   §3.7






HW 2: bomb



 In class: mystery.zip

Sept 7


 Lab session: Buffer-overflow attack   §3.10



Sept 11


Arrays   §3.8








 In class: matrix.zip

Sept 13


Structures   §3.9








 In class: struct.zipstruct_apps.zip

Sept 14


 Lab session



Sept 18


Optimization   §5.1-8








 In class: opt.ziphash.zip

Sept 20


More on optimization   §5.9-15






HW 3: performance



 In class: cpe.zip

Sept 21


 Lab session: Optimization



Sept 25


Memory hierarchy, locality, caches   §6.1-7








 In class: tree.cmiss-rate.c

Sept 27


Midterm exam 1; practice exam




Sept 28


 No lab session



Oct 2


Linking   §7.1-6








 In class: tree.ctree.htree-link.zip

Oct 4


ELF and relocation   §7.7-14






HW 4: linking



 In class: golf.cminireadelf.c

Oct 5


 Lab session: Reading ELF files



Oct 9


Fall break




Oct 11


Fall break





Oct 16


Processes   §8.1-8.4.2








 In class: process-ex.zip

Oct 18


More on processes   §8.4.3-6








 In class: process-2-ex.zipmake_csapp.c

Oct 19


 Lab session: Processes and pstree



Oct 23


File descriptors   §8.4.3-6








 In class: fd-ex.zipmd5_words.c

Oct 25


Signals   §8.5






HW 5: shell



 In class: signal-ex.zip

Oct 26


 Lab session: Capturing/sending process output/input



Oct 30


Virtual memory   §9.1-8








 In class: translationreverse.c

Nov 1


Dynamic memory allocation   §9.9.1-12








 In class: malloc_trace.zip

Nov 2


 Lab session: Memory management; horror.zip



Nov 6


More on memory allocation   §9.9.13-14








 In class: malloc_trace.zip

Nov 8


Midterm exam 2; practice exam




HW 6: malloc

Nov 9


 No lab session



Nov 13


Garbage collection   §9.10








 In class: gc-ex2spaceavl.zip

Nov 15


Network programming   §11.1-11.3,11.4.7








 In class: tick.zip

Nov 16


 Lab session: Heap validation; mmap.zip



Nov 20


More network programming   §11.4-11.6








 In class: bounce.cbounce2.c

Nov 22


Concurrency   §12.1-4






HW 7: server



 In class: thread-ex.zip

Nov 23


 No lab session: Thanksgiving



Nov 27


Synchronization   §12.5-7








 In class: sync-ex.zip

Nov 29


The Racket virtual machine






Nov 30


 Lab session: HTTP and the server homework; http.zip



Dec 4


Final review




Dec 6


Final exam; practice exam




Course Staff



Matthew Flatt



Guy Watson


2:00pm lab

Graham Zuber


12:55pm lab

Simon Redman


2:00pm lab

Christian Roy


9:40am lab

Qixiang Chao


To get help during CADE help hours, please use the CS 4400 Help Queue.

Help hours in the CADE lab and using the Help Queue (except during lab sessions):

Course Description

The objective of this course is to help students bridge the gap between high-level programming and actual computer systems: processors, the memory hierarchy, operating systems, compilers, linkers, assemblers, networks, and more. Our basic goal is to understand how a computer works, so that as programmers we can make it work efficiently. Thus, this course is an introduction to computer systems from a programmer’s point of view.

The official prerequisite for this course is CS 3810 (Computer Organization). It is strongly recommended that students complete CS 3505 (Software Practice II) before taking this class.


The required course text is

Computer Systems: A Programmer’s Perspective, 3rd edition

Bryant and O’Hallaron

Prentice-Hall, 2016 (ISBN: 0-13-409266- X)

A highly recommended book is

The C Programming Language, 2nd edition

Kernighan and Ritchie

Prentice-Hall, 1988 (ISBN: 978-0131103627)

Course Management Web and Canvas

Course materials and assignments will be listed on this page. Homework assignments will be listed here and in Canvas. Quizzes will be in Canvas.


Because this is a 4-unit course, there is a significant amount of homework in the form of programming assignments. Homework assignments make heavy use of C, Unix, and the x86-64 architecture. Students not currently fluent in any of these three topics should not panic, as this course will cover them in more detail throughout the semester. However, there is an assumption that students have some familiarity with C or C++. Students should be prepared to learn some of the C programming language on their own, for which the Kernighan and Ritchie reference text will be very useful.

All homework solutions work must use an x86-64 processor that has a Unix OS. Code must be in ANSI standard C; GNU extensions as supported by /usr/bin/gcc on CADE Lab 1 machines are ok, but nothing else will work. Unless explicitly noted otherwise, grading of assignments will be done using CADE Lab 1 machines. Students who choose to develop their code on any other machine are strongly encouraged to run their programs on a CADE Lab 1 machine before turning it in. There will be no credit for programs that do not compile and run on a CADE Lab 1 machine, even if they run somewhere else.

CADE Lab 1 machines are numbered 1-48 and have names lab1-x.eng.utah.edu, where x is the machine number. For more information on the CADE lab and how to remotely log into these machines, see http://www.cade.utah.edu.

Programming assignments are due by 11:59pm on the due date via electronic submission. Late programming assignments are accepted according to the following rules:

Video Lectures, Classes, and Lab Sessions

Video lectures will be posted to the schedule above some days before a class meeting on the topic. The videos will cover material similar to the corresponding sections of the textbook (to summarize the book content) and will also introduce additional material (such as walk-throughs of example programs). Students are expected to watch the relevant videos before class. From a videos page, you can access the complete list of videos—including videos for later in the course—in the left-hand column.

The content of the video lectures will not be covered in class. Instead, the instructor will proceed on the assumption that everyone has seen the material in the videos. The class meeting will provide additional explorations of the topic and will feature students working with the rest of the class to solve problems. Lab sessions will be similar to class meetings, but in smaller groups and often on topics that are even more specific, practical, and/or related to the current homework assignment.

Class participation is not a component of the course grade, but students are nevertheless expected to participate in class, usually by working through a problem with the help of the entire class.


Each set of video lectures will be accompanied by a quiz on Canvas. The quiz will be due one hour prior to the class meeting for the lecture topic. The purpose of the quizzes is to help students check they have understood the videos and readings ahead of class. Students will have three attempts to take the quiz; they are automatically graded, and the highest score of three tries will be recorded. Quizzes cannot be taken late.


Two midterm exams will take place during the semester (see tentative dates on the schedule). The final exam is cumulative and will take place in class on the last day of class (December 6).

Course Grade

Final grades will be calculated as follows:







Midterm exam 1



Midterm exam 2



Final exam



All homework assignments will be weighted equally. Each quiz is weighted by the number of questions on the quiz.


For questions outside of class and consulting hours, students are encouraged to use the discussion forum in Canvas. Whenever the question is a clarification on the assignment and not giving away the answers, feel free to post to the entire class. When in doubt, only send the question to the TAs and instructor instead of using the discussion forum; you can mail in the TAs and instructor at help-cs4400@lists.utah.edu.

Working Together

Students are encouraged to discuss homework assignments and problem sets with fellow classmates, but each student is responsible for writing her own answer.

Except when explicitly designated otherwise, each assignment is to be done individually. For all assignments, the solution submitted by each student will be checked against the solutions of other students (from this year’s class, as well as, previous years) for anomalies. If an anomaly is found that cannot be explained satisfactorily, the students involved will fail the course.

Of course, there must be no collaboration during examinations. Please see the University of Utah Student Code for a detailed description of the university policy on cheating.

Behavior in the Classroom

All students are expected to maintain professional behavior in the classroom setting, according to the University of Utah Student Code. Students should read the Code carefully and know that they are responsible for the content. According to Faculty Rules and Regulations, it is the faculty responsibility to enforce responsible classroom behaviors, beginning with verbal warnings and progressing to dismissal from class and a failing grade. Students have the right to appeal such action to the Student Behavior Committee.

Academic Guidelines

For information on withdrawing from courses, appealing grades, and more, see the college’s academic guidelines.

Students with Disabilities

The University of Utah seeks to provide equal access to its programs, services and activities for people with disabilities. If you will need accommodations in the class, reasonable prior notice needs to be given to the Center for Disability Services, 162 Union Building, 581-5020 (V/TDD). CDS will work with you and the instructor to make arrangements for accommodations.