Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Andrew Appel

Fall 2016


Directory
General Information | Schedule | Assignments | Announcements | Policies

Overview

The schedule will change throughout the course. Please check it frequently.

Monday Tuesday Wednesday Thursday Friday
10:00AM L01: Appel L01: Appel Office: Appel
11:00AM Office: Appel
12:30PM P04: Gunawardena
P04A: Zhang
P04: Gunawardena
P04A: Zhang
Office: Adewale
1:30PM P01: Dondero P05: Gunawardena
P05A: Popovych
Office: Zhang
P01: Dondero
Office: Gunawardena
P05: Gunawardena
P05A: Popovych
Office: Zhang
Office: Gunawardena
Office: Sharma
2:30PM Office: Dondero Office: Petras
Office: Popovych
Office: Dondero
Office: Gunawardena
Office: Petras
Office: Popovych
Office: Gunawardena
3:30PM P02: Dondero P06: Petras
P06A: Adewale
Office: Mahajan
P02: Dondero
Office: Sharma
P06: Petras
P06A: Adewale
4:30PM Office: Dondero Office: Adewale
Office: Mahajan
Office: Dondero
5:30PM
6:30PM Office: Kapoor
7:30PM P03: Bai
P03A: Mahajan
P07A: Kapoor P03: Bai
P03A: Mahajan
P07A: Kapoor
8:30PM Office: Bai Office: Kapoor Office: Bai


Week-by-Week


Week 0: 9/14 - 9/18

Reading (required): C Programming (King) 1

