Skip to main content

Process vs thread; multithreading advantages

Short answer

A process is a heavyweight entity with its own address space, while a thread is a lightweight unit sharing the process's resources. Multithreading improves responsiveness, resource sharing, economy, multiprocessor utilization, and simplifies concurrent programming.

a) Differentiate between process and thread. Explain the advantages of multithreading.

Process vs thread

A process is a program in execution with its own address space and resources. A thread is a lightweight unit of execution within a process; threads of one process share its code, data and open files but have their own program counter, registers and stack.

BasisProcessThread
WeightHeavyweightLightweight
Address spaceSeparate for each processShared by threads of the same process
Creation / switchingSlow, costlyFast, cheap
CommunicationNeeds IPC (pipes, messages)Directly through shared memory
ProtectionIsolated from other processesNo protection between threads
FailureOne process crash does not affect othersA faulty thread can kill the whole process

Advantages of multithreading

  • Responsiveness: the program continues (e.g. UI) while one thread is blocked or doing a long task.
  • Resource sharing: threads share memory and files, so no special IPC is needed.
  • Economy: creating and switching threads costs much less than processes.
  • Better use of multiprocessors: threads run in parallel on different CPUs (scalability).
  • Simpler program structure for concurrent tasks such as a web server serving many clients.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 2 questions →