beauty852

Study the role of PCB and its main information

Study the role of PCB and its main information

Study the role of PCB and its main information

In order for each program involved in concurrent execution to run independently, pcb stackup calculator a special data structure called a Process Control Block (PCB) must be configured in the operating system. The process and PCBS are bijective and the user process cannot be modified.

Function of process control block PCB:

In order to describe and manage processes, a Process Control Block (PCB) data structure is defined for each process at the core of the operating system. 1 oz vs 2 oz As a part of the process entity, PCB is the most important recorded data structure in the operating system, which is used to describe the current state of the process and manage all the information of the process operation. The function of PCB is to make a program (including data) that cannot run independently in a multi-program environment become a basic unit that can run independently, a process that can run concurrently with other processes.

(1) PCB as a sign of independent operation of the basic unit. When a program (including data) is equipped with a PCB, it means that it is already a legitimate basic unit that can run independently in a multi-program environment, and it also has the right to obtain OS services, such as opening files in the file system, requesting access to the device in the system, and communicating with other related processes. So when the system creates a new process, it creates a PCB for it. At the end of the process, the PCB is recovered and the process is over. The system knows the process exists through the PCB. In fact, the PCB has become the only indication that a process exists in the system.

(2) PCB can achieve intermittent operation management mode. In the multi-programming environment, the program can be run by the stop-go intermittently running development. When a process stops running due to congestion, it must do so by retaining the CPU field data information from our own runtime. With the PCB, the system technology can save the CPU field safety information resources in the PCB of the interrupted process for use when the process is scheduled to resume the CPU field. Therefore, it can be made clear again that in the environment of multi-programming development, as a static analysis program in the sense of Chinese traditional culture, because it does not affect the means with legal protection or preservation and its own economic operation site, it cannot guarantee the reproducibility of its normal operation research results, resulting in the loss of market operation significance.

(3) PCBS provide information needed for process management. When the scheduler schedules a process to run, it can only find the corresponding program and data according to the program and the data recorded in the process PCB or insufficient memory address pointer, when you need to access files or I/O devices in the file system, you also need to rely on the information in the PCB. In addition, the PCB can also understand the entire process of the required resources according to the resource list. As a result, the operating system always implements process control and management according to the PCB throughout the life cycle of the process.

(4) PCB provides information required for process scheduling. Only processes that are in a ready state can be scheduled for execution, and the status information of the process is provided in the PCB. If the process is in the ready state, the system inserts it into the process ready queue and waits for the scheduler to schedule it. In addition, additional information about the process is often needed when scheduling. For example, in a priority scheduling algorithm, you need to know the priority of the process. In some fair scheduling algorithms, it is also necessary to know the wait time of the process and the events that are executed.

(5) PCB realizes synchronization and communication with other processes. The process synchronization mechanism is used to realize the coordinated operation of all processes. When using the semaphore mechanism, the corresponding semaphore needs to be set in each process for synchronization. The PCB also has an area or communication queue pointer for process communication.

Article recommended