Reading (required): Computer Systems (Bryant & O'Hallaron) 1 (available through Blackboard in the "Course Materials" section)

Lecture 1: (Thursday) Introduction; C Overview (6up, 1up)


Week 1: 9/19 - 9/25

Reading (required): C Programming (King) 2, 3, 4, 5, 6, 7, 20.1

Reading (recommended, for reference only): C Programming (King) 21

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 2

Reading (recommended): Unix Tutorial for Beginners

Reading (recommended): GNU Emacs Tutorial

Reading (recommended): Wikipedia "Deterministic finite automaton" article

Precept 1: (Monday/Tuesday) Introduction; The Computing Environment; Program Preparation

Lecture 2: (Tuesday) A Taste of C (6up, 1up)

Precept 2: (Wednesday/Thursday) Linux; Bash; Emacs

Lecture 3: (Thursday) Number Systems (6up, 1up)

(Sunday 9/25) Introductory Survey Assignment Due (at 9:00PM)


Week 2: 9/26 - 10/2

Reading (required): C Programming (King) 14, 15

Reading (recommended): GNU GDB Tutorial

Precept 3: (Monday/Tuesday) Simple C Programs; C Fundamentals

Lecture 4: (Tuesday) The Design of C (Part 1) (6up, 1up)

Precept 4: (Wednesday/Thursday) Multi-File C Programs; GDB

Lecture 5: (Thursday) The Design of C (Part 2) (6up, 1up)

(Sunday 10/2) De-Comment Assignment Due (at 9:00PM)


Week 3: 10/3 - 10/9

Reading (required): C Programming (King) 8, 9, 11, 12, 13

Reading (recommended): The Practice of Programming (Kernighan & Pike) 6

Reading (recommended): GNU Make Tutorial

Precept 5: (Monday/Tuesday) C Pointers and Arrays

Lecture 6: (Tuesday) Testing (6up, 1up)

Precept 6: (Wednesday/Thursday) C Arrays and Strings

Lecture 7: (Thursday) Building (6up, 1up)


Week 4: 10/10 - 10/16

Reading (required): C Programming (King) 16, 17

Reading (recommended): The Practice of Programming (Kernighan & Pike) 1, 2, 5

Precept 7: (Monday/Tuesday) C Command-Line Arguments; C Structures; C Dynamic Memory Management

Lecture 8: (Tuesday) Program and Programming Style; Debugging (6up, 1up)

(Tuesday 10/11) String Module Assignment Due (at 11:00PM)

Precept 8: (Wednesday/Thursday) The Meminfo Tool; Abstract Data Types in C

Lecture 9: (Thursday) Debugging cont'd; Data Structures (6up, 1up)


Week 5: 10/17 - 10/23

Reading (required): C Programming (King) 19

Reading (recommended): The Practice of Programming (Kernighan & Pike) 4, 8

Precept 9: (Monday/Tuesday) C Void Pointers; The Symbol Table Assignment

Lecture 10: (Tuesday) Modularity (6up, 1up)

Precept 10: (Wednesday/Thursday) C Function Pointers; A DynArray ADT

Lecture 11: (Thursday) Modularity design principles (6up, 1up)

(Sunday 10/23) Symbol Table Assignment Due (at 9:00PM)


Week 6: 10/24 - 10/30

Reading (required): C Programming (King) 10, 18

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 5.1-5

Reading (recommended): The Practice of Programming (Kernighan & Pike) 7

Reading (recommended, for reference only): OProfile Manual

Precept 11: (Monday/Tuesday) C Declarations and Definitions

Lecture 12: (Tuesday) Performance profiling (6up, 1up)

Precept 12: (Wednesday/Thursday) NO PRECEPT

Lecture 13: (Thursday) Midterm Examination (Midterm Exam Prep Document, Midterm Exams and Answers from Previous Semesters, This Semester's Exam, Answers to This Semester's Exam)


Week 7: 10/31 - 11/6

(Monday - Sunday) Fall Recess


Week 8: 11/7 - 11/13

Reading (required): Computer Systems (Bryant & O'Hallaron) 3 (OK to skip 3.11) (available through Blackboard in the "Course Materials" section)

Reading (recommended, for reference only): Intel 64 and IA-32 Architectures Software Developer's Manual: Volume 1: Basic Architecture

Reading (recommended, for reference only): Intel 64 and IA-32 Architectures Software Developer's Manual: Volume 2: Instruction Set Reference

Reading (recommended, for reference only): Intel 64 and IA-32 Architectures Software Developer's Manual: Volume 3: System Programming Guide

Reading (recommended, for reference only): Intel 64 and IA-32 Architectures Optimization Reference Manual

Reading (recommended, for reference only): Using as

Precept 13: (Monday/Tuesday) Assembly Language: Getting Started

Lecture 14: (Tuesday) Assembly Language 1 (6up, 1up)

Precept 14: (Wednesday/Thursday) Assembly Language: Fundamentals, Control Transfer (Part 1)

Lecture 15: (Thursday) Assembly Language 2 (6up, 1up)


Week 9: 11/14 - 11/20

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 5.6-15, 7

Precept 15: (Monday/Tuesday) Assembly Language: Control Transfer (Part 2), Instruction Operands, GDB for Assembly Language

Lecture 16: (Tuesday) Assembly Language Function Calls (6up, 1up)

Precept 16: (Wednesday/Thursday) Assembly Language: Local Variables, Functions

Lecture 17: (Thursday) Machine Language (6up, 1up)


Week 10: 11/21 - 11/27

Reading (required): C Programming (King) 22

Reading (required): Communications of the ACM "Detection and Prevention of Stack Buffer Overflow Attacks" paper (available through Blackboard in the "Course Materials" section)

Reading (required): Computer Systems (Bryant & O'Hallaron) 8.1-8.3 (available through Blackboard in the "Course Materials" section)

Precept 17: (Monday/Tuesday) The Buffer Overrun Assignment

Lecture 18: (Tuesday) Exceptions and Processes (6up, 1up)

(Tuesday 11/22) Assembly Language Assignment Due (at 11:00PM)

(Wednesday - Friday) Thanksgiving Holiday


Week 11: 11/28 - 12/4

Reading (required): The C Programming Language (Kernighan & Ritchie) 8.7 (available through Blackboard in the "Course Materials" section)

Reading (required): Computer Systems (Bryant & O'Hallaron) 9 (available through Blackboard in the "Course Materials" section)

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 6

Reading (recommended): Security as a Class of Interface Guarantee, especially if you're interested in computer security (recommended by Prof. Andrew Appel)

Precept 18: (Monday/Tuesday) C Abstract Objects; The HeapMgr Assignment: Introduction

Lecture 19: (Tuesday) Storage Management (6up, 1up)

Precept 19: (Wednesday/Thursday) The HeapMgr Assignment: Linked List Implementation: Data Structures, Algorithms, and Code

Lecture 20: (Thursday) Dynamic Memory Management (6up, 1up)

(Sunday 12/4) Buffer Overrun Assignment Due (at 9:00PM)


Week 12: 12/5 - 12/11

Reading (required): Computer Systems (Bryant & O'Hallaron) 8.4 (available through Blackboard in the "Course Materials" section)

Precept 20: (Monday/Tuesday) The HeapMgr Assignment: Doubly-Linked List and Bin Implementations: Data Structures, Algorithms, and (partial) Code

Lecture 21: (Tuesday) Dynamic Memory Management cont'd

Precept 21: (Wednesday/Thursday) The Linux Shell Assignment: Introduction

Lecture 22: (Thursday) Process Management (6up, 1up)


Week 13: 12/12 - 12/18

Reading (required): Computer Systems (Bryant & O'Hallaron) 8.5 (available through Blackboard in the "Course Materials" section)

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 10

Precept 22: (Monday/Tuesday) The Linux Shell Assignment: Processes

Lecture 23: (Tuesday) I/O Management (6up, 1up)

(Wednesday 12/14) Heap Manager Assignment Due (at 11:00PM)

Precept 23: (Wednesday/Thursday) The Linux Shell Assignment: Shell Built-In Commands, I/O Redirection, Signals

Lecture 24: (Thursday) The Ethics of Extreme Performance Tuning (6up, 1up)


Week 14: 12/19 - 12/25

(Monday - Sunday) Winter Break


Week 15: 12/26 - 1/1

(Monday - Sunday) Winter Break


Week 16: 1/2 - 1/8

(Monday - Sunday) Winter Break


Week 17: 1/9 - 1/15

(Monday - Tuesday) Reading Period


Week 17: 1/16 - 1/22

(Monday - Tuesday) Reading Period

(Tuesday 1/17) Dean's Date

(Tuesday 1/17) Shell Assignment Due (at 5:00PM)

(Wednesday - Sunday) Final Examination Period


Week 18: 1/23 - 1/29

(Monday - Sunday) Final Examination Period

(Monday 1/23) Final Exam Prep Session, 1:30PM, Friend Center 101 (Final Exam Preparation Document)

(Tuesday 1/24) Final Exam Prep Session, 1:30PM, CS Building 104 (Final Exam Preparation Document)

(Wednesday 1/25) Final Examination, 1:30PM, McCosh Hall 28 or McCosh Hall 50 (Final Exams and Answers from Previous Semesters, This Semester's Exam, Answers to This Semester's Exam)


All lecture notes are copyright 2001-2017 by Jaswinder Pal Singh, David August, Vivek Pai, Jennifer Rexford, Kai Li, Andrew W. Appel, Randolph Wang, Thomas Funkhouser, David R. Hanson, Larry Peterson, Aarti Gupta, and/or Robert M. Dondero, Jr. All precept handouts are copyright 2001-2016 by Robert M. Dondero, Jr. Permission to reproduce these notes for not-for-profit educational purposes is hereby granted. These notes may not be reproduced for commercial purposes without the express written consent of the author.