In: Computer Science
What information does the operating system need to store about a running process? (Think of 4 or 5 different things.)
For all the processes, operating system keeps a kind of data structure which is known as PCB ( process control block ). PID ( process id) is a kind of unique id which is used to identify a PCB. The PCB contains all the informations required for proper tracking of various running processes. Some of the informations are given below:
a) State of a process: It helps in keeping record of the current status of the process. The process may be running, not running, waiting, ready to start,etc.
b)Process ID : The PCB keeps and maintains the record of the unique id which is assigned for every process. All the information about process can be taken using this process ID.
c) Program counter: It keeps the pointer always ready to take to the next process or instruction immediately after completion of the running one.
d) Input/ Output: It helps in keeping the record of all the input and output devices which are being used in the process or has to be used.
e) Process Scheduling: If there are so many processes to be done then they are scheduled and a sequence of processes is set. All these Scheduling information is stored in the operating system by PCD.