• Home
  • Testing
  • SAP
  • Web
  • Must Learn!
  • Big Data
  • Live Projects
  • AI
  • Blog

What is a Program?

A program is an executable file which contains a certain set of instructions written to complete the specific job on your computer. For example, Google browser chrome.exe is an executable file which stores a set of instructions written in it which allow you to view web pages.

Programs are never stored on the primary memory in your computer. Instead, they are stored on a disk or secondary memory on your PC or laptop. They are read from the primary memory and executed by the kernel.

In this tutorial, you will learn

What is a Process?

A process is an execution of any specific program. It is considered an active entity that actions the purpose of the application. Multiple processes may be related to the same program.

For example, If you are double click on your Google Chrome browser icon on your PC or laptop, you start a process which will run the Google Chrome program. When you open another instance of Chrome, you are essentially creating a two process.

Features of Program

  • A program is a passive entity. It stores a group of instructions to be executed.
  • Various processes may be related to the same program.
  • A user may run multiple programs where the operating systems simplify its internal programmed activities like memory management.
  • The program can't perform any action without a run. It needs to be executed to realize the steps mentioned in it.
  • The operating system allocates main memory to store programs instructions.

Features of Process

  • A process has a very limited lifespan
  • They also generate one or more child processes, and they die like a human being.
  • Like humans, even process has information like who is a parent when it is created, address space of allocated memory, security properties which includes ownership credentials and privileges.
  • Processes are allocated system resources like file descriptors and network ports.

Program Vs. Process

Some significant difference between program and process are given below:

Parameter Process Program
Definition An executing part of a program is called a process. A program is a group of ordered operations to achieve a programming goal.
Nature The process is an instance of the program being executing. The nature of the program is passive, so it's unlikely to do to anything until it gets executed.
Resource management The resource requirement is quite high in case of a process. The program only needs memory for storage.
Overheads Processes have considerable overhead. No significant overhead cost.
Lifespan The process has a shorter and very limited lifespan as it gets terminated after the completion of the task. A program has a longer lifespan as it is stored in the memory until it is not manually deleted.
Creation New processes require duplication of the parent process. No such duplication is needed.
Required Process Process holds resources like CPU, memory address, disk, I/O, etc. The program is stored on disk in some file and does not require any other resources.
Entity type A process is a dynamic or active entity. A program is a passive or static entity.
Contain A process contains many resources like a memory address, disk, printer, etc. A program needs memory space on disk to store all instructions.

Summary

  • A program is an executable file which contains a particular set of instructions written to complete the specific job on your computer
  • A process is an execution of any specific program
  • A process has a very limited lifespan
  • A program is a passive entity
  • Various processes may be related to the same program

 

YOU MIGHT LIKE: