COMP 40 Schedule
Note: This schedule is subject to change without notice at any
time.
Expect it to change approximately weekly throughout the semester.
For pointers to lecture notes, and for more information about what's
going on, consult the syllabus.
- Wednesday, 9/9
- From C++ to C to the machine
Read:
- Friday, 9/11
- Lab: getting started with C and interfaces
- Monday, 9/14
- Designing with interfaces and implementations
Design for intro: Introduction: Old wine in new bottles (also in PDF) due at 11:59 PM.
- Wednesday, 9/16
- Analysis of the Table interface, continued
Read: Jim Waldo, On System Design (cultural enrichment)
- Thursday, 9/17
- Not a class day, but Assignment for intro: Introduction: Old wine in new bottles (also in PDF) due at 11:59 PM.
- Friday, 9/18
- Lab: Points, Lines, and Planes
- Monday, 9/21
- Entering the world of design
- Wednesday, 9/23
- Anatomy of an abstraction: Arrays
Read: Dave Parnas and Paul Clements, A Rational Design Process: How and Why to Fake It (cultural enrichment)
- Thursday, 9/24
- Not a class day, but Design for iii: Interfaces, implementations, and images (also in PDF) due at 11:59 PM.
- Friday, 9/25
- Lab: problem-solving and removing black edges
- Monday, 9/28
- Contracts, invariants, and implementation: Hanson's Arrays, continued
- Wednesday, 9/30
- Compilation, address space, memory layout
Assignment for iii: Interfaces, implementations, and images (also in PDF) due at 11:59 PM.
Read:
- Bryant and O'Hallaron: Chapter 1 (skim)
- Bryant and O'Hallaron, Section 1.7 (read)
- Bryant and O'Hallaron, Sections 6.2 to 6.5
- Friday, 10/2
- Lab?
- Monday, 10/5
- Memory is too slow---what to do about it?
- Wednesday, 10/7
- Analyzing caches: associativity, locality, kinds of cache misses
- Thursday, 10/8
- Not a class day, but Design for locality: Machine storage and locality (also in PDF) due at 11:59 PM.
- Friday, 10/9
- Lab: Striding through memory
- Monday, 10/12
- Columbus Day. No class.
- Tuesday, 10/13
- Compiling review, homework questions, cache review
Assignment for locality: Machine storage and locality (also in PDF) due at 11:59 PM.
- Wednesday, 10/14
- Cache misses, alignment; C types and memory layout
- Friday, 10/16
- Lab: testing image compression (cancelled, power failure)
Read: Bryant and O'Hallaron, Sections 2.1–2.4
- Monday, 10/19
- Arithmetic: positional notation, approximating real numbers
- Wednesday, 10/21
- Binary representation of integers and its arithmetic
Design for arith: Data! Bits, bytes, words, and arithmetic (also in PDF) due at 11:59 PM.
- Friday, 10/23
- Lab: algebraic laws of the Bitpack interface
- Sunday, 10/25
- Not a class day, but Assignment for arith: Data! Bits, bytes, words, and arithmetic (also in PDF) due at 11:59 PM.
- Monday, 10/26
- Analysis of the III homework; exam review
- Wednesday, 10/28
- Midterm exam in class: Interfaces and implementations; caches and locality; machine arithmetic.The midterm will focus on material from the first three assignments and on material from in-class exercises. I will also expect you to have some grasp of floating-point arithmetic.You will be expected to read and write C code, although if you can't remember some syntax, you can make it up and explain its meaning.
- Friday, 10/30
- Lab cancelled. No class.
- Monday, 11/2
- Data Display Debugger; Introduction to AMD64 assembly: registers, AMD64 parameters and results
Read:
- Bryant and O'Hallaron, new material in Sections 3.1–3.7 (but be aware this material uses the wrong machine for examples)
- Bryant and O'Hallaron AMD64 supplement
- Bryant and O'Hallaron, material for review in Sections 3.8–3.11
- Wednesday, 11/4
- compare and test instructions; condition codes; translating control flow (if plus boolean short-circuit)
- Friday, 11/6
- Lab: from C to assembler
- Monday, 11/9
- translating switch statements; Forrest Baskett's translatino of while loops; AMD64 calling convention; Volatile versus nonvolatile state; genesis of the call stack from procedure-call semantics;
- Tuesday, 11/10
- Not a class day, but Assignment for code: From C code to machine instructions (also in PDF) due at 11:59 PM.
- Wednesday, 11/11
- Procedure-call wrap-up; Virtual machines
- Friday, 11/13
- Lab: Unit testing for Universal Machines
- Monday, 11/16
- Lessons learned from 'arith' homework; design of a Universal Machine
- Tuesday, 11/17
- Not a class day, but Design for um: Machine code: Virtual Machines (also in PDF) due at 11:59 PM.
- Wednesday, 11/18
- Documentation and Implementation of the Universal Machine
- Thursday, 11/19
- Not a class day, but Assignment for um: Machine code: Virtual Machines (also in PDF) due at 11:59 PM.
- Friday, 11/20
- Lab: profiling
Read:
- Bryant and O'Hallaron, sections of Chapter 5 (for details, see homework)
- Documentation for valgrind and kcachegrind (for reference)
- Monday, 11/23
- The 80/20 rule; Seven performance killers; Simple code-improvement tricks
- Wednesday, 11/25
- Thanksgiving. No class.
- Friday, 11/27
- Thanksgiving. No class.
- Monday, 11/30
- More profiles; fast, safe, abstract: pick any two; preserving abstraction with static inline functions; scrutiny of assembly code; putting the burden of safety on the programmer
- Wednesday, 12/2
- Relocation; load-and-go assembly; a UM macro assembler
Read:
- Thursday, 12/3
- Not a class day, but Assignment for profile: Code IV: Profiling and Code Tuning (also in PDF) due at 11:59 PM.
- Friday, 12/4
- Lab
- Monday, 12/7
- The UM macro assembler, continued
- Wednesday, 12/9
- UM assembly-language programs
- Thursday, 12/10
- Not a class day, but Assignment for asm: From assembly code to machine code due at 11:59 PM.
- Friday, 12/11
- In lieu of lab: Exam review
- Wednesday, 12/16
- Final exam: 12:00 PM, Halligan 111A