- 2072 Magh · 1+3 marks
What is process; process vs thread
Short answer
A process is a program in execution with its own resources and address space. Threads are lightweight execution units within a process, sharing the address space and resources, which makes creation and context switching cheaper than for processes.
What is a process? Differentiate between process and thread.
A process is a program in execution: an active entity that includes the program code, program counter, registers, stack, data and the resources (open files, address space) allocated to it. The OS keeps its details in a process control block.
Process vs thread
A thread is a lightweight process: the basic unit of CPU utilization within a process.
| Basis | Process | Thread |
|---|---|---|
| Definition | Program in execution, a resource owner | Unit of execution inside a process |
| Address space | Own address space | Shares the address space of its process |
| Resources | Own files, memory, I/O | Shares them; has only its own stack, registers and PC |
| Creation and switching cost | High | Low |
| Communication | Through IPC (slow) | Through shared memory (fast) |
| Independence | Independent, protected | Dependent; one thread can affect others |
| Example | Two separate programs, such as a browser and a text editor | The typing, spell-check and auto-save threads inside one word processor |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Process vs thread; multithreading advantages · Operating System, chapter 2
- Process vs thread; context switching · Operating System, chapter 2
- Process vs thread; user and kernel threads · Operating System, chapter 2
- Preemptive vs non-preemptive; process states · Operating System, chapter 2
- Process vs thread and task states · Embedded System, chapter 6
- Process versus thread differences · Embedded System, chapter 6 · asked 4×
- Instruction, thread, process level parallelism · Microprocessor, chapter 6
- Process vs threads; importance in DS · Distributed System, chapter 3 · asked 3×