Program:
- It is a passive entity, it’s a static object that can exist in a file.
- It contains the instructions or an algorithm to be executed.
- A program exists in a single space and continues to exist as time goes forward.
Process:
- It is a dynamic entity that is a program under execution in main memory is called process.
- It is a sequence of instructions under execution.
- A process exists in a limited period time.
Example:
main() { int i, prod =1; for( i =0;i <100; i++) prod = prod * i }
Here program contains one multiplication( prod = prod * i) where as a process executes 100 multiplications that is for each loop.
Difference between a Process and a Program:

Related Posts:
- Sections of a process
- States of a process
- Process Data structure (PCB)
- Attributes of a process
- Context switching
- Termination of a process
Categories: Operating system (OS)
Leave a Reply