Monday and Wednesday, 1:25pm-2:45pm, WEB L101
Lab sessions on Thursday, MEB 3167
For general information, see the Course Description below.
For CADE lab help hours, see Course Staff below.
Organization and introduction §1
In class: echo-quote
C; Representing numbers §2
HW 1: match
Lab session: Using gcc and gdb
x86-64 machine model §3.1-5
Representing control flow §3.6
Lab session: More gdb and mini-bomb
Representing procedures §3.7
HW 2: bomb
In class: mystery.zip
Lab session: Buffer-overflow attack §3.10
In class: matrix.zip
Lab session: Homework help
More on optimization §5.9-15
HW 3: performance
In class: cpe.zip
Lab session: Optimization
Memory hierarchy, locality, caches §6.1-7
Midterm exam 1; practice exam
No lab session
ELF and relocation §7.7-14
HW 4: linking
Lab session: Reading ELF files
In class: process-ex.zip
More on processes §8.4.3-6
Lab session: Processes and pstree
File descriptors §8.4.3-6
HW 5: shell
In class: signal-ex.zip
Lab session: Capturing/sending process output/input
Virtual memory §9.1-8
Dynamic memory allocation §9.9.1-12
In class: malloc_trace.zip
Lab session: Memory management
Midterm exam 2; practice exam
More on memory allocation §9.9.13-14
HW 6: malloc
In class: mm.c
No lab session
Garbage collection §9.10
Network programming §11.1-11.3,11.4.7
Lab session: Heap checking
More network programming §11.4-11.6
HW 7: server
No lab session: Thanksgiving
The Racket virtual machine
Final review; practice exam
Final exam, 1:00pm-3:00pm
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):
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)
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:
Assignments are not accepted more than 3 days after the due date.
Assignments submitted any time X days after the due date (midnight to 11:59pm) are penalized X times 10% of the assignment grade.
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
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 during finals week: Wednesday, December 12, 1:00pm-3:00pm.
Final grades will be calculated as follows:
Midterm exam 1
Midterm exam 2
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 email@example.com.
When you ask a question that is not on the discussion list but sent to firstname.lastname@example.org, to individual TAs, or to the instructor:
Do include the full source of your program as an attachment.
Do point the instructor/TA to a particular part of the program (e.g., by line number) where you have a question or where you think there’s a problem.
Don’t send just a fragment of your code. The instructor/TA probably needs more context. Also, If you don’t understand why a fragment of code has problems, then maybe you’re looking at the wrong fragment.
Don’t include just a screenshot of the program text. Sometimes, the instructor/TA needs to try compiling your code to see what happens, and screenshots don’t compile. A screen shot is useful sometimes, but in that case, include both program text and a screen image.
Don’t copy and paste the text into your mail message, because mail transport mangles text. Provide a program as an attachment.
Do try Valgrind before asking why a program seg faults or appears to behave randomly.
Students are encouraged to discuss homework assignments and problem sets with fellow classmates, but each student is responsible for writing her own answer.
Cheating is sharing code or other electronic files either by copying, retyping, looking at, or supplying a copy of a file.
Cheating is not discussing concepts, answering questions about concepts or clarifying ambiguities, helping someone understand how to use the computer systems or basic tools (compiler, debugger, etc.), or helping with high-level design issues or general debugging.
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.
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.
For information on withdrawing from courses, appealing grades, and more, see the college’s academic guidelines.
For information on repeating a class, co-requirements, academic misconduct, and more, see the department’s policies and guidelines.
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.