Operating Systems · Revision notes

Process & Thread Management

A process is a program in execution with its own address space and a PCB; threads are lightweight units of execution inside a process. This chapter covers process states and transitions, the PCB, fork/exec/wait, threads vs processes, user vs kernel threads and context switching cost.

Quick revision

  • States: New, Ready, Running, Waiting, Terminated; Waiting→Ready not Running
  • fork returns 0 in child, PID in parent; n forks → 2^n processes
  • Zombie = finished but not reaped; orphan = parent died
  • Context switch is pure overhead; overhead ≈ s/(q+s)
  • Threads share code/data/heap/files; private stack/registers/PC
  • ULT cheap but block-all; KLT parallel but costlier
Read the full Process & Thread Management notes on Doubtclip →