(Operating System) Process Control Block & location of PCB

  •  Process Control Block :-


  • Each process is represented/handled/controlled in the operating system by a process control block (PCB)
  • It contains many pieces of information associated with a specific process, including these:

              1)Process state: The state may be new, ready, running, waiting, halted, and so on.

              2)Process Number: A unique process number is assigned by OS to every process.                                                 That number is stored on PCB.

              3)Program counter: The counter indicates the address of the next instruction to be                                                  executed for this process.

              4)Registers: This specifies the registers that are used by the process. They may                                          include accumulators, index registers, stack ,pointers, general purpose                                    registers etc.

              5)List of Open Files: These are the different files that are associated with the                                                            process

              6)CPU Scheduling Information : The process priority, pointers to scheduling                                                                    queues etc. is the CPU scheduling information that is                                                                contained in the PCB. This may also include any other
                                                        scheduling parameters.

              7) Memory Management Information: The memory management information                                                                  includes the page tables or the segment tables depending                                                          on the memory system used. It also contains the value of                                                          the base registers, limit registers etc. 

              8)  I/O Status Information: This information includes the list of I/O devices used                                                              by the process, the list of files etc.
                  

Location of the Process Control Block

1) The process control block is kept in a memory area that is protected from the normal user access.

2) PCBs are maintained in a linked list manner. By that we know how many processes are executing in a system and we can know the current status of the processes.

3) PCB gets updated while the process is executing. If a process is executing then that has to be read by the OS.


Post a Comment

Previous Post Next Post