Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Jennifer Rexford

Spring 2009


Directory
General Information | Schedule | Assignments | Announcements | Policies

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


Week 1: 2/2 - 2/8

Reading (required): C Programming (King) 1, 2, 3

Reading (required): Computer Systems (Bryant & O'Hallaron) 1

Reading (recommended): Programming with GNU Software (Loukides & Oram) 1, 2, 4

Lecture 1: (Monday) Introduction; C Overview (ppt, pdf)

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

Lecture 2: (Wednesday) Simple C Programs (ppt, pdf)

Precept 2: (Wednesday/Thursday) Unix; Bash


Week 2: 2/9 - 2/15

Reading (required): C Programming (King) 4, 5, 6, 7, 14, 15, 20.1

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

Reading (recommended): Programming with GNU Software (Loukides & Oram) 3, 6

Lecture 3: (Monday) Integral Data Types in C (ppt, pdf)

Precept 3: (Monday/Tuesday) The Decomment Assignment; Emacs

Lecture 4: (Wednesday) C Fundamentals (ppt, pdf)

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

(Sunday) Decomment Assignment Due


Week 3: 2/16 - 2/22

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

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

Reading (recommended): Programming with GNU Software (Loukides & Oram) 8

Lecture 5: (Monday) Testing (ppt, pdf)

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

Lecture 6: (Wednesday) Debugging (ppt, pdf)

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

(Sunday) String Module Assignment Due


Week 4: 2/23 - 3/1

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

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

Lecture 7: (Monday) Program and Programming Style (ppt, pdf)

Precept 7: (Monday/Tuesday) C Files; C Structures; C Dynamic Memory Management

Lecture 8: (Wednesday) Data Structures and Algorithms (ppt, pdf)

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


Week 5: 3/2 - 3/8

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

Lecture 9: (Monday) Modularity (ppt, pdf)

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

Lecture 10: (Wednesday) Generics (ppt, pdf)

Precept 10: (Wednesday/Thursday) C Function Pointers

(Sunday) Symbol Table Module Assignment Due


Week 6: 3/9 - 3/15

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

Lecture 11: (Monday) Exam Prep (ppt, pdf)

Precept 11: (Monday/Tuesday) C Declarations and Definitions; Midterm Exam Prep Sheet

Lecture 12: (Wednesday) Midterm Exam (answers) (See Midterm Exams (and Answers) From Previous Semesters)

Precept 12: (Wednesday/Thursday) NO PRECEPT


Week 7: 3/16 - 3/22

(Monday - Sunday) Spring Recess


Week 8: 3/23 - 3/29

Reading (required): Computer Systems (Bryant & O'Hallaron) 3 (OK to skip 3.14 and 3.15)

Reading (recommended, for reference only): IA32 Intel Architecture Software Developer's Manual: Volume 1: Basic Architecture

Reading (recommended, for reference only):IA32 Intel Architecture Software Developer's Manual: Volume 2: Instruction Set Reference

Reading (recommended, for reference only): IA32 Intel Architecture Software Developer's Manual: Volume 3: System Programming Guide

Reading (recommended, for reference only): Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification

Lecture 13: (Monday) Toward the Hardware: Assembly Language Overview (ppt, pdf)

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

Lecture 14: (Wednesday) Toward the Hardware: Assembly Language IA-32 Instructions (ppt, pdf)

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


Week 9: 3/30 - 4/5

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 5, 7

Lecture 15: (Monday) Toward the Hardware: Assembly Language Function Calls (ppt, pdf)

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

Lecture 16: (Wednesday) Toward the Hardware: Assemblers and Linkers (ppt, pdf)

Precept 16: (Wednesday/Thursday) Assembly Language: Local Variables, Functions, GDB for Assembly Language (Part 2)

(Sunday) Assembly Language Assignment Due


Week 10: 4/6 - 4/12

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

Reading (required): Communications of the ACM "Detection and Prevention of Stack Buffer Overflow Attacks" paper

Reading (required): The C Programming Language (Kernighan & Ritchie) 8.7

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

Reading (recommended): Programming with GNU Software (Loukides & Oram) 7, 9

Lecture 17: (Monday) Toward the Operating System: Memory Hierarchy (ppt, pdf)

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

Lecture 18: (Wednesday) Toward the Operating System: Dynamic Memory Management (ppt, pdf)

Precept 18: (Wednesday/Thursday) Building and Performance

(Sunday) Buffer Overrun Attack Assignment Due


Week 11: 4/13 - 4/19

Reading (required): Computer Systems (Bryant & O'Hallaron) 8

Lecture 19: (Monday) Toward the Operating System: Optimizing Malloc and Free (ppt, pdf)

Precept 19: (Monday/Tuesday) C Abstract Objects; The HeapMgr Assignment: Introductions, Baseline Implementation Data Structures and Algorithms

Lecture 20: (Wednesday) Toward the Operating System: Processes (ppt, pdf)

Precept 20: (Wednesday/Thursday) The HeapMgr Assignment: Baseline Implementation Code, First Assignment Implementation Data Structures and Algorithms


Week 12: 4/20 - 4/26

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

Lecture 21: (Monday) Toward the Operating System: System Calls and Standard I/O (ppt, pdf)

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

Lecture 22: (Wednesday) Toward the Operating System: Signals (ppt, pdf) (Lecture Example Programs)

Precept 22: (Wednesday/Thursday) The Unix Shell Assignment: Introduction

(Sunday) Heap Manager Assignment Due


Week 13: 4/27 - 5/3

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

Lecture 23: (Monday) Portability (ppt, pdf)

Precept 23: (Monday/Tuesday) The Unix Shell Assignment: Processes

Lecture 24: (Wednesday) Program Optimization (ppt, pdf)

Precept 24: (Wednesday/Thursday) The Unix Shell Assignment: I/O Redirection and Signals


Week 14: 5/4 - 5/10

(Monday - Sunday) Reading Period


Week 15: 5/11 - 5/17

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Tuesday) Shell Assignment Due

(Wednesday-Sunday) Final Exam Period

(Friday) Final Exam, 1:30PM-4:30PM, Friend Center 101 (See Exam Prep Sheet, Final Exams (and Answers) From Previous Semesters, This Semester's Exam, This Semester's Exam with Answers)


Week 16: 5/18 - 5/23

(Monday-Saturday) Final Exam Period


All lecture notes are copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by David August, Vivek Pai, Jennifer Rexford, Kai Li, Andrew W. Appel, Thomas Funkhouser, David R. Hanson, Larry Peterson, Randolph Wang, and/or Robert M. Dondero, Jr. All precept handouts are copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.