PCB Parts function and feature
1) Process Control Block: The function of the process control block is to make a program (including data) that cannot run independently in a multi-program environment, become a basic unit that can run independently, and a process that can be executed concurrently with other processes.
2) block: is the program code segment in the process that can be executed by the process scheduler on the CPU.
3) data segment: the data segment of a process, which can be the raw data processed by the program corresponding to the process, or the intermediate or final data generated after the program is executed.
Information used in the PCB to describe and control the operation of the process
1, process identifier information
A process identifier is used to identify a process. A process usually has the following two identifiers.
External identifier. Provided by the creator, usually composed of letters and numbers, often used by users (processes) to access the process. External identifiers are easy to remember, such as: computing process, printing process, sending process, receiving process, etc.
Internal identifier: set to facilitate system use. In all OS, each process is given an integer as an internal identifier. It is usually a symbol of a process, in order to describe the family relationship of the process, it should also Set the parent process identifier and the child process identifier. You can also set the user identifier to indicate which user owns the proces
2, processor status information
The processor status information is mainly composed of the contents of various registers of the processor.
General purpose registers, also known as user visual registers, are accessible to the user program for temporary storage of information.
Instruction register. Stores the address of the next instruction to be accessed.
Program status word PSW. Contains status information. (condition code, execution mode, interrupt mask flag, etc.)
User stack pointer. Each user process has one or several system stacks associated with it for storing process and system call parameters and call addresses. The stack pointer points to the top of the stack.
3. Process scheduling information
There are also some information related to process scheduling and process swapping in the PCB.
(1) Process state. Indicates the current state of the process, as the basis for process scheduling and swapping.
(2) Process priority. An integer used to describe the priority level of the process using the processor.
(3) Other information required for process scheduling. (The sum of the time that the process has waited for the CPU and the total time that the process has been executed)
(4) Event. This is the event waiting for the process to transition from the execution state to the blocking state. (Cause of blocking)
A sign of the existence of a process. During the entire life cycle of a process, the system always controls the process through the PCB. That is, the system senses the existence of the process according to the PCB of the process rather than anything else. Said that PCB is a sign of the existence of the process.
JOY TECHNOLOGY CO.,LIMITED Electronics is a comprehensive service provider of SMT, PCB, PCBA, electronic components acquisition, SMT chip processing and SMT equipment parts provider.