Reference and Selective Reading
You do not need to read the source books front-to-back for this module. Use the concept pages and practice pages first. Open these local chunks and external URLs only when you need alternate exposition, more worked examples, or the canonical reference for a specific syscall.
Source Roles
| Source | Role | Why it is here |
|---|---|---|
| The C Programming Language (K&R) | Primary teaching source | Chapter 8 is the only book chapter in the local library that directly teaches the UNIX system interface. |
Linux man pages (man7.org) | Primary external reference | The authoritative specification for every syscall. The RETURN VALUE and ERRORS sections are not optional reading. |
| Beej's Guide to Network Programming | Primary external tutorial | The definitive free socket-programming tutorial. |
| Beej's Guide to Unix IPC | Primary external tutorial | Worked examples of pipes, shared memory, and semaphores. |
| LLNL POSIX Threads | Primary external tutorial | Clear and current pthread introduction. |
| Computer Organization and Design (Patterson & Hennessy) | Selective support | Chapter 5.4 (virtual memory) and Chapter 7 (parallelism) provide hardware context. |
| Code (Petzold) | Background | Chapters 25-26 are excellent for the conceptual picture of peripherals and the OS boundary. |
| SICP | Peripheral | Not used in this module. |
| CSAPP (Bryant & O'Hallaron) | Local support | The best local second source for exceptional control flow, virtual memory, and concurrent programming |
Read Only If Stuck
Cluster 1: Processes and System Calls
- K&R 8.1: File Descriptors
- K&R 8.2: Low-Level I/O -- Read and Write
- K&R 7.6: Error Handling -- stderr and exit
- Code: The Operating System (Part 1)
- Code: The Operating System (Part 3)
- Code: The Operating System (Part 4)
- Man pages: intro(2), fork(2), exec(3), waitpid(2), signal(7), signal-safety(7), sigaction(2)
Cluster 2: File Descriptors and I/O
- K&R 8.1: File Descriptors
- K&R 8.2: Read and Write
- K&R 8.3: open, creat, close, unlink
- K&R 8.5: Implementation of fopen and getc
- K&R 8.6: Listing Directories
- Code: Peripherals (Part 1)
- Code: Peripherals (Part 3)
- Man pages: open(2), read(2), write(2), lseek(2), pipe(2), dup(2), fcntl(2)
- External: Beej's Guide to Unix IPC: Pipes
Cluster 3: Memory Management in Practice
- K&R 8.7: A Storage Allocator
- K&R 5.4: Address Arithmetic
- COD 5.4: Virtual Memory (Part 1)
- COD 5.4: Virtual Memory (Part 2)
- COD 7.3: Shared-Memory Multiprocessors
- Man pages: mmap(2), munmap(2), msync(2), shm_open(3), malloc(3), brk(2)
- External: Beej's Guide to Unix IPC: Shared Memory, jemalloc manual
Cluster 4: Concurrency Primitives
- COD 2.11: Parallelism and Synchronization
- COD 2.11 (Part 2)
- COD 7.2: Difficulty of Parallel Programs
- COD 7.3: Shared-Memory Multiprocessors
- COD 5.8: Cache Coherence
- Man pages: pthread_create(3), pthread_join(3), pthread_mutex_lock(3p), pthread_cond_wait(3p), pthread_cond_signal(3p)
- External: LLNL POSIX Threads Programming, cppreference:
<stdatomic.h>, Preshing: Acquire and Release Semantics
Cluster 5: Sockets and Debugging Tools
- K&R 8.2: Low-Level I/O -- the short-transfer loop pattern transfers directly to
send/recv - COD 6.5: Connecting Processors, Memory, and I/O Devices
- COD 1.4: Performance
- Man pages: socket(2), bind(2), listen(2), accept(2), connect(2), send(2), recv(2), tcp(7), gdb(1), core(5), strace(1), perf(1)
- External: Beej's Guide to Network Programming, GDB User Manual, Brendan Gregg: perf Examples, Valgrind User Manual, Callgrind Manual
Note on CSAPP
The local Semester 4 library now includes Computer Systems: A Programmer's Perspective. For Cluster 1 and Cluster 4 especially, prefer its Chapter 8 chunks on fork/exec/wait and signals and its Chapter 12 chunks on threads and synchronization before reaching for a secondary external source.