- Asked 4/19
- 2071 Bhadra · 3 marks
- 2073 Magh · 4 marks
- 2074 Bhadra · 2 marks
- 2079 Asoj · 4 marks
Process versus thread differences
Short answer
A process holds its own memory space and resources; a thread is a lightweight unit sharing its parent process’s address space. Process creation and IPC are heavier; thread communication is direct via shared variables, and context switch is faster but isolation is weaker.
Differentiate between process and thread (give at least 4 to 6 differences).
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 resources.
| Point | Process | Thread |
|---|---|---|
| Definition | Independent program in execution | Lightweight path of execution within a process |
| Address space | Own separate memory space | Shares the memory (code, data, heap) of the process |
| Own resources | Own code, data, files, registers, stack | Own stack, registers and program counter only |
| Creation / termination | Slow, costly | Fast, cheap |
| Context switch | Slow (memory maps must be switched) | Fast (same address space) |
| Communication | Needs IPC (pipes, message queues, shared memory) | Direct, through shared variables |
| Isolation | Strong; one process crash does not affect others | Weak; one thread error can crash the whole process |
| Dependence | Independent | Depends on its parent process |
| Overhead | High | Low |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Process vs thread and task states · Embedded System, chapter 6
- Process vs thread; multithreading advantages · Operating System, chapter 2
- What is process; process vs thread · Operating System, chapter 2
- Instruction, thread, process level parallelism · Microprocessor, chapter 6
- Process vs thread; context switching · Operating System, chapter 2