CS 4400 – Computer Systems   Fall 2018

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.

Schedule [subject to change]

Aug 20

   

Organization and introduction   §1

   

videos

   

slides

   

 

   

 In class: echo-quote

Aug 22

   

C; Representing numbers   §2

   

videos

   

slides

   

HW 1: match

 

   

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

Aug 23

   

 Lab session: Using gcc and gdb

   

 

Aug 27

   

x86-64 machine model   §3.1-5

   

videos

   

slides

   

 

   

 In class: operand-practicedecompile.zip

Aug 29

   

Representing control flow   §3.6

   

videos

   

slides

   

 

   

 In class: ctest.cbin.csums.zip

Aug 30

   

 Lab session: More gdb and mini-bomb

   

 

Sept 3

   

Labor day

   

   

   

Sept 5

   

Representing procedures   §3.7

   

videos

   

slides

   

HW 2: bomb

 

   

 In class: mystery.zip

Sept 6

   

 Lab session: Buffer-overflow attack   §3.10

   

 

Sept 10

   

Arrays   §3.8

   

videos

   

slides

   

 

   

 In class: matrix.zip

Sept 12

   

Structures   §3.9

   

videos

   

slides

   

 

   

 In class: struct.zipstruct_apps.zip

Sept 13

   

 Lab session: Homework help

   

 

Sept 17

   

Optimization   §5.1-8

   

videos

   

slides

   

 

   

 In class: opt.ziphash.zip

Sept 19

   

More on optimization   §5.9-15

   

videos

   

slides

   

HW 3: performance

 

   

 In class: cpe.zip

Sept 20

   

 Lab session: Optimization

   

 

Sept 24

   

Memory hierarchy, locality, caches   §6.1-7

   

videos

   

slides

   

 

   

 In class: tree.cmiss-rate.c

Sept 26

   

Midterm exam 1; practice exam

   

   

   

Sept 27

   

 No lab session

   

 

Oct 1

   

Linking   §7.1-6

   

videos

   

slides

   

 

   

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

Oct 3

   

ELF and relocation   §7.7-14

   

videos

   

slides

   

HW 4: linking

 

   

 In class: golf.cminireadelf.c

Oct 4

   

 Lab session: Reading ELF files

   

 

Oct 8

   

Fall break

   

   

   

Oct 10

   

Fall break

   

   

   

 

Oct 15

   

Processes   §8.1-8.4.2

   

videos

   

slides

   

 

   

 In class: process-ex.zip

Oct 17

   

More on processes   §8.4.3-6

   

videos

   

slides

   

 

   

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

Oct 18

   

 Lab session: Processes and pstree

   

 

Oct 22

   

File descriptors   §8.4.3-6

   

videos

   

slides

   

 

   

 In class: fd-ex.zipmd5_words.c

Oct 24

   

Signals   §8.5

   

videos

   

slides

   

HW 5: shell

 

   

 In class: signal-ex.zip

Oct 25

   

 Lab session: Capturing/sending process output/input

   

 

Oct 29

   

Virtual memory   §9.1-8

   

videos

   

slides

   

 

   

 In class: translationreverse.csecret-checkers.zip

Oct 31

   

Dynamic memory allocation   §9.9.1-12

   

videos

   

slides

   

 

   

 In class: malloc_trace.zip

Nov 1

   

 Lab session: Memory management

   

 

Nov 5

   

Midterm exam 2; practice exam

   

   

   

Nov 7

   

More on memory allocation   §9.9.13-14

   

videos

   

slides

   

HW 6: malloc

 

   

 In class: mm.c

Nov 8

   

 No lab session

   

 

Nov 12

   

Garbage collection   §9.10

   

videos

   

slides

   

 

   

 In class: gc-ex2spacemm.c

Nov 14

   

Network programming   §11.1-11.3,11.4.7

   

videos

   

slides

   

 

   

 In class: client.cserver.c

Nov 15

   

 Lab session: Heap checking

   

 

Nov 19

   

More network programming   §11.4-11.6

   

videos

   

slides

   

 

   

 In class: bounce.cbounce2.c

Nov 21

   

Concurrency   §12.1-4

   

videos

   

slides

   

HW 7: server

 

   

 In class: thread-ex.zip

Nov 22

   

 No lab session: Thanksgiving

   

 

Nov 26

   

Synchronization   §12.5-7

   

videos

   

slides

   

 

   

 In class: sync-ex.zip

Nov 28

   

The Racket virtual machine

   

notes

   

slides

   

Nov 29

   

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

   

 

Dec 3

   

Locality and caches redux

   

   

   

Dec 5

   

Final review; practice exam

   

   

   

 

Dec 12

   

Final exam, 1:00pm-3:00pm

   

   

   

Course Staff

Instructor:

 

Matthew Flatt

TAs:

 

Ashish Gupta

 

John Young

 

9:40am lab

Taylor Smith

 

10:45am lab

Monish Gupta

 

12:55pm lab

Atul Sharma

 

2:00pm lab

Contact all:

 

help-cs4400@lists.utah.edu

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.

Textbook

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.

Homework

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.

Quizzes

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.

Exams

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.

Course Grade

Final grades will be calculated as follows:

Homework

  

60%

Quizzes

  

10%

Midterm exam 1

  

10%

Midterm exam 2

  

10%

Final exam

  

10%

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

Communication

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.

When you ask a question that is not on the discussion list but sent to help-cs4400@lists.utah.edu, to individual TAs, or to the instructor:

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.

Policies and Academic Guidelines

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.

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.