A program and a process are related terms. The major difference between program and process is that program is a group of instructions to carry out a specified task whereas the process is a program in execution. While a process is an active entity, a program is considered to be a passive one.
- A program is a definite group of ordered operations that are to be performed. On the other hand, an instance of a program being executed is a process.
- The nature of the program is passive as it does nothing until it gets executed whereas a process is dynamic or active in nature as it is an instance of executing program and perform the specific action.
- A program has a longer lifespan because it is stored in the memory until it is not manually deleted while a process has a shorter and limited lifespan because it gets terminated after the completion of the task.
- The resource requirement is much higher in case of a process; it could need processing, memory, I/O resources for the successful execution. In contrast, a program just requires memory for storage.
- Program does not have any control block. Process has its own control block called Process Control Block.
Multiple processes can be related to the same program. It handles the operating system activities through
PCB (Process control Block) which includes program counter, stack, state etc. Program counter stores the next sequence of instruction that is to be executed later.