Skip to main content

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

SourceRoleHow to use it in this module
The C Programming Language (K&R)PrimaryChapter 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)SelectiveChapter 5.4 for the virtual memory picture behind mmap; Chapter 7 for parallelism background.
Code (Petzold)BackgroundChapters 25-26 give an unusually lucid picture of peripherals and the OS boundary.
SICPPeripheralNot used directly in this module.
Linux man pages (man7.org)Primary externalThe authoritative reference for every syscall. Read the RETURN VALUE and ERRORS sections, always.
Beej's Guide to Network ProgrammingPrimary externalBest free tutorial for BSD sockets.
Beej's Guide to Unix IPCPrimary externalCovers pipes, shared memory, semaphores with worked examples.
LLNL POSIX Threads ProgrammingPrimary externalClear tutorial for pthread, mutexes, condition variables.
GDB Documentation (sourceware)Primary externalReference for Cluster 5.
Valgrind / perf / strace manualsPrimary externalReference for Cluster 5.
CSAPP (Bryant & O'Hallaron)Local supportUse 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

NeedBest local chunk or URLWhy
introduction to UNIX system interfaceK&R 8.1: File DescriptorsThe original, one-page framing.
conceptual OS boundaryCode: The Operating System (Part 1)Petzold's gentle introduction to what the kernel does.
fork, exec, wait referenceman 2 fork, man 3 exec, man 2 waitpidCanonical signatures and error codes.
signals overviewman 7 signalFull catalog of signals and default actions.
async-signal safetyman 7 signal-safetyThe definitive async-signal-safe function list.

Cluster 2: File Descriptors and I/O

NeedBest local chunk or URLWhy
low-level I/O introductionK&R 8.2: Read and WriteMinimal, correct, and historically foundational.
open/creat/close/unlinkK&R 8.3Direct source material.
open flags and error codesman 2 openAuthoritative; read the O_CLOEXEC, O_APPEND, O_NONBLOCK sections.
how FILE * is built on fdsK&R 8.5: Implementation of fopen and getcDemystifies stdio in ~6 pages.
pipes in practiceBeej's Guide to Unix IPC: PipesWorked examples of pipe/dup2 with shell redirection.

Cluster 3: Memory Management in Practice

NeedBest local chunk or URLWhy
virtual memory mental modelCOD 5.4: Virtual MemoryThe hardware picture behind mmap.
mmap referenceman 2 mmapAuthoritative; read MAP_SHARED vs MAP_PRIVATE carefully.
shared memory between processesBeej's Guide to Unix IPC: Shared MemorySmall, practical, complete.
custom allocator sourceK&R 8.7: A Storage AllocatorCanonical free-list implementation.
modern allocator designjemalloc manualRead after K&R to see how size-class allocators evolve the pattern.

Cluster 4: Concurrency Primitives

NeedBest local chunk or URLWhy
hardware view of parallelismCOD 7.2: Difficulty of Parallel ProgramsWhy concurrent programming is hard.
hardware-level sync instructionsCOD 2.11: Parallelism and SynchronizationAtomic instructions at the ISA.
pthread_create/join referenceman 3 pthread_createAuthoritative.
condition variables referenceman 3 pthread_cond_waitThe while-loop rule is explicit in the NOTES.
pthread tutorialLLNL POSIX Threads ProgrammingBest free tutorial; worked examples.
acquire/release semanticsPreshing: Acquire and Release SemanticsShortest clear explanation of memory ordering.

Cluster 5: Sockets and Debugging Tools

NeedBest local chunk or URLWhy
sockets tutorialBeej's Guide to Network ProgrammingThe canonical free sockets tutorial.
socket/bind/listen/accept referenceman 2 socket, man 2 bind, man 2 acceptAuthoritative signatures and errors.
TCP behaviorman 7 tcpSocket options, states, behavior.
gdbGDB User ManualReference.
perfBrendan Gregg: perf ExamplesBest practical guide to real-world perf usage.
valgrindValgrind User ManualReference 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.