The key difference between program and process is that program is the set of instructions whereas when these instructions are executed this is called process.
There are two terms in computer science that are considered to be same but they are not same. Program is the set of instructions that are given to computer that tells the computer what to do and how to do. The execution of these instruction is known as process. Both these terms are thought be same. Process is an active entity whereas program is passive entity. One program can have multiple process and one process can have many program.
When the program is made, set of instructions are performed to execute these instruction this is basically known as process. The operating system of a computer creates, schedules and also the terminates the processes. There are parent processes and child processes. Process control block is responsible for controlling the process operations in computer. Process control block contains all the crucial information of the process. Every process has its own process id, priority state, PWS and contents of CPU. Process control block is a kernel based data structure that uses there important features such as scheduling, dispatching, context save. Scheduling is the method of selecting the sequence of the process. Dispatching is process that sets up an environment for the process to be executed. Context save is a process that save the information. When you create the process, there is a system call for each process. A process is an isolated execution entity and it share data and information. Every process uses IPC that is inter-process communication which increases the number of system calls. The system that have more than one processor is known as a multiprocessing system. More than two processors are added to increase the power of computer. CPU have set of registers the process is stored in these registers.
For example if the process of addition of two numbers is made the integers will be saved in registers and the addition of number is also stored in a register. If there will be more than one process, there will be more registers than if one processor will do work and other will be free in this way power of the computer is increased. There are types of processors such as symmetric multiprocessing and asymmetric multiprocessing. If we talk about symmetric multiprocessing, in symmetric multiprocessing the processor is free to run and can run any process whereas in the case of multithreading there is a master-salve relationship. In multiprocessing, there is an integrated memory controller that job of the integrated memory controller is to add more memory.The system run when set of instructions are given to the system these set of instructions is known as program. In batch processing system these instructions are set to be executing jobs whereas in real time operating system that we use mostly is known as task that are also known as program. In operating system multiple program can run. A program is called passive entity it is known as passive entity because it doesn’t perform any action by itself. There is an address space of a program that has instructions, data and stack.
Comparison Chart
Basis | Program | Process |
Meaning | Program is the set of instructions | When these instructions are executed this is called process. |
Nature | Nature of program is passive | Nature of process is active |
Lifespan | Lifespan of program is longer | Lifespan of process is less than process |
Resource | Program is stored on disk | Process hold resources such as CPU |
What is Program?
The system run when set of instructions are given to the system these set of instructions is known as program. In batch processing system these instructions are set to be executing jobs whereas in real time operating system that we use mostly is known as task that are also known as program. In operating system multiple program can run. A program is called passive entity it is known as passive entity because it doesn’t perform any action by itself. There is an address space of a program that has instructions, data and stack.
What is Process?
When the program is made, set of instructions are performed to execute these instruction this is basically known as process. The operating system of a computer creates, schedules and also the terminates the processes. There are parent processes and child processes. Process control block is responsible for controlling the process operations in computer. Process control block contains all the crucial information of the process. Every process has its own process id, priority state, PWS and contents of CPU. Process control block is a kernel based data structure that uses there important features such as scheduling, dispatching, context save. Scheduling is the method of selecting the sequence of the process. Dispatching is process that sets up an environment for the process to be executed. Context save is a process that save the information. When you create the process, there is a system call for each process. A process is an isolated execution entity and it share data and information. Every process uses IPC that is inter-process communication which increases the number of system calls. The system that have more than one processor is known as a multiprocessing system.
More than two processors are added to increase the power of computer. CPU have set of registers the process is stored in these registers. For example if the process of addition of two numbers is made the integers will be saved in registers and the addition of number is also stored in a register. If there will be more than one process, there will be more registers than if one processor will do work and other will be free in this way power of the computer is increased. There are types of processors such as symmetric multiprocessing and asymmetric multiprocessing. If we talk about symmetric multiprocessing, in symmetric multiprocessing the processor is free to run and can run any process whereas in the case of multithreading there is a master-salve relationship. In multiprocessing, there is an integrated memory controller that job of the integrated memory controller is to add more memory.
Key Differences between Program and Process
- Program is the set of instructions whereas when these instructions are executed this is called process.
- Nature of program is passive whereas nature of process is active.
- Lifespan of program is longer whereas lifespan of process is less than process.
- Program is stored on disk whereas process hold resources such as CPU.
Conclusion
In this article above we see the clear difference between program and process with examples.