Process concept

Program which is under execution is known as process.

Two conditions for process

  1. It has to reside in the main memory
  2. It should occupy the CPU, means should be using or used by any resource of CPU.

Attributes of process:

  1. Process ID
  2. Process State
  3. Program Counter
  4. Priority
  5. General purpose register
  6. List of open files
  7. List of open devices
  8. Protection information

Description about process attributes is given below

1. Process ID:

Process ID is a unique identification number which is organized by the OS at the time of process creation.

2. Process state:

Process state contains the current state information of the process where it is residing.

3. Program Counter:

Program counter contains the address of the next instruction to be expected.

4. Priority:

Priority is a parameter which is assigned by the OS, at the time of process creation.

5. General purpose registers:

General purpose registers contains registers information used by the process in order to execute the instructions.

6. List of open files:

In this information is stored about the files which are open by the process during execution.

7. List of open devices:

The devices which are opened by the process in execution.

8. Protection Information:

Security information related to currently executing process is stored here.

  • All the above process attributes is known as context of the process.
  • Context of the process will be stored in PCB.
  • PCB stands for process control block.
  • Every process will have its own PCB.
  • PCB of the process will be stored in main memory.

Process with respect to execution time are of two types:

  1. CPU Bound Processes.
  2. Input Output Bound Processes.

1. CPU Bound Process:

The process which require more CPU time is known as CPU Bound Processes. They spend more time in running state.

2. Input Output Bound Process:

The process which requires more input output time are known as Input Output Bound Process. They spend more time in waiting state.