Process
  • the process is a program running in the computer system.
  • A program method could be a program in execution.
  • A program is an entity to which processors are assigned.
  • A program is executed is called a process.
  • A process is more than program code.
  • A process is not the same as the program.

Process state

A process executes, it changes state. The state of a method is outlined because of the current activity of that method.

The process state contains five states. The states are:-
  • New state.
  • Ready state.
  • Running state.
  • Suspended or waiting or blocked state.
  • Terminated state.
state-of-process
state of process

  • New state

The process is being created.

  • Ready state

There are many processes in the memory which may want to execute but there is one processor that can execute only one process at a time. So, other processes much have, to wait for the allocation of processors. A process that is ready to execute by the processor is said to be in a ready state.

OR
The process is waiting to be allotted to a processor.

  • Running state

The CPU is currently allocated to the process and the process is in execution.

OR
Instruction is being executed.

  • Suspended or waiting or blocked state

A process is in a suspended state or waiting state or blocked state when it lacks some resource other than the CPU. Such processes are not executed until the required suspending condition are not fulfilled.
OR
The process is looking forward to some events to occur.

  • Terminated state

The process has finished execution.

OPERATIONS ON PROCESSES

  • The operating system that manages processes must be able to perform certain operations on processes.
The main operation that can be performed on a process are:-
  • Process creation
  • Process execution.
  • Process termination.

1.  Process creation

First, the process is created. For creating a process involves the following operation:-
  • Name the process
  • Insert it in the system list
  • Create the PCB
A process may generate one or more processes during execution. The making method is termed the Parent method. And the created method is termed a baby method.

OPERATION-ON-PROCESS
Each of the children proceed may create other processes.


The subprocess maybe obtain in two ways:-
  1. Directly from the operating system.
  2. The parent could get to partition its resources among its youngsters.

2.  Process execution

After the process created process is ready for execution.

3.  Process termination

Process termination is done after the process executes its last statement and asks the operating system to delete it or exit.
The process termination can be done in the following condition
  • Normal exit.
  • Error exit.
  • Fatal exit.
  • Killed by another process.

4.  The other operation is:-

  • Destroy a process.
  • Suspended a process.
  • Reset a process.
  • Get process information.
  • Wake up a process.
  • Set process information.