Princeton University
Computer Science Department

Computer Science 217
Introduction to Programming Systems

Aarti Gupta

Spring 2015


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 (on electronic reserve)

Reading (recommended): Unix Tutorial for Beginners

Reading (recommended): GNU Emacs Tutorial

Reading (recommended): Linux Pocket Guide (Barrett) pp. 166-179 (concerning composing Bash shell scripts) (on electronic reserve)

Lecture 1: (Monday) Introduction; C Overview

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

Lecture 2: (Wednesday) A Taste of C

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


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): GNU GDB Tutorial

Lecture 3: (Monday) Number Systems

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

Lecture 4: (Wednesday) The Design of C (Part 1)

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

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


Week 3: 2/16 - 2/22

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

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

Lecture 5: (Monday) The Design of C (Part 2)

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

Lecture 6: (Wednesday) Testing

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


Week 4: 2/23 - 3/1

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

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

Lecture 7: (Monday) Program and Programming Style; Debugging (Part 1)

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

(Wednesday 2/25) String Module Assignment Due (at 9:00PM)

Lecture 8: (Wednesday) Data Structures

Precept 8: (Wednesday/Thursday) Tools for Debugging Dynamic Memory Management; Abstract Data Types in C


Week 5: 3/2 - 3/8

Reading (required): C Programming (King) 19, 22

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

Lecture 9: (Monday) Debugging (Part 2); History of Modularity

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

Lecture 10: (Wednesday) Modularity Heuristics

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

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


Week 6: 3/9 - 3/15

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

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

Reading (recommended): GNU Gprof Tutorial

Lecture 11: (Monday) Performance Improvement

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

Lecture 12: (Wednesday) Midterm Examination (Midterm Exam Prep Document, Midterm Exams and Answers from Previous Semesters, This Semester's Exam, Answers to This Semester's Exam)

Location of Midterm Examination: Frist 302 for students in Precepts P01 – P05, Friend 111 for students in Precept P06

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.13 and 3.14) (on electronic reserve)

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): Intel 64 and IA-32 Architectures Optimization Reference Manual

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/30 - 4/5

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

Lecture 15: (Monday) Language-Levels Tour: Assembly Language Function 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: Machine Language, Assemblers, and Linkers

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


Week 10: 4/6 - 4/12

Reading (required): Computer Systems (Bryant & O'Hallaron) 8.1-8.3, 9.1-8 (on electronic reserve)

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

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

Reading (recommended): GNU Make Tutorial

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

Precept 17: (Monday/Tuesday) Building

(Wednesday 4/8) Assembly Language and Testing Assignment Due (at 9:00PM)

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

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


Week 11: 4/13 - 4/19

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

Reading (required): Computer Systems (Bryant & O'Hallaron) 9.9-12 (on electronic reserve)

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

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

Lecture 20: (Wednesday) Service-Levels Tour: Dynamic Memory Management (cont., same as Lecture 19)

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

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


Week 12: 4/20 - 4/26

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

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

Lecture 21: (Monday) Service-Levels Tour: Process 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: I/O Management

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


Week 13: 4/27 - 5/3

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

Lecture 23: (Monday) Service-Levels Tour: Signals

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

(Wednesday 4/29) Heap Manager Assignment Due (at 9:00PM)

Lecture 24: (Wednesday) Program Verification

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 5/12) Shell Assignment Due (at 5:00PM)

(Wednesday - Sunday) Final Examination Period

(Thursday 5/14) Final Exam Prep Session, 2:00PM, CS Building 105 (Final Exam Preparation Document)


Week 16: 5/18 - 5/23

(Monday - Saturday) Final Examination Period

(Monday 5/18) Final Exam Prep Session, 11:00AM, CS Building 105 (Final Exam Preparation Document)

(Tuesday 5/19) Final Examination, 1:30PM, Friend Center 101 (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, 2014, 2015 by Jaswinder Pal Singh, David August, Vivek Pai, Jennifer Rexford, Kai Li, Andrew W. Appel, Randolph Wang, Thomas Funkhouser, David R. Hanson, Larry Peterson, Aarti Gupta, and/or Robert M. Dondero, Jr. All precept handouts are copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 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.