PCB

            

Full form of PCB is process control block , also sometimes called a process descriptor, is a data structure used by computer operating system to store all the information about a process.


PCB

When a process is created (initialized or installed), the operating system creates a corresponding process control block, which specifies and tracks the process state (i.e. new, ready, running, waiting or terminated). Since it is used to track process information, the PCB plays a key role in context switching

The role of the PCBs is central in process management: they are accessed and/or modified by most utilities, particularly those involved with scheduling and resource management.

PCB must be kept in an area of memory protected from normal process access. In some operating systems the PCB is placed at the bottom of the process stack.
In multitasking operating systems, the PCB stores data needed for correct and efficient process management.

Process control information is used by the OS to manage the process itself. This includes:

  • Process scheduling state – The state of the process in terms of "ready", "suspended", etc., and other scheduling information as well, such as priority value, the amount of time elapsed since the process gained control of the CPU or since it was suspended. Also, in case of a suspended process, event identification data must be recorded for the event the process is waiting for;
  • Process structuring information – the process's children id's, or the id's of other processes related to the current one in some functional way, which may be represented as a queue, a ring or other data structures;
  • Interprocess communication information – flags, signals and messages associated with the communication among independent processes;
  • Process Privileges – allowed/disallowed access to system resources;
  • Process State – new, ready, running, waiting, dead;
  • Process Number (PID) – unique identification number for each process (also known as process ID);
  • Program Counter (PC) – a pointer to the address of the next instruction to be executed for this process;
  • CPU Registers – register set where process needs to be stored for execution for running state;
  • CPU Scheduling Information – information scheduling CPU time;
  • Memory Management Information – page table, memory limits, segment table;
  • Accounting Information – amount of CPU used for process execution, time limits, execution ID etc.;
  • I/O Status Information – list of I/O devices allocated to the process.








No comments:

Post a Comment

Python: Functions