Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

David August

Fall 2007


Directory
General Information | Schedule | Lecture Notes | Assignments | Announcements | Policies


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


Week 1: 9/17 - 9/23

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

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

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

Precept 1: (Monday/Tuesday) Administrative Matters; A Minimal Computing Environment; The Program Preparation Process

Lecture 1: (Tuesday) Introduction; The C Programming Language: Fundamentals

Precept 2: (Wednesday/Thursday) UNIX and Bash; Xemacs

Lecture 2: (Thursday) Character Input/Output in C


Week 2: 9/24 - 9/30

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

Reading (required): The Practice of Programming (Kernighan and Pike) 4, 5

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

Precept 3: (Monday/Tuesday) C Simple Programs

Lecture 3: (Tuesday) Variables, Pointers, and Arrays

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

Lecture 4: (Thursday) Good Programming

(Sunday) Decomment Assignment Due


Week 3: 10/1 - 10/7

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

Reading (required): The Practice of Programming (Kernighan and Pike) 1

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

Lecture 5: (Tuesday) Scoping and Testing

Precept 6: (Wednesday/Thursday) C Arrays and Pointers; C Strings; The "const" Keyword with Pointers

Lecture 6: (Thursday) Memory Allocation

(Sunday) String Module Assignment Due


Week 4: 10/8 - 10/14

Reading (required): C Programming (King) 15, 16, 17, 19.1-3

Reading (required): The Practice of Programming (Kernighan and Pike) 2

Reading (recommended): C Programming (King) 19.4

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

Lecture 7: (Tuesday) Abstract Data Types

Precept 8: (Wednesday/Thursday) The Meminfo Tool; A Stack Abstract Data Type

Lecture 8: (Thursday) Function Pointers and Abstract Data Types


Week 5: 10/15 - 10/21

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

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

Lecture 9: (Tuesday) Hash Tables

Precept 10: (Wednesday/Thursday) C Function Pointers and Abstract Data Types; A DynArray ADT

Lecture 10: (Thursday) Representations (Part 1)

(Sunday) Symbol Table Module Assignment Due


Week 6: 10/22 - 10/28

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

Lecture 11: (Tuesday) Exam Preparation (Exam Preparation Sheet; Exams and Answers from Previous Semesters)

Precept 12: (Wednesday/Thursday) NO PRECEPT

Lecture 12: (Thursday) Midterm Exam (This Semester's Exam; Answers for This Semester's Exam)


Week 7: 10/29 - 11/4

(Monday - Sunday) Fall Recess


Week 8: 11/5 - 11/11

Reading (required): C Programming (King) 20

Precept 13: (Monday/Tuesday) C Abstract Objects; The HeapMgr Assignment; The "Baseline" HeapMgr Implementation

Lecture 13: (Tuesday) Representations (Part 2)

Precept 14: (Wednesday/Thursday) C Unions; Code for the "Baseline" HeapMgr Implementation; The "First Assignment" HeapMgr Implementation

Lecture 14: (Thursday) Implementing Malloc and Free


Week 9: 11/12 - 11/18

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

Reading (required): The Practice of Programming (Kernighan and Pike) 7

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

Precept 15: (Monday/Tuesday) Code Supporting the "Assignment" HeapMgr Implementations; The "Second Assignment" HeapMgr Implementation; The "Make" Tool

Lecture 15 (alias Precept 15lecture): (Tuesday) Assembly Language: Getting Started

Precept 16: (Wednesday/Thursday) Assembly Language: Fundamentals

Lecture 16: (Thursday) Optimizing Malloc and Free; Make and Gprof

(Sunday) HeapMgr Module Assignment Due


Week 10: 11/19 - 11/25

Reading (required): Computer Systems (Bryant & O'Hallaron) 2, 3
Alternate Reading (required): Programming from the Ground Up (Bartlett) 1, 2, 3, 4, 9, 10, B, E, F

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

Reading (required): The Practice of Programming (Kernighan and Pike) 6

Precept 17: (Monday/Tuesday) Assembly Language: Control Transfer, Instruction Operands, Gdb (Part 1)

Lecture 17: (Tuesday) Computer Architecture and Assembly Language

(Thursday - Friday) Thanksgiving Holiday


Week 11: 11/26 - 12/2

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

Reading (recommended): Programming from the Ground Up (Bartlett) 5, 6, 7, 8, 11, 12, 13, C

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

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

Precept 18: (Monday/Tuesday) Assembly Language: Local Variables, Functions, Gdb for Assembly Language (Part 2)

Lecture 18: (Tuesday) Function Calls in Assembly Language

Precept 19: (Wednesday/Thursday) Assemblers, Linkers, and Machine Language

Lecture 19: (Thursday) Assemblers and Linkers

(Sunday) Assembly Language Assignment Due


Week 12: 12/3 - 12/9

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

Precept 20: (Monday/Tuesday) The Buffer Overrun Attack Assignment

Lecture 20: (Tuesday) Operating Systems: General Concepts

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

Lecture 21: (Thursday) Operating Systems: Security

(Sunday) Buffer Overrun Attack Assignment Due


Week 13: 12/10 - 12/16

Reading (required): The Practice of Programming (Kernighan and Pike) 8

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

Lecture 22: (Tuesday) UNIX Processes

Precept 23: (Wednesday/Thursday) The UNIX Shell Assignment: I/O Redirection and Signals

Lecture 23: (Thursday) UNIX Signals; Portable Programming


Week 14: 12/17 - 12/23

Lecture 24: (Tuesday) NO LECTURE

Precept 24: (Monday/Tuesday) NO PRECEPT

(Wednesday-Friday) 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

(Sunday) Final Assignment Due


Week 18: 1/14 - 1/20

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Wednesday) Exam Preparation Sessions (11:00AM and 1:00PM in CS 105) (Exam Preparation Sheet; Exams and Answers from Previous Semesters)

(Friday) Final Exam (1:30PM - 4:30PM, Friend Center 101) (This Semester's Exam; Answers for This Semester's Exam)


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