Recently, I am learning about kernel and find a question that who controls the process control block(PCB
)?
The kernel or the process itself? Does it differ in different platform (windows
/Linux
)?
So far, I know PCB
is controlled in hardware, but I can't get to the right answer.
The process is entirely a software abstraction that is created and maintained exclusively by the operating system kernel. Process Control Block is a data structure representing a process in the OS. OS tracks all necessary information about each process running in the system in PCB. For example, which threads are running in this particular process, what memory it uses, which user started this process, which privileges it has. As a result, each OS defines its private format of PCB according to what operating system consider to be a process.
Some OSes implement processes (Windows/Linux), and some others do not do that (MS-DOS). There are even operating systems that maintain threads but do not maintain processes. Different operating systems define different formats of PCB. For example, Linux implements a file table as part of the process abstraction, but almost all microkernel operating systems do not consider the file table to be a part of the process. Legacy UNIX systems were not supporting threads concept and, thus, had not tracked threads running in the process. At the same time, modern Linux implements threads and tracks all related data in PCB. The only permanent part of the process abstraction shared by all operating systems is the private virtual address space.
Once again, PCB is entirely software abstraction, not hardware one! I haven't saw processors implementing or directly supporting processes. However, the implementation of process abstraction on the OS level usually requires some hardware support. For example, support of virtual memory and different levels of privileges.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With