15-347/18-347 Spring '98
Notes on Assignments and Exams
In the following, the term HOME347 refers to the home directory for the course, namely
/afs/cs.cmu.edu/academic/class/15347-s98/public.
The following information is in reverse order of
assignment and exam, i.e., the most recent assignments and
exams appear first.
Final Exam
The final was held from 5:30 to 8:30 pm on Monday, May 11.
A review session will be held in Wean Hall 7500 on Sunday evening, May
10, starting at 7:00 pm.
As usual, the exam will be open book, open notes, etc. All answers
will be written on the exam sheets. You may bring calculators.
All material will be covered. Particular emphasis will be on:
- Things we've covered since Exam 2. This includes pipelining,
exceptions, superscalar processors, multimedia computing, networking,
and multiprocessing. The depth of coverage will be greater for things
you've encountered in labs and homeworks vs. things you've just heard
lectures about.
- Things that caused problems on Exams 1 and 2.
This includes things like caches, and machine-level data structures
and referencing.
- Things that combine different themes of the
course, e.g., I/O bandwidth requirements for multimedia applications.
Copies of old exams and (in some cases) their solutions are available.
These old exams have somewhat different coverage than our course, so
don't use them as your sole means of studying.
Homework 4
The final homework assignment was handed out Thursday, April 23 and is
due Thursday, April 30. The postscript version is available electronically.
Official solutions are also available.
Unlike other assignments this term, you must work on this one
individually. The problems are similar to ones that have appeared on
past exams. They should serve as useful practice for the final exam.
Clarifications & Corrections:
- The hard copy version handed out in class had some incorrect
entries for the TLB table (page 1), and the cache table (page 2).
None affected the answers to the problems. The online version has
been corrected.
-
The assignment does not explicitly state whether the cache is
virtually or physically addressed. But, there's enough information
present to determine which form is used.
Lab 3
Part I (Prologue)
Solutions for Part I are available in Postscript.
Your first part of Lab 3 will be to do a ``Prologue'' assignment
involving use of the Alpha pipeline simulator. Relevant documents are:
- Writeup for Prologue:
-
Formatted solution sheets in Postscript format.
You will fill these in by hand and turn them in.
You will be using two version of the simulator in the directory AFS740/sim. Here are some
considerations in using these programs:
- You must run these on one of the class alpha machines.
- You
must telnet from a host that supports the X11 interface.
- You
must be connected to the program directory while running the programs
- The two program examples, along with the example programs shown
in class, are available in the demos subdirectory.
-
For example, you can run the good simulator on the first program by connecting to the simulator directory and giving the command:
./solve_tk demos/pipe1.O &
Part II
The second part of Lab 3 was handed out Thursday, April 2. As of April 8, we have changed the due dates and handin procedure as follows:
- By 3pm Thursday, April 16, you should make an electronic handin of
your stages.c code using the handin procedure described in the lab
writeup. We will run our tests on your code and give you diagnostics
on how well your code does. The correctness of this initial solution
will count 10% of your overall lab grade. The more significant
incentive is that it will give you a chance to fix your code for the
final handin.
-
By 3pm Thursday, April 23, you should make the final handin, both
electronic and hardcopy. Follow the instructions in the Lab writeup.
Hand in a new electronic version even if your code is the same as your
earlier version.
An electronic version of the lab description
is available in
postscript.
Note that there is both electronic and hard-copy submissions for this lab.
Exam 2
Exam 2 was held in class on Thursday, March 19.
Solutions are available.
The exam had a total of 65 possible points. Overall, the scores were high:
average 47.9 and median 49.5.
Covered material included topics up through Lecture #16 of March
10 (not March 17 as originally posted), as well as the instruction
encoding coverage of Lecture #17 of March 12. The main coverage was
on Alpha assembly-level programming and the relationship between C
code and the machine code by a C compiler.
Some things particularly to review include:
- Alpha instructions and assembly code
- Stack frames, register usage
- Structure, union, and array allocations including alignment
constraints
- Pointer computations, array indexing, memory referencing
- Why compilers having trouble optimizing some types of code
- Encoding & decoding Alpha instructions.
The exams from 1997 have relevant problems. Some are based on MIPS
rather than Alpha, but they'll give you a general feel for typical
problems. Check out the following ones:
In addition, we've converted problem #4
from the 1997 final into Alpha code
(Postscript exam,
Text solution).
It makes an excellent practice
problem for much of the material covered in the exam.
Lab 2
The second lab was handed out Thursday, Feb. 26 and is due
Thursday, March 12. An electronic version of the lab description
is available in
postscript.
Homework 3
The third homework assignment was handed out Thursday, Feb. 19 and is
due Thursday, Jan. 26. The postscript version is available electronically.
The files you need for this assignment are in the directory
HOME347/asst/h3.
The extra credit portion of this assignment will be worth 25% of the total
weight for this assignment.
NOTE: gcc generates some floating point loads and
stores in the compiled version of swapC for the following (obscure)
reason: the Alpha 21164 can issue two memory operations simultaneously only if
one is an integer load/store and the other is a float point load/store. Hence
this is a machine-specific performance optimization. You do not need to worry
about this issue in your writeup of the assignment.
NOTE: gcc also has some problems compiling code
that uses the include file sys/time.h, such as the file
etime.c from Asst 1. Here are two workarounds:
-
Use cc instead of gcc. The generated assembly
code is a little harder to read, but it's not too bad. In fact cc
generally produces more efficient code.
-
Include the options -nostdinc -I/usr/include on the command
line for gcc. That forces gcc to use the same
include files as does cc.
Exam 1
Exam 1 was held on February 17. Official solutions are available.
Lab 1
The first lab was handed out Tuesday, Feb. 3 and is due
Thursday, Feb. 12. An electronic version of the lab description
is available in
postscript.
This lab requires use of the dinero cache simulator from Wisconsin. Compiled
versions of the code for various CPU types is available in the directory
HOME347/labs/lab1/dinero/bin.
If you don't
like any of the choices there, you can get a copy of the source code
and compile it yourself. The code is in the archive file
HOME347/labs/lab1/dinero.tar.
You'll want to use scripting languages to automate the running of the experiments and the extraction of the results. Check out the scripts
block.csh and block.pl in the directory
HOME347/scripts/.
The trace files you'll be using are in the directory
HOME347/trace-files/. You should make symbolic
links to them rather than making copies, since they are quite large.
Here is a postscript
version of the solutions.
Homework 2
The second homework assignment was handed out Thursday, Jan. 22 and is
due Thursday, Jan. 29. The postscript version is available electronically.
The files you need for this assignment are in the directory
HOME347/asst/h2.
If you know LaTeX and want to generate your solution by modifying the
assignment write-up, you can retrieve the files h2.tex and
prob.sty from the assignment directory.
Here is a postscript
version of the solutions. The C code for the arithmetic functions
is available in the file solve-numbers.c.
Homework 1
The first homework assignment was handed out Thursday, Jan. 15 and was due Thursday, Jan. 22. The postscript version is available electronically.
The files for this assignment are in the directory
HOME347/asst/h1.