Skip to main content

Learning Resources

This module is populated from the local chunked books in library/raw/semester-05-os-networking/books and a small, curated set of external resources. Use this page as a source map, not as an instruction to read everything.

Source Stack

BookRoleHow to use it in this module
Operating Systems: Three Easy Pieces (OSTEP)Primary teaching sourceDefault escalation for threads, locks, condition variables, semaphores, classic problems, and deadlock
Operating System Concepts (Silberschatz)Selective supportUse when you want a more formal and textbook-style treatment, especially of the critical-section problem, monitors, and deadlock conditions
Unix Network Programming (Stevens)Selective supportUse for pthreads API details, race-condition case studies, and cross-process synchronization idioms

Resource Map by Cluster

Cluster 1: The Race Condition Problem

NeedBest local chunkWhy
what threads and shared state areOSTEP 26: Concurrency - An IntroductionBest first framing of shared state
thread creation in practiceOSTEP 26.1: An Example, Thread CreationConcrete pthread example
why shared data makes things worseOSTEP 26.2: Why It Gets Worse - Shared DataThe canonical counter example
scheduling as the root of racesOSTEP 26.3: The Heart of the ProblemBest explanation of why races exist
concurrency terminologyOSTEP: Key Concurrency TermsCompact glossary
critical section formalismOSC 6.2: The Critical-Section ProblemFormal statement of mutex/progress/bounded-wait
race condition case studyUNP: Race Conditions (Part 1)Real network-programming context
hardware atomicsOSTEP 28.6: Test-And-Set (Atomic Exchange)Introduces TAS and why it matters

Cluster 2: Locks and Mutual Exclusion

NeedBest local chunkWhy
pthread lock basicsOSTEP 27.3: LocksAPI-first introduction
what a lock isOSTEP 28.1: Locks - The Basic IdeaCorrectness obligations named
test-and-setOSTEP 28.6: Test-and-SetMinimal spinlock derivation
building a spin lockOSTEP 28.7: Building a Working Spin LockBest constructive explanation
LL/SC and CASOSTEP 28.10: Load-Linked / Store-ConditionalAlternate hardware primitive
fetch-and-add and ticket locksOSTEP 28.11: Fetch-and-AddFair-lock foundation
when to sleep instead of spinOSTEP 28.14: Using Queues - Sleeping Instead of SpinningWhy blocking mutexes exist
adaptive mutexOSTEP 28.16: Two-Phase LocksPractical production pattern
pthread mutex detailsUNP: Mutexes - Mutual ExclusionAPI and patterns
concurrent counterOSTEP 29.1: Concurrent CountersFirst data-structure case
concurrent listOSTEP 29.2: Concurrent Linked ListsHand-over-hand locking
concurrent hash tableOSTEP 29.4: Concurrent Hash TableStriping in practice

Cluster 3: Coordination Primitives

NeedBest local chunkWhy
condvar APIOSTEP 27.4: Condition Variablespthread introduction
condvar semanticsOSTEP 30.1: Definition and RoutinesFormal behavior
classic bounded bufferOSTEP 30.2: Producer-Consumer (Part 1)Canonical design walk-through
buffer evolution and signal/broadcastOSTEP 30.2: Producer-Consumer (Part 2)Why two condvars, why signal vs broadcast
when broadcast is neededOSTEP 30.3: Covering ConditionsThe motivating example
semaphore initOSTEP 31.1 FigureCounting semaphore usage
semaphores as condvarsOSTEP 31.3Strengths and limits of semaphores
semaphore bounded bufferOSTEP 31.4Alternate solution to the canonical problem
monitor usageOSC 6.7.1: Monitor UsageFormal monitor construct
Java monitorsOSC 7.4.1: Java MonitorsLanguage-integrated version
condition variable theoryOSC 7.4.4: Condition VariablesMesa semantics explained
UNP condvar + IPCUNP: Condition VariablesAPI-level reference

Cluster 4: Classic Concurrency Problems

NeedBest local chunkWhy
readers-writersOSTEP 31.5: Reader-Writer LocksReference implementation
dining philosophersOSTEP 31.6: The Dining PhilosophersCanonical deadlock example
summary of classic problemsOSTEP 31.8: SummaryShort recap

Cluster 5: Lock-Free and Modern Concurrency

NeedBest local chunkWhy
common concurrency bugs taxonomyOSTEP 32: Common Concurrency ProblemsEmpirical bug classification
non-deadlock bugsOSTEP 32.2: Non-Deadlock BugsAtomicity-violation and order-violation
deadlock bugsOSTEP 32.3: Deadlock BugsThe four-condition analysis
conditions for deadlockOSTEP: Conditions for DeadlockCoffman's conditions
deadlock methods overviewOSC Chapter 8: DeadlocksPrevention / avoidance / detection
formal necessary conditionsOSC 8.3.1: Necessary ConditionsStandard textbook treatment
handling deadlockOSC 8.4: Methods for Handling DeadlocksStrategy comparison
event-based concurrency motivationOSTEP 33.3: Using selectWhere event loops came from
state management in asyncOSTEP 33.7: State ManagementWhy single-threading does not remove all bugs

External Resources

Treat these as escalation only. Use them when the local chunks do not answer the specific question you have.

Memory Model and Lock-Free

Official API Documentation

Async / Event-Loop

Use Rules

  • If you are stuck on the core mechanics, go to OSTEP first.
  • If you need a more formal textbook treatment (critical-section theorem, monitor formal semantics, Coffman conditions as a theorem), go to Operating System Concepts.
  • For exact pthread API behavior, consult the man pages (man 3 pthread_mutex_lock) or UNP chunk references.
  • For memory ordering and lock-free, the preshing articles and the GCC docs are the shortest path to correctness.
  • Do not read any chunk by default; open one chunk for one gap.