- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between process and program?
To begin with, let us learn about the process.
Process
A process is a program in execution and it is more than a program code called a text section and this concept works under all the operating systems because all the tasks performed by the operating system needs a process to perform the task.
A process also known as one type of activity and it is used in the computer for a particular purpose and a number of states involved in this concept.
A process is one type of state and the state of a process is defined in part by the help of different activity and a process has different types of a state.
A process includes the process stack which contains the following −
Temporary data like function parameters, return address, local variables.
Data section contains global variables.
Heap which is a memory dynamically allocated during process runtime.
The process is represented below −
Stack |
- - - |
Heap |
Data |
text |
Max
Program
A program by itself is not a process. A program is a passive entity such as a file which contains a list of instructions stored on a disk often called an executable file.
A process is an active entity with a program counter specifying the next instruction to execute and a set of associated resources.
A program becomes a process when an executable file is loaded into memory.
Differences
The major differences between program and process in the form a table are as follows −
Program | Process | |
---|---|---|
Consists of | Instructions in any programming language | Instructions in machine code |
FS | Static object | Dynamic object |
Resides in | Secondary storage | Main memory |
Span of time | Unlimited | Limited |
Entity | Passive | Active |