← Operating Systems learning pathOperating Systems · Module 2 of 10
Processes and threads
Understand running programs and their lifecycle.
📖 Key ideas
- A process is a program in execution with its own memory.
- States: new, ready, running, waiting, terminated.
- The PCB (Process Control Block) stores process info.
- Threads are lightweight units within a process sharing memory.
- 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