SYSTEM PROGRAMMING IN LINUX

A focused learning plan for Stewart N. Weiss’s book

A focused learning plan for Stewart N. Weiss’s book

A focused learning plan for Stewart N. Weiss’s book

16 WEEKS + 1 SETUP WEEK

Outcome

By the end, you will be able to write and debug C programs that interact directly with Linux files, processes, signals, interprocess communication (IPC), threads, terminals, and non-blocking input/output—and explain what the kernel is doing at each boundary.

The finish line

The weekly operating system

Use the same four-session loop every week. The sequence matters: understand the model, touch the interface, build something, then consolidate the bugs.

Session

Time

Mode

Output

A

75 min

Read + annotate

Kernel boundary; API contract

B

75 min

Re-type examples

Compile; trace; vary inputs

C

3–4 hr

Chapter project

Working program + README

D

60–90 min

Debug + recall

Bug log + five questions

Your weekly time budget

Work

Typical

Heavy week

Reading

1.5 hr

2 hr

Code-along

1.5 hr

2 hr

Project

3 hr

4.5 hr

Review

1 hr

1.5 hr

Typical total: 7 hours. Heavy total: 10 hours. The full plan is approximately 131 hours; allow a 125–145 hour range because C debugging is variable.

Definition of done for every week

Setup week rebuilds only the C you need

Do not add a separate C course. Spend six hours on a compact readiness pass, then refresh deeper C concepts exactly when the book needs them.

1. Create the Linux lab — 60 minutes

2. Run the C reboot — 4 hours

Block

Refresh

Micro-drill

45 min

Types + control flow

Parse argv options

60 min

Pointers + arrays

Reverse a string

45 min

Structs + enums

Model a file record

60 min

Heap ownership

Dynamic line list

30 min

Headers + Make

Two-file program

3. Pass the readiness check — 60 minutes

Write a small command-line program that reads a text file, counts lines and bytes, stores the result in a struct, and reports errors through stderr. You are ready when it:

Phase 1 — Foundations become observable

Weeks 1–4 · Chapters 1–7 · 31 hours

Week

Read

Core focus

Build / proof

Hours

1

Ch. 1–2

Unix model; syscalls

errno probe + tracer

8

2

Ch. 3–4

time; descriptors

timestamped copier

8

3

Ch. 5

robust file I/O

who/cp-style utility

7

4

Ch. 6–7

inodes; directories

recursive inspector

8

How to use these four weeks

Phase 2 — Processes become controllable

Weeks 5–8 · Chapters 8–11 · 30 hours

Week

Read

Core focus

Build / proof

Hours

5

Ch. 8

signals; handlers

signal-safe worker

7

6

Ch. 9

timers; sleeping

deadline utility

6

7

Ch. 10

process states

process observer

8

8

Ch. 11

fork; exec; wait

mini process runner

9

How to use these four weeks

Phase 3 — Programs learn to cooperate

Weeks 9–12 · Chapters 12–15 · 30 hours

Week

Read

Core focus

Build / proof

Hours

9

Ch. 12

IPC choices

mechanism demos

6

10

Ch. 13

pipes; FIFOs

two-stage pipeline

8

11

Ch. 14

clients; daemons

local job service

8

12

Ch. 15

thread lifecycle

threaded workers

8

How to use these four weeks

Phase 4 — Concurrency and I/O become robust

Weeks 13–16 · Chapters 16–19 · 34 hours

Week

Read

Core focus

Build / proof

Hours

13

Ch. 16

mutexes; conditions

bounded queue

10

14

Ch. 17

non-blocking I/O

event-driven server

8

15

Ch. 18

terminal modes

raw-input utility

7

16

Ch. 19

ncurses interface

system monitor

9

How to use these four weeks

Four checkpoints prove understanding

A checkpoint is complete only when you can explain the behavior without reading the code. Use the same review rubric each time so progress is visible.

Gate

Question

Pass evidence

Correctness

Does it do the job?

happy + failure tests

Kernel model

Why this syscall?

call-path explanation

Resources

What must close/free?

clean exit; no leaks

Concurrency

What can interleave?

named invariant

Debugging

How was it proved?

trace or debugger note

Checkpoint review — 45 minutes

Final self-test

Without notes, answer these in plain language. Any answer that takes more than two minutes becomes the first review item after the course.

Rules that keep C from eating the schedule

Use a debugging ladder

Minute

Action

Decision

0–10

read warning + errno

fix obvious contract

10–25

reduce the input

keep smallest failure

25–45

gdb or strace

locate boundary

45–60

Valgrind / sanitizer

check memory

60

write the hypothesis

stop random edits

Stop conditions

Notes that are worth keeping

C refresh is just in time

Before

Refresh

Weeks 1–4

pointers; buffers; structs

Weeks 5–8

function pointers; async rules

Weeks 9–12

ownership; lifetime; APIs

Weeks 13–16

atomics; shared state

Progress tracker

Print this page or mark it digitally. “Done” means the weekly definition of done is satisfied—not merely that the chapter was read.

Week

Scope

Plan

Actual

Done

0

Linux lab + C readiness

6

1

Ch. 1–2

8

2

Ch. 3–4

8

3

Ch. 5

7

4

Ch. 6–7 · Gate 1

8

5

Ch. 8

7

6

Ch. 9

6

7

Ch. 10

8

8

Ch. 11 · Gate 2

9

9

Ch. 12

6

10

Ch. 13

8

11

Ch. 14

8

12

Ch. 15 · Gate 3

8

13

Ch. 16

10

14

Ch. 17

8

15

Ch. 18

7

16

Ch. 19 · Gate 4

9

Planned total: 131 hours

What success looks like after week 16

Toolbox and source links

Minimal toolbox

Tool

Use

GCC / Clang

compile + warnings

make

repeatable builds

gdb

control flow + state

strace

system-call boundary

Valgrind

memory defects

git

small reversible steps

man pages

interface contracts

Primary resources

Book page: No Starch Press describes the book as a hands-on guide with conceptual diagrams, annotated source code, and practical projects.

Author’s code: The author’s repository organizes source by chapter and documents updates to the printed code.

Published contents: The chapter sequence used in this plan follows the published table of contents.