← Operating Systems learning path
Operating Systems · Module 2 of 10

Processes and threads

Understand running programs and their lifecycle.

📖 Key ideas

  1. A process is a program in execution with its own memory.
  2. States: new, ready, running, waiting, terminated.
  3. The PCB (Process Control Block) stores process info.
  4. Threads are lightweight units within a process sharing memory.
  5. Context switching saves and restores CPU state.
💡 Real-life example: A process is a restaurant kitchen; threads are cooks sharing that kitchen.
ProcessProgram in execution
ThreadLightweight execution unit
PCBProcess Control Block
Context switchSwitching the CPU between processes