From CS61
Jump to: navigation, search

Computer Science 61 and E61
Systems Programming and Machine Organization
Fall 2015


The schedule will remain tentative all term.

Recommended readings are generally from the textbook, CS:APP3e. The second edition often has comparable readings; if two different sections are listed, the first is for second edition and the second is for third edition.

Videotaped lectures

Lecture by Lecture Details

Week Date Topic Pre-Class Prep Readings
1 Thu 9/3 Course Overview None None
Section Notes
Tu 9/8 Unit 1: Fundamentals
Exploring Memory
Administrivia (PDF) (8:52)
Course Mechanics
Abstractions (PDF) (33:27)
Web Work (Solutions)
1. A Tour of Computer Systems (1.1-1.10)
3.11 Using GDB
Thu 9/10 Data Representation Hexadecimal review (PDF) (15:27)
Data Representation (PDF) (23:18)
Web Work (Solutions)
2.1 Information Storage (2.1-2.1.6)
2.2 Integer Representation
3.8 Array Allocation and Access (skip 3.8.5)
3.9 Heterogeneous Data Structures
3.10/3.10.1 Understanding Pointers
(Skip assembly code)
Fri 9/11 A1 Intermediate Checkin
Section Notes
Tu 9/15 Pointers and Strings Signed and Unisigned Arithmetic (PDF) (14:16)
Alignment and Fragmentation (PDF) (15:08)
Web Work (Solutions)
9.9 Dynamic Memory Allocation (9.9.1-9.9.4)
9.11 Common Memory-Related Bugs in C
(Skip Assembly)
Thu 9/17 A Simple Allocator Garbage Collection (PDF) (22:05)
Pre-class survey (Solutions)
9.9.5-9.9.8 Implementation issues
9.10 Garbage Collection
Fri 9/18 A1 Due
Section Notes
Tu 9/22 Unit II: Machine Programming
From C to Assembly and back
Introduction to Assembly (PDF) (13:10)
Arithmetic and Logical Operators (PDF) (12:40)
Web Work (Solutions)
See Note below
3-3.5 Arithmetic and Logical Operations
Thu 9/24 Fun with Control Flow Addressing Modes (PDF) (9:18)
Control Flow (PDF) (19:54)
Web Work (Solutions)
3.6-3.7 Control and Procedures
Section Notes
Tu 9/29 Assembly Roulette Calling Conventions (PDF) (20:11)
Web Work (Solutions)
3.12/3.10.3 Out of Bounds Memory
Thu 10/1 Unit III: The Memory Hierarchy
Go Fast/Go Slow
Buffer Overflows(PDF) (24:40)
Architecture and Caching (PDF) (19:24)
Web Work (Solutions)
6.1 Storage Technologies
6.2 Locality
6.3 The memory hierarchy
Fri 10/2 A2 Due
Section Notes
Tu 10/6 Building a Simple Cache Cache Details (PDF) (32:15)
Web Work (Solutions)
10 System I/O (skip 10.4)
Thu 10/8 Building a Simple Cache (cont) Replacement/Eviction Policies (PDF) (14:04)
Web Work (Solutions)
6.4 Cache Memories
6.5 Writing Cache Friendly Code
6.6 Putting it Together
Fri 10/9 A3 Intermediate Checkin
Section Notes
Tu 10/13 Matrix Multiply: HW Cache Effectiveness mmap (PDF) (18:20)
Web Work (Solutions)
Th 10/15 Unit IV: Process Management
Baby Shell Baby Shell
Fork and Exec (PDF) (25:08)
Web Work (Solutions)
8.2 Processes
8.4 Process Control
Fri 10/16 A3 Due
Section Notes
Tu 10/20 Midterm review Midterm review
Web Work
Thu 10/22 Midterm Exam (Solutions)
(Extension: 7:00 PM - 8:30, Maxwell Dworkin 221, 33 Oxford Street Cambridge)
Section Notes
Tu 10/27 Pipes and Redirection Pipes (PDF) (22:06)
Web Work (Solutions)
8.1 Exceptions
8.3 System Call Error Handling
8.5 Signals
Thu 10/29 Signals
Process Groups
Read This article
Signals (PDF) (24:40)
Waiting (PDF) (11:04)
Web Work (Solutions)
Fri 10/30 A4 Intermediate Checkin
Section Notes
Tu 11/3 Midterm Solution Discussion
A4 Mega Office Hours
Synchronizing processes (PDF) (20:43)
Synchronization overview (PDF) (14:53)
Web Work delayed until Thursday since these went up so late -- apologies -- awful Internet access!
12.1 Concurrent Programming with Processes
12.2 Concurrent Programming with I/O Multiplexing
Thu 11/5 Programming with pthreads Synchronization Primitives (PDF) (17:26)
Threads and Pthreads (PDF) (12:12)
Web Work (Solutions)
12.3 Concurrent Programming with Threads
12.4 Shared Variables in Threaded Programs
12.5 Synchronizing Threads with Semaphores
12.6 Using Threads for Parallelism
Fri 11/6 A4 Due
11 Section Notes Tu 11/10 More synchronization practice Building and Programming with Semaphores (PDF) (26:52)
Web Work (Solutions)
Thu 11/12 Solving Classic Synchronization Problems Dobby the Elf (PDF) (10:12)
No Web Work!
12 Section Notes Tu 11/17 Unit 6: Virtual memory VM Overview (PDF) (12:52)
x86 VM (PDF) (26:45)
Web Work (Solutions pp12 pp34)
9.1 Physical and Virtual Addressing
9.2 Address Spaces
9.3 VM as a tool for caching
Thu 11/19 Meet a Weensy OS (but not '''the''' Weensy OS) VM Features (PDF) (28:00)
Pre-class Work (PDF)
9.7: The Intel Core i7/Linux Memory System
Fri 11/20 A5 Due
13 Tu 11/24 Weensy OS Kernel Programming/Introduction to Weensy OS (PDF) (36:44)
Pre-class work (Solutions)
Read Assignment 6.
Thu 11/26 No class
14 Tu 12/1 Building a Network Server (1) Building a networked server (PDF) (31:36)
Pre Class Work (Solutions)
11.1 Client/Server Programming
11.2 Networks
Thu 12/3 Building a Network Server (2) NONE! 11.4 The Sockets Interface
11.5 Web Services
11.6 Putting it Together (The TINY Web Server)
15 Tue 12/8 A6 Due
Sat 12/12 Final Exam: 9:00 AM - Noon Lowell Lecture Hall (Both College and Extension) 17 Kirkland Street. (Solutions)

NOTE: The 3rd edition of the text book presents assembly language on a 64 bit machine, while the 2nd edition presents it on a 32 bit machine. Our appliance is a 32-bit machine and we will be using that for all our assembly language exercises (and the problem set). In general, the information is easily transferable, but everywhere that the 3rd edition talks about quad words (e.g., movq), we will be talking about longs (e.g., movl).