Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Jennifer Rexford

Spring 2011


Directory
General Information | Schedule | Assignments | Announcements | Policies

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


Week 1: 1/31 - 2/6

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, 3, 4

Lecture 1: (Monday) Introduction; C Overview

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

Lecture 2: (Wednesday) C Examples

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


Week 2: 2/7 - 2/13

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

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

Lecture 3: (Monday) The Design of C

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

Lecture 4: (Monday) The Design of C (cont.)

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

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


Week 3: 2/14 - 2/20

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) 6, 8

Lecture 5: (Wednesday) Testing

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

Lecture 6: (Wednesday) Debugging

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


Week 4: 2/21 - 2/27

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

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

Lecture 7: (Monday) Program and Programming Style

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

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

Lecture 8: (Wednesday) Data Structures and Algorithms

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


Week 5: 2/28 - 3/6

Reading (required): C Programming (King) 19

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

Lecture 9: (Monday) Modularity

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

Lecture 10: (Wednesday) Generics

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

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


Week 6: 3/7 - 3/13

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

Lecture 11: (Monday) Exam Prep

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

Lecture 12: (Wednesday) Midterm Examination (Midterm Exams and Answers from Previous Semesters) (This semester's exam and answers)

Precept 12: (Wednesday/Thursday) NO PRECEPT


Week 7: 3/14 - 3/20

(Monday - Sunday) Spring Recess


Week 8: 3/21 - 3/27

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) Language-Levels Tour: Assembly Language 1

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

Lecture 14: (Wednesday) Language-Levels Tour: Assembly Language 2

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


Week 9: 3/28 - 4/3

Reading (recommended): Computer Systems (Bryant & O'Hallaron) 5.1-6, 7

Lecture 15: (Monday) Language-Levels Tour: Assembly Language Functions Calls

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

Lecture 16: (Wednesday) Language-Levels Tour: Assemblers, Linkers, Machine Language

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


Week 10: 4/4 - 4/10

Reading (required): Computer Systems (Bryant & O'Hallaron) 8.1-8.3, 10.1-8

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

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

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

Lecture 17: (Monday) Service-Levels Tour: Exceptions and Processes

Precept 17: (Monday/Tuesday) Building and Performance

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

Lecture 18: (Wednesday) Service-Levels Tour: Memory Management

Precept 18: (Wednesday/Thursday) The Buffer Overrun Assignment


Week 11: 4/11 - 4/17

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

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

Lecture 19: (Monday) Service-Levels Tour: Dynamic Memory Management 1

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

Lecture 20: (Wednesday) Service-Levels Tour: Dynamic Memory Management 2

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

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


Week 12: 4/18 - 4/24

Reading (required): Computer Systems (Bryant & O'Hallaron) 8.4-5

Lecture 21: (Monday) Service-Levels Tour: Process Management, I/O Management

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

Lecture 22: (Wednesday) Service-Levels Tour: Signals

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


Week 13: 4/25 - 5/1

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

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

Lecture 23: (Monday) Service-Levels Tour: Performance Revisited

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

(Tuesday) Heap Manager Assignment Due (at 9:00PM)

Lecture 24: (Wednesday) Portability

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


Week 14: 5/2 - 5/8

(Monday - Sunday) Reading Period


Week 15: 5/9 - 5/15

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Tuesday) Shell Assignment Due (at 5:00PM)

(Wednesday - Sunday) Final Examination Period

(Thursday) Exam Prep Session 1 (3:00PM in CS 105) (Final Exam Prep Handout)

(Friday) Exam Prep Session 2 (11:00AM in Friend Center 008) (same contents/handout as Session 1)

(Saturday) Final Exam (on 5/14 at 9:00 a.m. in Friend Center 101) (Final Exams and Answers from Previous Semesters) (This semester's exam and answers)


Week 16: 5/16 - 5/21

(Monday - Saturday) Final Examination Period


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