Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PCB : Does Each Process have its own PCB or There is just one?

To my understanding, each process in the operating system contains its own separate Process Control Block. A friend of mine tried to clarify this and said that there is actually just one Process Control Block that contains information(s) for every process.

Can someone explain this to me. does each process have its own PCB or is there just one PCB that contains all the information for all the processes?

like image 776
user2970660 Avatar asked Nov 08 '13 22:11

user2970660


2 Answers

PCB it is process control block which holds the more info about process.and who uses this or when its being used.In operating system when kernel do context switching means jumping from one process to other that time kernel may not satisfied with UAREA info then looks it into PCB.

Main use: when process die like human die somebody has to do accounting about person (here it means process accounting) means what he has done in his life good thing or bad things. what resources he has used.he died naturally or somthing else happned. this all accounting done by using PCB only.in this peroid process called zombie process.

like image 21
Swapnil Bhosale Avatar answered Oct 20 '22 11:10

Swapnil Bhosale


  1. Each Process has its own PCB which is usually stored as a structure.
  2. A linked list of PCB's is maintained to keep track of all the processes.

Thought it may be implemented differently on various operating systems, but the basic concept is this much only. So, all in all, you might say that there is a process list which consists of PCB's of all the processes.

like image 141
ravi Avatar answered Oct 20 '22 12:10

ravi