Difference between Program and Process

By | September 10, 2021

Definition of Process

  • In most systems, a process is a unit of work done.
  • A process is a set of sequential steps that are required to do a particular task.
  • A process is an instance of a program in execution.

Process -  Definition, Concept, States and State Transition

  • For example, in the windows environment, if we edit two text files, simultaneously, in notepad, then it means we are implementing two different instances of the same notepad program. For an operating system these two instances are separate processes of the same application.
  • A process needs certain resources such as CPU time, memory files, and I/O devices to accomplish its task. These resources are allocated to the process either when it is created or while it is executing.
  • A process can be identified in an operating system environment by its following components :
  1. The object program (or code) to be executed.
  2. The data on which the program will execute (obtained from a file or interactively from the user of the process).
  3. The status of the process execution.
  4. The resources that a process is utilizing.

Process and Program

  • A process is not same as program. A program is a passive entity whereas a process is an active entity.
  • A program is an algorithm expressed in some suitable notation and is only a part of a process i.e. it can be just a file stored on a disk, file on a paper or even as a conceptual idea in the mind of an individual.

Process -  Definition, Concept, States and State Transition

 

  • A process on the other hand is an activity of some kind. It uses a program, has input/output and a state. Beside including instructions to be executed a process also includes :
  1. temporary data such as subroutine parameters
  2. return address
  3. variables (stored on the stack)
  4. program counter value
  • Thus, a program is a static entity that only contains the instructions to be executed by a processor whereas, a process is a dynamic entity as it performs actions as prescribed by the program. A program does not perform any action by itself.

Difference between Program and Process

S. No. Program Process
1. A program is a passive entity.  A process is an active entity.
2. A program is a set of instructions that are executed by a processor. A process is an instance of a program in execution.
3. A program is static in nature as it does not perform action by itself.  A process is dynamic in nature as it performs  actions as prescribed by a program.
4. A program is composed of data and the instructions (code) to manipulate that data. A process consists of a number of components.  Besides using program, a process also includes  temporary data such as subroutine parameters, return address, variables (stored on stack) and program counter.
5.  A program does not change itself.  As a process executes it change its state.

Leave a Reply

Your email address will not be published. Required fields are marked *