InterviewBiz
← Back
Process vs Thread
software-engineeringmedium

Process vs Thread

MediumCommonMajor: software engineeringmeta, uber, netflix

Concept

A process is an executing program with its own address space. A thread is a lighter execution unit that shares its process’s memory.

Differences

AspectProcessThread
Address SpaceOwn (isolated)Shared within process
Creation CostHigher (fork/exec)Lower
Context SwitchHeavierLighter
CommunicationIPC neededShared memory; sync primitives required
Fault IsolationBetterWeaker (one thread can corrupt others)

Interview Tips

  • Call out race conditions and need for locks, mutexes, atomic ops.
  • Mention scalability: many threads per process; CPU-bound vs I/O-bound.

Reference

Source: InterviewBit OS/CS interview topics.