CS4400
Spring Semester 2003

General Information

Textbook

 
Computer Systems - A Programmer's Perspective - by Randall E. Bryant and David R. O'Halloran, published by Prentice-Hall.   


Reference Texts
 
The C Programming Language (second edition), by Brian W. Kernighan and Dennis M. Ritchey, published by Prentice-Hall.  Note: this is the bible for most C programmers and if you're not already fluent in C then it probably is worth having in your professional library.
 

TA Hours

All TA hours will be in the "teaching lab" MEB 3225.  The schedule will be worked out shortly.


Other Reference Material

The Linux Documentation Project or LDP has a number of free documents that are quite good if you're unfamiliar with Linux.   Feel free to check them out.  The local web site has 3 docs that are particularly useful:
Plus there are a number of reference materials that you can find at the student site for the textbook.

Confused about other stuff?  Remember Google is your friend since a big part of this course is based on personal and experimental discovery.  Spoon feeding tends to produce really crappy problem solvers, besides the experimental way is more fun.

Course Organization

This course is modeled after a very successful course developed by Randy Bryant and David O'Hallaron at CMU.  Most of the credit for the lectures, labs, and much of the course software is theirs.  I have modified things where it makes sense for our Utah environment.

The course is based on C, Unix, and the Intel IA32 (a.k.a. X86) architecture.  It's OK if you aren't currently fluent in any of these 3 topics since part of the fun will be to learn about them in more detail as the course progresses.  However there is an assumption that you have some familiarity with C or C++ -- if your programming has previously only been in Java then the transition will be a little more difficult - you should read the reference text ASAP since you'll need to learn C on your own.

You will need to write and run programs on IA32 Unix systems.  There are 24 Linux based PC's (these are IA32 Unix systems) in EMCB 210 which is often called the NT lab.  The Linux machines are in the rear of the room and have names labnix1 through labnix 16.  If you want to log into these machines remotely you'll need SSH (SecureCRT, Putty, etc.) - SecureCRT runs on all of the departments Window's and NT based machines but if you want to use your home PC you'll need to get a SSH client installed.  Putty and OpenSSH are free and SecureCRT is a commercial product but is both better and richer in features than the free verions.  Do a Google search and decide which version you'd like.  In addition there are 2 dual processor Xeon (2.4 GHz) Linux server boxes that will support many more users than the labnix machines.  They are called sinner and saint.  Sinner is up now and saint should be up by the end of the week.  To connect to any of these machines from outside the CS department you just ssh to machine_name.cs.utah.edu. 
Note - in order to do the labs properly you must use an x86 processor (either AMD or Intel processors are fine), that has a Unix OS (Linux is most likely what you'll find on x86 processors - the distribution (Red Hat, Debian, etc.) doesn't matter), and your code must be in ANSI standard C.  Nothing else will work.  It's fine to develop your code on  a Windows box that you might have at home but before you turn it in you better make sure it runs on the above mentioned machines since that's where we'll be doing the grading. Enough said. 

Grading Policy

Your grade will be based as follows:
Exams will be open book but closed notes.
Appealing Grades: must be done within 7 days of the grades being handed back.  It's also your responsibility to check the web page grades for accuracy to make sure we didn't make an accounting mistake.  Appealing accounting mistakes can happen anytime prior to the final exam.
A brief note on collaboration and cheating.  It is a sad thing that cheating seems to be an epidemic and was a significant problem in last term's version of CS3810 which is a prerequisite for this class.  You are encouraged to discuss homeworks with your fellow students - however each student is responsible for writing their own answer.  

More specifically 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 somebody understand how to use the computer systems or basic tools (compiler, debugger, etc.) or helping with high level design issues or debugging.  If for some reason you didn't attend the first class to sign the cheating policy awareness form - you will need to do so in order to stay enrolled.  Print .ps version or the .pdf version - sign it and give to Al.

Except for the final lab - each lab will be done individually.  The final lab can be done as a team of up to two people if you prefer and grading will be done via a demo to one of the TA's or Al.  Questions about the part you did are to be expected.   Each lab will be monitored by automatic cheating checkers and if they find an anomaly then the students involved will be asked individually to explain any anomalies.   Beware we also have last years codes. 

