Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Jennifer Rexford

Spring 2008


Directory
General Information | Schedule | Assignments | Announcements | Policies


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


Week 1: 2/4 - 2/10

Reading (required): C Programming (King) 1, 2, 3
Alternate Reading (required): The C Programming Language (Kernighan & Ritchie) 1

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

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

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

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

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

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


Week 2: 2/11 - 2/17

Reading (required): C Programming (King) 4, 5, 6, 7
Alternate Reading (required): The C Programming Language (Kernighan & Ritchie) 2, 3, 4, B1, B2, B4, B6, B11

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

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

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

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

Lecture 4: (Wednesday) Good Programming

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

(Sunday) Decomment Assignment Due


Week 3: 2/18 - 2/24

Reading (required): C Programming (King) 8, 9, 11, 12, 13, 14
Alternate Reading (required): The C Programming Language (Kernighan & Ritchie) 5, B3

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

Lecture 5: (Monday) Scoping and Testing

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

Lecture 6: (Wednesday) Memory Allocation

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

(Sunday) String Module Assignment Due


Week 4: 2/25 - 3/2

Reading (required): C Programming (King) 15, 16, 17, 19.1-3
Alternate Reading (required): The C Programming Language (Kernighan & Ritchie) 6, 7, B5

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

Reading (recommended): C Programming (King) 19.4

Lecture 7: (Monday) Abstract Data Types

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

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

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


Week 5: 3/3 - 3/9

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

Lecture 9: (Monday) Hash Tables

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

Lecture 10: (Wednesday) Binary Numbers

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

(Sunday) Symbol Table Module Assignment Due


Week 6: 3/10 - 3/16

Lecture 11: (Monday) Review of Old Midterm Exams

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

Lecture 12: (Wednesday) Midterm Exam (Answers) (see Old Exams from previous semesters)

Precept 12: (Wednesday/Thursday) NO PRECEPT


Week 7: 3/17 - 3/23

(Monday - Sunday) Spring Recess


Week 8: 3/24 - 3/30

Reading (required): C Programming (King) 20

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

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

Lecture 13: (Monday) Inner Workings of Malloc and Free

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

Lecture 14: (Wednesday) Optimizing Malloc and Free

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


Week 9: 3/31 - 4/6

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

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

Lecture 15: (Monday) Make and Gprof

Precept 15: (Monday/Tuesday) The HeapMgr Assignment: First Assignment Implementation Code (partial), Second Assignment Implementation; The "Make" Tool

Lecture 16: (Wednesday) Assembly Language

Precept 16: (Wednesday/Thursday) Assembly Language: Getting Started

(Sunday) HeapMgr Module Assignment Due


Week 10: 4/7 - 4/13

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

Lecture 17: (Monday) Assembly Language

Precept 17: (Monday/Tuesday) Assembly Language: Fundamentals

Lecture 18: (Wednesday) Function Calls in Assembly Language

Precept 18: (Wednesday/Thursday) Assembly Language: Control Transfer, Instruction Operands, Gdb (Part 1)


Week 11: 4/14 - 4/20

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): 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 19: (Monday) Assemblers and Linkers

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

Lecture 20: (Wednesday) Operating Systems: General Concepts

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

(Sunday) Assembly Language Assignment Due


Week 12: 4/21 - 4/27

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

Lecture 21: (Monday) Operating Systems: Security

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

Lecture 22: (Wednesday) UNIX Processes and Pipes

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

(Sunday) Buffer Overrun Attack Assignment Due


Week 13: 4/28 - 5/4

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

Reading (required): The UNIX Programming Environment (Kernighan & Pike) 7.4, 7.5

Reading (recommended): The C Programming Language (Kernighan & Ritchie) 8.1, 8.2, 8.3, B9

Lecture 23: (Monday) Signals (Demo Programs)

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

Lecture 24: (Wednesday) System Calls, Stdio, and Course Wrap-Up

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


Week 14: 5/5 - 5/11

(Monday - Sunday) Reading Period


Week 15: 5/12 - 5/18

(Monday - Tuesday) Reading Period

(Tuesday) Dean's Date

(Tuesday) Shell Assignment Due


Week 16: 5/19 - 5/24

(Saturday) Final Exam: 9am-noon in COS 104 (Exam Topics; final exam, exam with answers, Old Exams from previous semesters)


All lecture notes are copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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, 2008 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.