Learning Resources
This module is populated from the local chunked books in library/raw/semester-04-systems-programming/books and from canonical online documentation. Computer Systems: A Programmer's Perspective (CSAPP) is now in the local Semester 4 library and should be used as the strongest second source for processes, virtual memory, and concurrency.
Source Stack
| Source | Role | How to use it in this module |
|---|---|---|
| The C Programming Language (K&R) | Primary | Chapter 8 (UNIX System Interface) is the direct precursor of Clusters 1-3. Read 8.1-8.3, 8.7. |
| Computer Organization and Design (Patterson & Hennessy) | Selective | Chapter 5.4 for the virtual memory picture behind mmap; Chapter 7 for parallelism background. |
| Code (Petzold) | Background | Chapters 25-26 give an unusually lucid picture of peripherals and the OS boundary. |
| SICP | Peripheral | Not used directly in this module. |
Linux man pages (man7.org) | Primary external | The authoritative reference for every syscall. Read the RETURN VALUE and ERRORS sections, always. |
| Beej's Guide to Network Programming | Primary external | Best free tutorial for BSD sockets. |
| Beej's Guide to Unix IPC | Primary external | Covers pipes, shared memory, semaphores with worked examples. |
| LLNL POSIX Threads Programming | Primary external | Clear tutorial for pthread, mutexes, condition variables. |
| GDB Documentation (sourceware) | Primary external | Reference for Cluster 5. |
| Valgrind / perf / strace manuals | Primary external | Reference for Cluster 5. |
| CSAPP (Bryant & O'Hallaron) | Local support | Use for fork/exec, signals, virtual memory, memory mapping, and concurrency once the K&R or man-page pass is clear |
Resource Map by Cluster
Cluster 1: Processes and System Calls
| Need | Best local chunk or URL | Why |
|---|---|---|
| introduction to UNIX system interface | K&R 8.1: File Descriptors | The original, one-page framing. |
| conceptual OS boundary | Code: The Operating System (Part 1) | Petzold's gentle introduction to what the kernel does. |
fork, exec, wait reference | man 2 fork, man 3 exec, man 2 waitpid | Canonical signatures and error codes. |
| signals overview | man 7 signal | Full catalog of signals and default actions. |
| async-signal safety | man 7 signal-safety | The definitive async-signal-safe function list. |
Cluster 2: File Descriptors and I/O
| Need | Best local chunk or URL | Why |
|---|---|---|
| low-level I/O introduction | K&R 8.2: Read and Write | Minimal, correct, and historically foundational. |
open/creat/close/unlink | K&R 8.3 | Direct source material. |
open flags and error codes | man 2 open | Authoritative; read the O_CLOEXEC, O_APPEND, O_NONBLOCK sections. |
how FILE * is built on fds | K&R 8.5: Implementation of fopen and getc | Demystifies stdio in ~6 pages. |
| pipes in practice | Beej's Guide to Unix IPC: Pipes | Worked examples of pipe/dup2 with shell redirection. |
Cluster 3: Memory Management in Practice
| Need | Best local chunk or URL | Why |
|---|---|---|
| virtual memory mental model | COD 5.4: Virtual Memory | The hardware picture behind mmap. |
mmap reference | man 2 mmap | Authoritative; read MAP_SHARED vs MAP_PRIVATE carefully. |
| shared memory between processes | Beej's Guide to Unix IPC: Shared Memory | Small, practical, complete. |
| custom allocator source | K&R 8.7: A Storage Allocator | Canonical free-list implementation. |
| modern allocator design | jemalloc manual | Read after K&R to see how size-class allocators evolve the pattern. |
Cluster 4: Concurrency Primitives
| Need | Best local chunk or URL | Why |
|---|---|---|
| hardware view of parallelism | COD 7.2: Difficulty of Parallel Programs | Why concurrent programming is hard. |
| hardware-level sync instructions | COD 2.11: Parallelism and Synchronization | Atomic instructions at the ISA. |
pthread_create/join reference | man 3 pthread_create | Authoritative. |
| condition variables reference | man 3 pthread_cond_wait | The while-loop rule is explicit in the NOTES. |
| pthread tutorial | LLNL POSIX Threads Programming | Best free tutorial; worked examples. |
| acquire/release semantics | Preshing: Acquire and Release Semantics | Shortest clear explanation of memory ordering. |
Cluster 5: Sockets and Debugging Tools
| Need | Best local chunk or URL | Why |
|---|---|---|
| sockets tutorial | Beej's Guide to Network Programming | The canonical free sockets tutorial. |
socket/bind/listen/accept reference | man 2 socket, man 2 bind, man 2 accept | Authoritative signatures and errors. |
| TCP behavior | man 7 tcp | Socket options, states, behavior. |
| gdb | GDB User Manual | Reference. |
| perf | Brendan Gregg: perf Examples | Best practical guide to real-world perf usage. |
| valgrind | Valgrind User Manual | Reference for memcheck and callgrind. |
Note on CSAPP
Computer Systems: A Programmer's Perspective is now part of the local Semester 4 library. Use its Chapter 8 chunks for fork/exec/wait and signals, Chapter 9 for mmap and virtual memory, and Chapter 12 for threads and synchronization.