CSC209H -- Lecture Notes

Lectures

This page will contain notes and examples from lecture. (The topics and weeks will shift a bit as the course progresses.)

Week and Topic Readings Day Section Evening Section
Wk 1: Jan 9
Admin, Software Tools, and Shell
Online tutorial: Shell programming tutorial Intro Wednesday transcript Friday transcript Shells (We aren't going to cover everything on these slides, but I'm leaving them in for reference.) Intro Slides
Shell Slides(we covered up to slide 10 and will continue next week.)
Shell Transcript
my_first_shell_program
faculty
Wk 2: Jan 16
Shell Programming
King Chapters 1-7 (See Shells slides from last week.) Wednesday transcript

Friday transcript
giant
argquotes
shiftexample
mistake.sh
Slides(admin and Shell - some repeated)
Transcript(of the work we did in the shell)
args.sh
giant
argquotes.sh
shiftexample.sh
my_mistake_script(fixed to show sending output from echo to stderr correctly!)
Week 3 Jan 23
Introduction to C
King Chapters 1-7 C Intro Friday transcript
Shell transcript
C Intro
gcd.c
sds.c (the obfiscated code example)
dataType.c
Week 4 Jan 30
Pointers, arrays, strings, files
King chapters 8,11, 12, 15 Pointers and Strings
In class exercise
Array of strings
pointer_example.c
Pointers and Strings
(see day section)
Wk 5: Feb 6
Files, Dynamically allocated memory,strings
King chapters 13, 17 Dynamically allocated memory
Makefiles Files
Slides (pdf) Strings, malloc, Makefiles
Wk 6: Feb 13
Memory Management
Haviland Ch 1, 2.2-2.4, 3.3, 4.1, 4.2, 4.4 Header files (and more string examples) Solution to malloc exercise (pdf)
Slides (pdf)
stat_example.c
reverse.c
Wk 7: Feb 27
Processes
King Ch 14.1-14.4, 15 Haviland Ch 5 Processes
Prototype sheet on midterm
Makefile newprog.c proc.c runprog.c
Slides (pdf)
Wk 8: March 5
Pipes
King 17.7, Haviland ch 7 Pipes Slides (pdf)
fork_pipe.c
Wk 9: March 12
Signals and sockets
Haviland Ch 7 Signals sigex.c mydirs.c (We covered opendir/readdir, and started into the socket slides.) dup2 and signals slides (pdf)
dup2_example.c
dots.c
Wk 10: March 19
Sockets
Haviland: Chapter 10 Sockets Sockets (pdf)
inetserver.c
inetclient.c
Makefile
Wk 11: March 26
Select
Haviland: Chapter 10 Select (pdf)
Bits (pdf)
examples
Reading Directories (pdf)
mydirs.c Select (pdf)
selectserver.c
Wk 12: April 2
Bit Sets and Concurrency
King: 20.1, 20.2 Bits Concurrency and Threads Review Bitsets (pdf)
Concurrency (pdf)
Review (pdf)
a.sh b.sh c.sh d.sh