Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Jaswinder Pal Singh

Fall 2013


Directory
General Information | Schedule | Assignments | Announcements | Policies

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


Week 0: 9/11 - 9/15

Reading (required): C Programming (King) 1

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

Lecture 1: (Thursday) Introduction; C Overview


Week 1: 9/16 - 9/22

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

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

Reading (recommended): Unix Tutorial for Beginners

Reading (recommended): GNU Emacs Tutorial

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

Lecture 2: (Tuesday) C Examples

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

Lecture 3: (Thursday) Number Systems


Week 2: 9/23 - 9/29

Reading (required): C Programming (King) 14, 15

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

Reading (recommended): GNU GDB Tutorial

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

Lecture 4: (Tuesday) The Design of C

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

Lecture 5: (Thursday) Testing

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


Week 3: 9/30 - 10/6

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

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

Reading (recommended): GNU Make Tutorial

Reading (recommended): GNU Gprof Tutorial

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

Lecture 6: (Tuesday) Debugging

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

Lecture 7: (Thursday) Building and Performance


Week 4: 10/7 - 10/13

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

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

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

Lecture 8: (Tuesday) Program and Programming Style

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

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

Lecture 9: (Thursday) Data Structures and Algorithms


Week 5: 10/14 - 10/20

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

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

Lecture 11: (Thursday) Generics

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


Week 6: 10/21 - 10/27

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

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

Lecture 12: (Tuesday) Exam Prep

Precept 12: (Wednesday/Thursday) NO PRECEPT

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


Week 7: 10/28 - 11/3

(Monday - Sunday) Fall Recess


Week 8: 11/4 - 11/10

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

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

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

Lecture 14: (Tuesday) Language-Levels Tour: Assembly Language 1

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

Lecture 15: (Thursday) Language-Levels Tour: Assembly Language 2


Week 9: 11/11 - 11/17

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

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

Lecture 16: (Tuesday) Language-Levels Tour: Assembly Language Functions Calls

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

Lecture 17: (Thursday) Language-Levels Tour: Assemblers, Linkers, Machine Language


Week 10: 11/18 - 11/24

Reading (required): C Programming (King) 22

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

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

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

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

Lecture 18: (Tuesday) Service-Levels Tour: Exceptions and Processes

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

Precept 18: (Wednesday/Thursday) C Abstract Objects; The HeapMgr Assignment: Introduction

Lecture 19: (Thursday) Service-Levels Tour: Memory Management


Week 11: 11/25 - 12/1

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

Precept 19: (Monday/Tuesday) The HeapMgr Assignment: Baseline Implementation Data Structures and Algorithms, Baseline Implementation Code

Lecture 20: (Tuesday) Service-Levels Tour: Dynamic Memory Management 1

(Tuesday 11/26) Buffer Overrun Assignment Due (at 9:00PM)

(Wednesday - Friday) Thanksgiving Holiday


Week 12: 12/2 - 12/8

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

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

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

Lecture 21: (Tuesday) Service-Levels Tour: Dynamic Memory Management 2

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

Lecture 22: (Thursday) Service-Levels Tour: Process Management


Week 13: 12/9 - 12/15

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

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

Lecture 23: (Tuesday) Service-Levels Tour: I/O Management and Performance Revisited

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

Precept 23: (Wednesday/Thursday) The Unix Shell Assignment: Shell Built-In Commands, I/O Redirection, Signals

Lecture 24: (Thursday) Service-Levels Tour: Signals


Week 14: 12/16 - 12/22

(Monday - Sunday) Winter Break


Week 15: 12/23 - 12/29

(Monday - Sunday) Winter Break


Week 16: 12/30 - 1/5

(Monday - Sunday) Winter Break


Week 17: 1/6 - 1/12

(Monday - Sunday) Reading Period

(Sunday 1/12) Shell Assignment Due (at 9:00PM)


Week 18: 1/13 - 1/19

(Monday - Tuesday) Reading Period

(Tuesday 1/14) Dean's Date

(Wednesday - Sunday) Final Examination Period


Week 19: 1/20 - 1/25

(Monday - Sunday) Final Examination Period

(Monday 1/20) Final Exam Prep Session, 1:30 PM, McCosh Hall 46 (Final Exam Preparation Document)

(Tuesday 1/21) Final Exam Prep Session, 1:30 PM, McCosh Hall 46 (Final Exam Preparation Document, Final Exam Preparation Audio/Video Recording)

(Wednesday 1/22) Final Examination, 9:00AM, 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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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, 2011, 2012, 2013 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.