1. Program :
When we execute a program that was just compiled, the OS will generate a process to execute the program. Execution of the program starts via GUI mouse clicks, command line entry of its name, etc. A program is a passive entity as it resides in the secondary memory, such as the contents of a file stored on disk. One program can have several processes.
2. Process :
The term process (Job) refers to program code that has been loaded into a computer’s memory so that it can be executed by the central processing unit (CPU). A process can be described as an instance of a program running on a computer or as an entity that can be assigned to and executed on a processor. A program becomes a process when loaded into memory and thus is an active entity.
Difference between Program and Process :
|1.||Program contains a set of instructions designed to complete a specific task.||Process is an instance of an executing program.|
|2.||Program is a passive entity as it resides in the secondary memory.||Process is a active entity as it is created during execution and loaded into the main memory.|
|3.||Program exists at a single place and continues to exist until it is deleted.||Process exists for a limited span of time as it gets terminated after the completion of task.|
|4.||Program is a static entity.||Process is a dynamic entity.|
|5.||Program does not have any resource requirement, it only requires memory space for storing the instructions.||Process has a high resource requirement, it needs resources like CPU, memory address, I/O during its lifetime.|
|6.||Program does not have any control block.||Process has its own control block called Process Control Block.|
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between Process Image and Multi Thread Process image
- Difference between Process and Thread
- Difference between Product and Process
- Formation Of Process from Program
- Difference between Process and Kernel Thread
- Difference between process.nextTick() and setImmediate() Methods
- Difference between Process and User Level Thread
- Process Table and Process Control Block (PCB)
- Process states and Transitions in a UNIX Process
- Pass the value from child process to parent process
- Difference between Software Engineering process and Conventional Engineering Processs
- Process Scheduler : Job and Process Status
- Difference between Thread Context Switch and Process Context Switch
- Difference between Program and Product
- Difference between Program and Project
- Difference between Algorithm, Pseudocode and Program
- Reversal process in DFA
- Progress of a process
- Process Synchronization | Set 2
- Complementation process in DFA
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : pp_pankaj