The process control block (PCB) represents a process in the operating system. It contains information about the process such as its process ID, state, privileges, resources used, program counter, CPU registers, scheduling information, I/O status, and a pointer to the next PCB. The PCB is stored in protected memory and contains all the information needed to describe and track the process as well as its execution context. It allows the operating system to control and monitor the processes.
2. Process Control
Block
• The process control
block represents a process in the
operating system. A process
control block is also known as a
task control block. It’s a
repository of information
associated with a
specific process.
3. Location
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.
5. Structure of Process Control Block
Process ID
Process State
Process Privileges
Accounting information
Program Counter
CPU registers
CPU Scheduling Information
I/O status information
Pointer
6. • Process ID: When a new process is created by
the user, the operating system assigns a unique
ID i.e a process ID to that process.
• Process State: A process, from its creation to
completion goes through different states.
Generally, a process may be present in one of
the 5 states during its execution
• Process Privileges: This allows/disallows access
to system resources.
• Accounting Information: This attribute gives
the information of the resources used by that
process in its lifetime. For Example: CPU time
connection time, etc.
7. • Program Counter: The program counter is a
pointer that points to the next instruction in the
program to be executed.
• CPU Registers: A CPU register is a quickly
accessible small-sized location available to the
CPU. These registers are stored in virtual
memory(RAM).
• CPU Scheduling Information: Stores process
priority and other scheduling information
necessary for scheduling a process
• I/O status information: In this field, the list of
all the input/output devices which are required by
that process during its execution is mentioned.
• Pointer: This field contains the address of the
next PCB, which is in ready state.