On day 1 you will be asked to sign a form which basically says that you understand that if you are caught cheating then you will fail the course  and a record of the infraction will be entered into your permanent student record.  The University has an appeal process but there will be no appeal about failing the course. It's important to know that a students permant record is the basis by which future faculty recommendations get created and these recommendations are essential in being able to get a good job.

This is a professional discipline and there is no room for dishonesty - enough said.

Grades so far by secret #


Late Policy & Exam reschedule

Late  lab hand-in's are a significant problem for both students and staff - you will lose 20% for each day you are late for the first 2 days - after that late handins will not be accepted.  Labs will be handed out on Thursday's and will be due via electronic submission at 11:59 PM on Wednesdays.  

Please make sure you arrange  your schedule to accomodate the exams.  If you need to miss a scheduled exam you will need to document a legal or medical emergency.  Makeup exams will be oral exams and history has shown them to always be significantly harder, hence there is no point to delay taking the exam because you are a little behind.

Course Schedule
This is the tentative schedule - changes are likely so keep checking.  The content is initially from last years course which was weirdly compressed due to the Olympics hence this initial content will be updated continually as the course progresses.   Updated lectures will all be prefixed with "new".

Important Tips: doing the reading before the lecture is highly advised; the pace of the course is fairly continuous - it's best to keep up since there will be little time to catch up.

Jan. 7 -  Overview
Lecture slides: 1 per page .pdf, 2up.pdf
Homework: due by midnight tomorrow - you must sign up for the cs4400 mailing list by sending the appropriate mail to majordomo@cs, and you need to send a message to ald@cs requesting your secret integer.

Jan. 9 -  Bits and Bytes
Reading: 2.1
Problems: 2.44, 2.45
Lecture slides: 1 per page .pdf, 2up.pdf
Homework: Lab1 handed out:  .pdf description, the datalab tar ball.

Jan. 14 - Integers
Reading: 2.2 - 2.3
Problems: 2.49, 2.54
Lecture slides: 1 per page .pdf, 2up.pdf

Jan. 16 - Floats
Reading: 2.4 - 2.5
Problems: 2.59, 2.60, 2.61
Lecture slides:  1 per page .pdf, 2up.pdf

Jan. 21 -  x86 Machine Model
Reading: 3.1 - 3.5
Problems: 3.31
Lecture slides:  1 per page .pdf, 2up.pdf

Jan. 23 - Control Flow
Reading: 3.6
Problems: 3.34
Homework:  HW1 due
Lecture slides:  1 per page .pdf, 2up.pdf
Homework: Lab1 due at 00:00, Lab2 - BombLab.pdf handed out
Since you'll be using gdb here's a hand reference - gdb.pdf

Jan. 28
-  Procedures

Reading: 3.7
Lecture slides: 1 per page .pdf, 2up.pdf

Jan. 30 -  Data
Reading: 3.8 - 3.11
Problems: 3.36
Lecture slides:  1 per page .pdf, 2up.pdf

Feb. 4 -  Advanced Machine Code
Reading: 3.12 - 3.16
Problems: 3.24
Lecture slides: 1 per page .pdf, 2up.pdf

Feb. 6 - Program Optimization I
Reading:  5.1 - 5.6
Lecture slides: 1 per page .pdf, 2up.pdf
Homework: Lab2 due at 00:00

Feb. 11 - Program Optimization II
Reading:  5.7 - 5.16
Problems: 5.14, 5.17, 5.18
Lecture slides: 1 per page .pdf, 2up.pdf

Feb. 13 - Memory
Reading: 6.1 - 6.4
Problems: 6.21, 6.23, 6.24
Lecture slides:   1 per page .pdf, 2up.pdf

Feb. 18 - Exam 1
Coverage: Chapters 1, 2, 3, and 5.
Open Book and Closed Notes

Feb. 20 - Go over the exam
Reading: None
Handout : gzipped tar file for the code to generate the memory mountain
from David O'Halloran and Randy Bryant.  Copy it and then unpack
using: tar xvzf your_name.whatever.
Homework: Lab4 - PerfLab handed out: lab4.pdf describes the lab, and lab4.tar
is the tarball with all the files you'll need.

