Schedule

A week runs Thursday through the following Tuesday, across the weekend:

Thu (class) Tue (class) Wed (no class)
Assignment may go out due
Reading due before class
Quiz start and end, 2 attempts
Presentation of the assignment due the day before

Why the week is arranged this way is on How the week works.

Week 12 (11/12 — 11/17): Threads you start yourself: pthreads, and a struct for each

OpenMP’s one line started the threads and split the rows for you. Thursday does both by hand: pthread_create starts a thread, and pthread_join waits for it. Each thread is handed a struct, its own share of the work. The reading is 14.2, the same by the book, and 14.3 with its 14.3.1, on threads that have to take turns, which is Tuesday.

Week 11 (11/5 — 11/10): Pictures in parallel: OpenMP, and how much faster

The lab’s machines run twelve threads at once, two on each of six cores, and a picture’s rows can be worked on at the same time, as long as no row writes what another reads. Thursday puts one line, #pragma omp parallel for, above a loop and times what it buys. The reading is the first and the last section of Dive Into Systems’ chapter on threads: 14.1 says what a thread is, and 14.7 is the line Thursday used.

Week 10 (10/29 — 11/3): Practice test, and Midterm Part 2

  • Presentation: A8 on Thursday 10/29.
  • Exam: Midterm Part 2, Nov 3, 2026 — The whole period, on a lab machine. Open book, no AI, no collaboration, no device but the lab computer. C on one thread.
  • Quiz: None — the midterm is in that slot.

No new reading this week. Tuesday is Midterm Part 2: C on one thread, written on a machine, all programming. The exam page says what is on it.

Thursday is a full practice test, and it counts for nothing. Same room, same length, same number of programs, same hand-in. It is the only way to find out what you cannot yet do while there is still time to fix it.

Week 9 (10/22 — 10/27): A picture is bytes: drawing, and a pipeline

A picture is one array of bytes, three per pixel, and a program draws by writing them. Thursday writes the text form of a picture with printf and needs no reading. The reading is two short sections of a second book, Beej’s Guide to C, on FILE *, fread and fwrite: Tuesday uses them to write and read the binary form through a pipe, and Quiz 7 is on them. Dive Into Systems has no fread, which is why the book changes for one week.

Week 8 (10/15 — 10/20): Memory you ask for: malloc and free

2.4 is the week: where the memory a program asks for comes from, malloc and free, and arrays whose size is only known once the program runs. 2.6.2 is one page of last week’s section, kept for this week because it needs malloc. Quiz 6 also has a question on last week’s reading, 2.6.1 and 2.6.3, which had no quiz of its own.

Week 7 (10/8): Strings with pointers

A one-class week. Tuesday 10/13 is fall break, so this week is Thursday only and the next class is Thursday 10/15. The reading is due before that class.

Week 6 (10/1 — 10/6): Pointers, and the swap that finally works

Week 5 (9/24 — 9/29): Practice test, and Midterm Part 1

  • Presentation: A4 on Thursday 09/24.
  • Exam: Midterm Part 1, Sep 29, 2026 — The first fifty minutes of the period, on a lab machine. Open book, no AI. C without pointers.
  • Quiz: None — the midterm is in that slot.

No new reading this week. Tuesday is Midterm Part 1, which is written on a machine and is all programming — so the thing to do with the week is write C, not read about it. The exam page says what is on it.

Thursday is a full practice test, and it counts for nothing. Same room, same length, same number of programs, same upload. Being there is worth more than any evening of revising, because it is the only way to find out what you cannot yet do while there is still time to fix it.

Week 4 (9/17 — 9/22): Arrays, strings, and what C does when you walk off the end

  • Assignment: A4 out Thursday 09/17, due Wednesday 09/23.
  • Presentation: A3 on Thursday 09/17.
  • Quiz: Quiz 4, Sep 22, 2026 — Two attempts, one at the start of class and one near the end.
  • Reading (before Sep 22, 2026): [DIS] 16.5 — Arrays and Strings

If Python is the language you know best, read [DIS] 1.5 — Arrays and Strings instead of 16.5 — the same section, with Python comparisons rather than Java.

This is the reading the whole course has been pointing at since day 1. On day 1 the promise was that Java throws ArrayIndexOutOfBoundsException and C does not. 16.5 is where the book says it in its own words: “there is no bounds checking by the compiler or at runtime”, and the behaviour of a program that indexes past the end is undefined — which is a technical term meaning the language declines to say what happens, so the answer can differ between two runs of the same binary. Find that paragraph and read it twice.

The section has a second half that is easy to miss. A C string is not a type; it is an array of characters with a '\0' on the end, and every function in string.h depends on that one byte being there. Read to the end, and note strlen — it is the one that tells you how a function can find the end of an array when nobody passed it a length.

Week 3 (9/10 — 9/15): Functions, and splitting a program across files

If Python is the language you know best, read [DIS] 1.4 — Functions instead of 16.4 — the same section, with Python comparisons rather than Java.

One sentence in 16.4 is the whole of this week: a function must be declared before it is called. Java never asked you for that, because javac reads your whole class before it compiles any of it. gcc does not. Prototypes, header files, and the reason a C program can be split across several files at all — every one of those falls out of that sentence, so read it slowly and the rest of the week is much less surprising.

[DIS] 17.5 — make and Makefiles is a how-to rather than a chapter. Read 17.5.1 through 17.5.7 and then stop: the four sections after that are all labelled Advanced and they build a Makefile larger than anything this course needs. 17.5.6 is the one worth arriving having seen — it lists the ways a Makefile fails, and one of them is going to happen to you on Tuesday.

17.5.7 is one paragraph long and it is the first time the word in this course’s title turns up in a tool you are actually using: make -j4 builds four files at once, because compiling one file does not depend on compiling the others. Read it and notice it. That is all for now.

Week 2 (9/3 — 9/8): Conditionals, loops, and reading input

If Python is the language you know best, read [DIS] 1.2 — Input/Output (printf and scanf) and [DIS] 1.3 — Conditionals and Loops instead — the same two sections, with Python comparisons rather than Java.

Both are short, and deliberately: if, for and while in C are close enough to what you already write that 16.3 is mostly confirming it. Spend the time you save on 16.2. You have been using printf since week 1 without being told how it works; scanf is new, and the & in front of its argument is the detail to arrive on Tuesday having already read about.

Week 1 (8/27 — 9/2): Linux command line, first C programs

Chapter 16 is chapter 1 rewritten for readers coming from Java. If Python is the language you know best, read [DIS] 1.0 — By the C, by the C, by the Beautiful C and [DIS] 1.1 — Getting Started Programming in C instead — same material, different comparisons. Either one is a right answer. Nothing is graded on which you pick and the quizzes are written so that both work, so if you read the other one you have not read the wrong thing.

For the command line specifically, keep [DIS] 17.1 — Unix Command Line and the Unix File System and [DIS] 17.2 — Man and the Unix Manual open while you work. Chapter 17 is a reference rather than a chapter: look things up in it, don’t read it through.

Week 0 (8/25): Intro