P ROCESS CONTROL BLOCK
PROCESS CONTROL BLOCK
Each & every process in the operating
system is represented by PROCESS CONTROL BLOCK
Process Control Block ~ Task Control
Block or Task Struct
WHAT EXACTLY IS PCB ?
Its is a data structure in the operating
system kernel containing the information
needed to manage a particular process.
The PCB is “ the manifestation(visible) of
a process in an operating system”
PROCESS CONTROL BLOCK (PCB)PCB consist of following information~
Pointer.
Process state.
Process number.
Program counter.
CPU register.
CPU scheduling information.
Memory management information.
Accounting information.
I/O status information.
POINTER ~ Its contains the address of another
process which is present in the ready queue
PROCESS STATE ~ Its contains the information
about the state of the process i.e.,
NEW
READY
RUNNING
WAITING
HALTED
program COUNTER ~ The counter specifies
the address of the next instruction to be
executed.
CPU REGISTERS ~ The register vary in number
and type depending in the type of computer
architecture, they include:
Accumulators, index register, stack pointer and
general purpose registers
CPU SHEDULING INFORMATION ~ This
information includes
Process priority
Pointer to scheduling queues
Other scheduling parameters.
MEMORY MANAGEMENT INFORMATION ~ This
information includes
Value of base and limit of registers
Page tables
Segment tables
Depending on the memory system used by the
operating system.
ACCOUNTING INFORMATION ~ This information includes
amount of CPU and real time used
time limit
account number
job or process number etc.
I/O STATUS INFORMATION ~ This information includes
list of I/O devices allocated to the process
list of open files etc.
Hence, the PCB serves as the repository for any information that may be vary from process to process.