written 6.8 years ago by |
Each process is represented in the operating system by a Process Control Block (PCB) also called as Task Control Block. The operating system groups all information that needs about a particular process into a data structure called a PCB or Process Descriptor. When a process is created, operating system creates a corresponding PCB and released whenever the process terminates.
The information stored in PCB includes: 1. Process name (ID) 2. Priority 3. State (ready, running, suspended) 4. Hardware state (processor registers and flags) 5. Scheduling information and usage statistics 6. Memory management information 7. I/O status (allocated devices, pending operations) 8. File Management information (open files, access rights) 9. Accounting information
A PCB keeps all the information needed to keep track of a process. Description of process control blocks sections:
Process State: The state may be new, ready, running, waiting, halted and so on.
Program counter: The counter indicates the address of the next instruction to be executed for this process.
CPU registers: The registers vary in number and type, depending on the computer architecture. They include accumulators, index registers, stack pointers and general purpose registers, plus any condition code information.
CPU scheduling information: This information includes a process priority, pointers to scheduling queues and any other scheduling parameters.
Memory management information: This information may include such information as the value of the base and limit registers, the page tables or the segment tables, depending on the memory system used by the OS . Accounting information: This information includes the amount of CPU and real-time used, time limits, account numbers, job or process numbers and so on.
I/O status information: This information includes the list of I/O devices allocated to the process, a list of open files and so on.
A Process Control Block is a data structure maintained by the Operating System for every process. The PCB is identified by an integer process ID (PID). A PCB keeps all the information needed to keep track of a processIt is an important tool that helps the OS support multiple processes and provide for multiprocessing.
It contains sufficient information such that if an interrupt occurs, the process can begin from the point where it left later as if nothing had happened.
The blocks are read and/or modified by every module in the OS including
a. Scheduling
b. Resource allocation
c. Interrupt processing
d. Performance monitoring and analysis
It can be said that the process control block defines the state of OS.