Feb. 25  lecture on Cache
Reading: 6.5 - 6.8
Problems: 6.25, 6.26, 6.27
Lecture slides: 1 per page .pdf, 2up.pdf

Feb. 27 - Linking
Reading: 7
Problems: 7.8, 7.12
Lecture slides:  1 per page .pdf, 2up.pdf 

Mar. 4  -  Exception Control Flow 1
Reading: 8.1 - 8.4
Problems: 8.10, 8.11
Lecture slides: 1 per page .pdf, 2up.pdf 

Mar. 6  - Exception Control Flow 2
Reading: 8.5 - 8.8
Problems: 8.19
Lecture slides: 1 per page .pdf, 2up.pdf 
Homework: Lab4 due at 00:00, Lab5 - lab5.pdf describes the lab, lab5.tar is the tar ball
with the files you need.
NOTE: no late penalty will be charged on Lab4 handins prior to  midnight March 7 (Friday)
After that no handins will be accepted.

Mar. 11 - Time Measurement
Reading: 9
Problems: 9.10, 9.11  
Lecture slides: 1 per page .pdf, 2up.pdf 
Reference material for embedded asm: Rao, Brennan

Mar. 13 - Virtual Memory
Reading:  10.1 - 10.6
Problems: 10.11, 10.12, 10.13
Lecture slides: 1 per page .pdf, 2up.pdf
Homework:  Lab5 due at 00:00, Lab6 - MallocLab handed out
Lab6.pdf contains the write-up: READ EVERY WORD!!  Lab6.tar holds the tar ball of the
files that you will need.
 Traces.tar holds the full set of .rep trace files - feel free to use them
as well.
  Here's the version of config.h that you should use - e.g. replace the one in the tarball.

NOTE: no late penalty will be charged on Lab5 handins prior to midnight March 14 (Friday)
After that no handins will be accepted

Mar. 18 - no class SPRING BREAK

Mar 20 - no class SPRING BREAK

Mar. 25 - P6/Linux Memory Systems
Reading: 10.7 - 10.8
Problems: 10.14
Lecture slides: 1 per page .pdf, 2up.pdf

Mar. 27  - Memory Allocation 1
Reading: 10.9
Problems: 10.15, 10.16
Lecture slides: 1 per page .pdf, 2up.pdf

Exam preparation hints: do the practice problems
and the suggested problems.  A reasonable additional
study guide is last years exam2-s02.ps - solutions are not
going to be made available.

Apr. 1 - Exam 2
Reading:  Through chapter 9
Open Book and Closed Notes

Apr. 3 - Memory Allocation 2
Reading: 10.10 - 10.12
Problems: 10.18
Lecture slides:  1 per page .pdf, 2up.pdf

Apr. 8 - System Level I/O
Reading: 11
Problems: 11.7
Lecture slides:  1 per page .pdf, 2up.pdf

Apr. 10 - Network Fundamentals & Programming
Reading: 12.1 - 12.4
Lecture slides: 1 per page .pdf, 2up.pdf
Homework:  Lab6 due at 00:00, Lab7 - ProxyLab handed out
Proxylab-handout.tar contains the files  you'll need.
Proxylab.pdf contains the write-up.

Apr. 15 -  Web Programming
Reading: 12.5 - 12.8

Problems: 12.10
Lecture slides:  1 per page .pdf, 2up.pdf

Apr. 17 -  Concurrent Servers
Reading: 13.1 - 13.3
Problems: 13.22, 13.23
Lecture slides:  1 per page .pdf, 2up.pdf

April 22  -  Thread Programming
Reading: 13.4 - 13.8
Problems: 13.24
Lecture slides: 1 per page .pdf, 2up.pdf

Apr. 23 -  last day of classes - no CS4400
Homework: Lab 7 due at 11:59 p.m. 

LAB7 DEMO SCHEDULE

practice exam - last year's final
no solutions will be made available

April 30 - Final Exam, EMCB 105 3:30 - 5:30
The exam will be OPEN book and CLOSED notes.