Process Management


A program does nothing unless its instructions are executed by a CPU. A program in execution is called a process. In order to accomplish its task, process needs the computer resources.

Attributes of a Process
The attributes of the process are used by the operating system to create the process control block (PCB) for each of them:
  1. Process ID: When a process is created, a unique ID is assigned to the process.

  2. Program counter: A program counter stores the address of the last instruction of the process on which the process was suspended. The CPU uses this address when the execution of this process is resumed.

  3. Process state: The process, from its creation to the completion, goes through various states.

  4. Priority: Every process has its own priority. The process with the highest priority among the processes gets the CPU first.
  1. General purpose registers: Every process has its own set of registers which are used to hold the data which is generated during the execution of the process.

  2. List of open files: During the execution, every process uses some files which need to be present in the main memory. OS also maintains a list of open files in the PCB.

  3. List of open devices: OS also maintains the list of all open devices which are used during the execution of the process.
Review: Process Attributes
    Which attribute is NOT normally included in a PCB (process control block)?

      General purpose registers
      Priority
      Program counter
      Scheduler
Result: