Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Andrew Appel

Fall 2018


Directory
General Information | Schedule | Assignments | Announcements | Policies

Overview

The schedule will be updated throughout the course. Please check it frequently. Check the General Information page for the locations of lectures, precepts and office hours

Sunday Monday Tuesday Wednesday Thursday Friday
10:00AM Office (Li) L01(Appel) Office (Li) L01: Andrew Appel Office (Appel)
11:00AM Office (Li) Office (Li) Office (Appel)
Office (Benmaman)
12:00PM Office (Benmaman)
12:30PM P04 (Li)
P04A (Benmaman)
P04 (Li)
P04A (Benmaman)
1:30PM P01 (Gabai) P05 (Li)
P05A (Zhang)
P01 (Gabai) P05 (Li)
P05A (Zhang)
2:30PM Office (Stafman) Office (Stafman)
3:00PM Office (Gabai) Office (Kyung) Office (Kyung)
3:30PM P02 (Gabai) P06 (Le)
P06A (Stafman)
P02 (Gabai)
P06 (Le)
P06A (Stafman)
4:00PM Office (Gabai) Office (Zhang) Office (Zhang)
4:30PM Office (Le)
5:30PM Office (Le)
6:30PM
7:00PM Office (Gabai)
7:30PM P03 (Kyung) P03 (Kyung)
8:00PM Office (Gabai)
8:30PM


Week-by-Week


Week 0: 9/10 - 9/16

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 [6-up]


Week 1: 9/17 - 9/23

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): Linux Pocket Guide (Barrett) pp. 166-179 (concerning composing Bash shell scripts) (available through Blackboard in the "Course Materials" section)

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

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

Lecture 2: (Tuesday) A Taste of C [6-up]

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

Lecture 3: (Thursday) Number Systems [6-up]

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


Week 2: 9/24 - 9/30

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) [6-up]

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

Lecture 5: (Thursday) The Design of C (Part 2) [6-up]

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


Week 3: 10/1 - 10/7

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 [6-up]

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

Lecture 7: (Thursday) Building; Debugging notes 1 [6-up]


Week 4: 10/8 - 10/14

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 [6-up]

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

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

Lecture 9: (Thursday) Data Structures; Debugging notes 2 [6-up]


Week 5: 10/15 - 10/21

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 [6-up]

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

Lecture 11: (Thursday) Modularity design principles [6-up]

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


Week 6: 10/22 - 10/28

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 [6-up]

Precept 12: (Wednesday/Thursday) NO PRECEPT

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


Week 7: 10/29 - 11/4

(Monday - Sunday) Fall Recess


Week 8: 11/5 - 11/11

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 [6-up]

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

Lecture 15: (Thursday) Assembly Language 2 [6-up]


Week 9: 11/12 - 11/18

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 Assembly Language Function Calls [6-up]

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

Lecture 17: (Thursday) Machine Language [6-up]


Week 10: 11/19 - 11/25

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 [6-up]

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

(Wednesday - Friday) Thanksgiving Holiday


Week 11: 11/26 - 12/2

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) Memory Hierarchy [6-up]

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

Lecture 20: (Thursday) Dynamic Memory Management [6-up]

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


Week 12: 12/3 - 12/9

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

Precept 20: (Monday/Tuesday) The HeapMgr Assignment: First Assignment Implementation Data Structures and Algorithms, First Assignment Implementation Code (partial), Second Assignment Implementation Data Structures and Algorithms, Second Assignment Implementation Code (partial)

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

Precept 21: (Wednesday/Thursday) The Othello Referee and Tournament Manager Assignment: Introduction

Lecture 22: (Thursday) Process Management [6-up]


Week 13: 12/10 - 12/16

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 Othello Referee and Tournament Manager Assignment: Processes

Lecture 23: (Tuesday) Input/Output [6-up]

Precept 23: (Wednesday/Thursday) The Othello Referee and Tournament Manager Assignment: Processes (cont.), I/O Redirection, Pipes

Lecture 24: (Thursday) The Ethics of Extreme Performance Tuning [6-up]

(Thursday 12/13) Heap Manager Assignment Due (at 9:00PM)


Week 14: 12/17 - 12/23

(Monday - Sunday) Winter Break


Week 15: 12/24 - 12/30

(Monday - Sunday) Winter Break


Week 16: 12/31 - 1/6

(Monday - Sunday) Winter Break


Week 17: 1/7 - 1/13

(Monday - Sunday) Reading Period Office Hours

(Monday 1/7) Xiaoyan Li 10am-noon in 221 Nassau St. Room 104

(Tuesday 1/8) Alberto Mizrahi Benmaman 10am-noon in Friend Center 010

(Wednesday 1/9) Xiaoyan Li 10am-noon in 221 Nassau St. Room 104

(Wednesday 1/9) Seo Young Kyung 2-4pm in Friend Center 010

(Thursday 1/10) Austin Le 3-5pm in Friend Center 010

(Friday 1/11) Josh Zhang noon-2pm in Friend Center 010

(Friday 1/11) Logan Stafman 2-4pm in Friend Center 010

(Sunday 1/13) Donna Gabai 3-5pm in Corwin 039


Week 18: 1/14 - 1/20

(Monday - Tuesday) Reading Period Office Hours

(Monday 1/14) Xiaoyan Li 10am-noon in 221 Nassau St. Room 104

(Monday 1/14) Seo Young Kyung 2-4pm in Friend Center 010

(Tuesday 1/15) Dean's Date

(Tuesday 1/15) Alberto Mizrahi Benmaman 10am-noon in Friend Center 010

(Tuesday 1/15) Donna Gabai noon-2pm in CS 105

(Tuesday 1/15) Logan Stafman 2-4pm in CS 105

(Tuesday 1/15) Othello Referee and Tournament Manager Assignment Due (at 5:00PM)

(Wednesday - Sunday) Final Exam Period Office Hours

(Wednesday 1/16) Xiaoyan Li 10am-noon in 221 Nassau St. Room 104

(Thursday 1/17) Donna Gabai 1-3pm in Corwin 039

(Friday 1/18) Josh Zhang 1-3pm in Friend Center 010


Week 19: 1/21 - 1/26

(Monday - Saturday) Final Examination Period

(Monday 1/21) Xiaoyan Li noon-2pm in 221 Nassau St. Room 104

(Tuesday 1/22) Donna Gabai noon-2pm in Corwin 039

(Wednesday 1/23) Final Exam Prep Session, 1PM, Location Friend 101 (Final Exam Preparation Document)

(Wednesday 1/23) Donna Gabai 2-4pm in Friend 101

(Wednesday 1/23) Austin Le 5-7pm in Friend Center 010

(Thursday 1/24) Seo Young Kyung 1:30-2:30pm in Friend Center 010

(Thursday 1/24) Student Study Session 2:30-6:30pm in Friend Center Rooms 005, 007 and 016

(Friday 1/25) Final Examination, 1:30PM, 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-2018 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, Szymon Rusinkiewicz and/or Robert M. Dondero, Jr. All precept handouts are copyright 2001-2018 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.