Process control block is a data structure. It contains all information for a process to be used for controlling its execution. It also contains the information related to the resource allocated to the process. Every process has its own PCB. The process control block is very important. It should be stored in protected area where the user cannot access it. The information that must be saved usually consists of the following:
• Process State - The state of the process (ready, waiting, etc.)
• Program Counter - The "program counter" of the PCB points to the next instruction to be executed when the process gains the CPU.
• CPU Register - The contents of CPU registers for the process (all the temporary data that will be destroyed by the next process that gets the CPU after an interrupt occurs).
• CPU Scheduling Information — It holds information needed for CPU scheduling, such as process priority and any scheduling-queue pointers.
• Memory Management Information - Information required by the memory manager (base register, limit register, page table for this process, etc.).
• Accounting Information - This part of PCB holds the amount of CPU time and real time used by the process to date, the process .number, and so forth.
• I/O Status Information - This part of the PCB holds a list of the I/O devices that the process has requested a list of the process's open files, etc.
• Process State - The state of the process (ready, waiting, etc.)
• Program Counter - The "program counter" of the PCB points to the next instruction to be executed when the process gains the CPU.
• CPU Register - The contents of CPU registers for the process (all the temporary data that will be destroyed by the next process that gets the CPU after an interrupt occurs).
• CPU Scheduling Information — It holds information needed for CPU scheduling, such as process priority and any scheduling-queue pointers.
• Memory Management Information - Information required by the memory manager (base register, limit register, page table for this process, etc.).
• Accounting Information - This part of PCB holds the amount of CPU time and real time used by the process to date, the process .number, and so forth.
• I/O Status Information - This part of the PCB holds a list of the I/O devices that the process has requested a list of the process's open files, etc.