Professional Documents
Culture Documents
RUKHSAR TARIQ
17137072
Q: What is PCB?
Ans:
Pcb stands for “Process control Block”. It is a data structure and is used
by operating system to store all the information about a process. When a
process is initialized, a corresponding pcb is created by OS. It is also
called “task controlling block”.
Pcb keeps all the information needed to keep track of a process. The main
components of pcb are as follows:
Process state
Pointer
Program counter
Registers
Scheduling information
I/O status information
Memory Management Information
Accounting information
Process privileges
Task_Struct:
Volatile long state: This contains the state of the process.
Long counter: This value acts as pointer on the task structure of a
process.
Long priority: when several process are being executed, there is an
order according to which those processes supposed to execute and this
is handled by Long priority.
Process Relationships:
Struct task_struct p_opptr: this is the pointer to the original parent.
Struct task_struct p_pptr: this points to intermediate parent.
Struct task_struct p_cptr: this points to most recent children.
Struct task_struct p_ysptr: this is the pointer to current/following
sibling.
Struct task_struct p_osptr: this points to previous sibling.