822 views

2 Answers

1 votes
1 votes

When a process is created (initialized or installed), the operating system creates a corresponding process control block, which specifies and tracks the process state (i.e. new, ready, running, waiting or terminated). Since it is used to track process information, the PCB plays a key role in context switching. (Wikipedia)

To create a process the operating system as to be able to :

  • Identify it as distinct from any other processes active at the same time, normally by assigning it a numerical identifier.
  • Assign it sufficient space in memory and ensure that it is loaded.
  • Establish links between the process identifier and the resources (such as files) that it uses.
  • Use the process identification information to track its state (ready, running, or suspended) and which instruction is required next.

The operating system builds such information either into a table of such control information, in which case the process identifier is normally the number of its position in the table, or in a free-standing process control block held in memory. Control information normally consists of the process identifier, process status, address in memory of next instruction to be fetched, saved contents of registers (when a process is not running), memory limits, and pointers to control information for resources associated with the process. 

Source : https://www.sciencedirect.com/topics/computer-science/process-control-block  As mentioned by Laurie S. Keller, in Encyclopedia of Physical Science and Technology (Third Edition)

0 votes
0 votes

Reference from Operating system textbook by William Stallings 

When the process is in the new state, it is just created but is not submitted to the pool of executable process(Ready queue) by Operating system.

i.e. Process is not yet loaded but is been created and PCB is associated with process…

Therefore, PCB will be associated with process when it is in new state.

Related questions

0 votes
0 votes
2 answers
4