Video lesson: Processes, Threads, and the Cost of Sharing
Lesson promise
By the end, the learner should be able to explain the core model for processes, threads, and the cost of sharing, apply it to a concrete input, and identify when its usual shortcut or guarantee stops applying. This is a recording brief; publish it as a playable lesson after the narration and visual sequence have been produced and reviewed.
Narration draft
A process is a protected resource container with an address space and operating-system-managed resources. A thread is an execution stream with its own program counter, registers, and stack. Threads in one process normally share code and heap memory, which makes communication cheap but coordination necessary.
When a thread blocks on I/O, the scheduler may run another runnable thread. A context switch saves enough state to resume later and changes which execution stream receives CPU time. Creating a thread does not guarantee it runs immediately; scheduling policy, contention, and available cores influence when it progresses.
Threads share mutable state, so unsynchronized access can produce races even on a single core through interleaving. Processes provide stronger isolation but require explicit communication and often more setup. More threads can increase context switching, memory use, and contention instead of increasing throughput.
Visual sequence
- Put the input and assumptions on screen. Ask the learner to predict the next state before revealing it.
- Animate the representation and show the operation one transition at a time.
- Pause at the boundary case in the companion article and compare the result with the invariant.
- End with the exercise prompt: A server creates one thread per connection and suddenly slows down under a large idle-client load. Name two resource costs and one alternative concurrency model to evaluate.
Companion material
Use the article, trace, and interactive concept flow as the learner’s written and visual references. The video remains planned until an actual playable media URL and reviewed transcript are available.
Related articles
Processes, Threads, and the Cost of Sharing
A process is a protected resource container with an address space and operating-system-managed resources.
Latency, Throughput, and the Cost of Coordination
Every system design trade-off is ultimately a balance between doing work fast, doing work often, and paying the cost of making multiple components agree.
What Is a Software System?
A system is not a single program — it is components with boundaries, responsibilities, and failure modes. Learn how to see the box before you design inside it.
New lessons by email
Get new articles and notes on the systems behind everyday software.
One technical dispatch per week. No noise.
Not started
Sign in to save your learning progress.