CS 4400 – Computer Systems   Fall 2016

Monday and Wednesday, 1:25am-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 22

   

Organization and introduction   §1

   

videos

   

slides

   

Aug 24

   

C; Representing numbers   §2

   

videos

   

slides

   

Lab 1: match

 

   

 In class: is_neg_int.cis_neg_double.cfp-decode-practicebitset.c

Aug 25

   

 Lab session: Using gcc and gdb; hello.zip

   

 

Aug 29

   

x86-64 machine model   §3.1-5

   

videos

   

slides

   

 

   

 In class: operand-practicedecompile.zip

Aug 31

   

Representing control flow   §3.6

   

videos

   

slides

   

 

   

 In class: ctest.cbin.csums.zip

Sept 1

   

 Lab session: More gdb; lab2.zip

   

 

Sept 5

   

Labor day

   

   

   

Sept 7

   

Representing procedures   §3.7

   

videos

   

slides

   

Lab 2: bomb

 

   

 In class: mystery.zip

Sept 8

   

 Lab session: Buffer-overflow attack   §3.10; lab3.zip

   

 

Sept 12

   

Arrays   §3.8

   

videos

   

slides

   

 

   

 In class: matrix.zip

Sept 14

   

Structures   §3.9

   

videos

   

slides

   

 

   

 In class: struct.zipstruct_apps.zip

Sept 15

   

 Lab session: Pointers, arrays, and structs; 3d-array.c

   

 

Sept 19

   

Optimization   §5.1-8

   

videos

   

slides

   

 

   

 In class: hash.zip

Sept 21

   

More on optimization   §5.9-15

   

videos

   

slides

   

Lab 3: performance

 

   

 In class: cpe.zip

Sept 15

   

 Lab session: Optimization; lab5.zip

   

 

Sept 26

   

Memory hierarchy, locality, caches   §6.1-7

   

videos

   

slides

   

 

   

 In class: tree.cmiss-rate.c

Sept 28

   

Midterm exam 1; practice exam

   

   

   

Sept 29

   

 No lab session

   

 

Oct 3

   

Linking   §7.1-6

   

videos

   

slides

   

 

   

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

Oct 5

   

ELF and relocation   §7.7-14

   

videos

   

slides

   

Lab 4: linking

 

   

 In class: golf.cminireadelf.c

Oct 6

   

 Lab session: Linking and readelf; lab6.zip

   

 

Oct 10

   

Fall break

   

   

   

Oct 12

   

Fall break

   

   

   

 

Oct 17

   

Processes   §8.1-8.4.2

   

videos

   

slides

   

 

   

 In class: process-ex.zip

Oct 19

   

More on processes   §8.4.3-6

   

videos

   

slides

   

Lab 4 due Friday

 

   

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

Oct 20

   

 Lab session: Processes and pstree; lab7.zip

   

 

Oct 24

   

File descriptors   §8.4.3-6

   

videos

   

slides

   

 

   

 In class: fd-ex.zipmd5_words.c

Oct 26

   

Signals   §8.5

   

videos

   

slides

   

Lab 5: shell

 

   

 In class: signal-ex.zip

 

Oct 31

   

Virtual memory   §9.1-8

   

videos

   

slides

   

 

   

 In class: vm-problemssecret-checkers.zip

Nov 2

   

Dynamic memory allocation   §9.9.1-12

   

videos

   

slides

   

 

   

 In class: malloc_trace.zipcheck_heap.c

Nov 3

   

 Lab session: Memory management; horror.zip

   

 

Nov 7

   

More on memory allocation   §9.9.13-14

   

videos

   

slides

   

 

   

 In class: malloc_trace.zip

Nov 9

   

Midterm exam 2; practice exam

   

   

   

Lab 6: malloc

Nov 10

   

 No lab session

   

 

Nov 14

   

Garbage collection   §9.10

   

videos

   

slides

   

 

   

 In class: gc-ex2spaceavl.zip

Nov 16

   

Network programming   §11.1-11.3,11.4.7

   

videos

   

slides

   

Nov 17

   

 Lab session: Using UDP; tick.zip

   

 

Nov 21

   

More network programming   §11.4-11.6

   

videos

   

slides

   

 

   

 In class: bounce.cbounce2.c

Nov 23

   

Concurrency   §12.1-4

   

videos

   

slides

   

Lab 7: server

 

   

 In class: thread-ex.zip

Nov 24

   

 No lab session: Thanksgiving

   

 

Nov 28

   

Synchronization   §12.5-7

   

videos

   

slides

   

 

   

 In class: sync-ex.zip

Nov 30

   

The Racket virtual machine

   

notes

   

slides

   

Dec 1

   

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

   

 

Dec 5

   

Final review

   

   

   

Dec 7

   

Final exam; practice exam

   

   

   

Course Staff

Instructor:

 

Matthew Flatt

TAs:

 

Derek Johnson

 

9:40am lab

Shweta Singhal

 

10:45am lab

Shobhi Maheshwari

 

12:55pm and 2:00pm labs

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:

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. Lab assignments will be listed here and in Canvas. Quizzes will be in Canvas.

Lab Work

Because this is a 4-unit course, there is a significant amount of lab work in the form of programming assignments. (For historical reasons, the programming assignments are called “labs” – not to be confused with the “lab sessions” that are held on Thursdays, although the latter are certainly meant to support the former.)

The lab 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 lab solutions work must use an x86-64 processor that has a Unix OS. Code must be in ANSI standard C; 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.

The content of the video lectures will not be covered or summarized 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, but in smaller groups and often on topics that are even more specific, practical, and/or related to the current lab assignment.

Students are expected to participate in class by taking a turn presenting a solution to a lab assignment, by working through a problem for the class in lecture or lab, or by a similarly prominent form of participation. Class participation is a component of the course grade.

Quizzes

Most Wednesdays before class, a new quiz will be available on Canvas. This will be due the following Monday prior to class. (Some weeks will not have a quiz, due to holidays and tests.) The purpose of the quizzes is twofold: to check whether students have understood the videos and readings ahead of class, and to provide problems that are representative of those that will appear on the tests. 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 in class on the last day of class (December 7).

Course Grade

Final grades will be calculated as follows:

Lab assignments

  

60%

Class/lab participation

  

5%

Quizzes

  

5%

Midterm exam 1

  

10%

Midterm exam 2

  

10%

Final exam

  

10%

All lab assignments and quizzes will be weighted equally

Communication

For questions outside of class and consulting hours, students are encouraged to use the mailing list 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.

Working Together

Students are encouraged to discuss lab-work 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.