What is process in Operating System ?


Process Concept:-

  • The process is the running program of the system.
  • Linux and Windows both are the multi-processes operating system.
  • The program doesn’t allocate memory but process allocate memory.
  • Every process allocates 4GB virtual memory.
  • The process is two types: –1)parent process 2) the Child process.
  • The process which is created another process is called the parent process and the created process is known as the child process
  • Parent and child process both are same but the process ID is different.
  • Informally, a process is a program in execution. A process is more than the program code, which is sometimes known as the text section. It also includes the current activity, as represented by the value of the program counter and the contents of the processor’s registers. In addition, a process generally includes the process stack, which contains temporary data (such as method parameters, return addresses, and local variables), and a data section, which contains global variables.
  • An operating system executes a variety of programs:

✦ Batch system – jobs

✦ Time-shared systems – user programs or tasks

  • Process – a program in execution; process execution must progress in a sequential fashion.
  • A process includes: program counter, stack,  data section

Process State

As a process executes, it changes state

  • New State: The process is being created.
  • Running State: A process is said to be running if it has the CPU, that is process actually using the CPU at that particular time.
  • Blocked (or waiting) State: A process is said to be blocked if it is waiting for some event to happen such that as an I/O completion before it can proceed. Note that a process is unable to run until some external event happens.
  • Ready State: A process is said to be ready if it needs a CPU to execute. A ready state process is runnable but temporarily stopped running to let another process run.
  • Terminated state: The process has finished execution.

What is the difference between process and program?

  • Both are the same beast with the different name or when this beast is sleeping (not executing) it is called the program and when it is executing becomes the process.
  • A program is a static object whereas a process is a dynamic object.
  • A program resides in secondary storage whereas a process resides in main memory.
  • The span time of a program is unlimited but the span time of a process is limited.
  • A process is an ‘active’ entity whereas a program is a ‘passive’ entity.
  • A program is an algorithm expressed in programming language whereas a process is expressed in assembly language or machine language.

Diagram of Process State



Leave a comment

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