Difference Between Program and Process in Operating System (OS)
Program Vs Process in Operating System
A program is a system activity which uses a set of instruction to perform a designated task. It is considered as a passive entity as it resides on secondary memory. The resource requirement is less as it only requires memory for storage. The program performs tasks that are directly related to the operations of a user. For example, notepad.exe is an executable file having a set of instructions which help users to print and edit text files. When the user executes the program, it converts into the process.
A process is an executing instance of a program. A process is entirely dependent on the program. It is considered as an active entity as it resides on the primary memory. It requires resources like processing, memory address, CPU, input and output resources to perform the task. For example, a user can run multiple instances of Microsoft Word program.
Difference between Program and Process
|A process is a program in execution||A program is a set of instructions|
|A process is an active/dynamic entity||A program is a passive/static entity|
|A process has a limited life span. It is created when execution starts and terminates when execution is finished||A program has a longer life span. It is stored on the hard disk in the computer.|
|A process contains memory address which is called address space||A program requires memory space on disk to store all instructions|
- Banker’s Algorithm
- bankers algorithm for deadlock avoidance in c (in above post itself)Resource Allocation Graph (RAG)
- Dining Philosopher’s Problem
- Bounded Buffer Problem / Producer Consumer Problem
- User Level thread Vs Kernel Level thread
- Multithreading models
- Difference between program and process