Difference Between Program and Process in Operating System

Program Vs Process in Operating System

Difference Between Program and Process in Operating System

Program

  • program is a system activity that uses a set of instructions to perform a designated task.
  • It is considered 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 that helps users to print and edit text files. When the user executes the program, it converts into the process.

Process

  • A process is an executing instance of a program.
  • In other words, the process is a program in execution
  • A process is entirely dependent on the program
  • It is considered an active entity as it resides on the primary memory. (RAM)
  • 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 in Operating System

ProgramProcess
A program is a set of instructions, written to complete some taskA process is a program in execution
A program is a passive/static entityA process is an active/dynamic entity
A program resides in secondary memory. (Internal/external storage Disks)A process is currently executing thus has to be in Primary Memory (RAM)
A program has a longer life span. It is stored on the hard disk in the computer. A process has a limited life span. It is created when execution starts and terminates when execution is finished
A program only requires memory space to store itselfA process needs execution time in CPU, I/O requirements, shared resources, files, memory addresses and others
There is no Control Block in programProcess has its own control block called as Process Control Block (PCB)
A Program can not change it by itselfMany Processes can be working/using same program and change the program in realtime. This is why we need concurrency make sure critical section of program are not changed.
Code and data(files) are the only two logical components of a programProcess needs program data, priority, resources, process management, execution strategy chosen by CPU and many other things
Program doesn’t have any significant overheadProcess generally has a significant overhead
New processes require
duplication of the parent process.
No such duplication is needed.

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription