content
2. The composition of the process
4. Characteristics of the process
2. How to implement process control
3. Process control related primitives
process
1. Definition of process
For example, the so-called creation process is essentially the creation of the PCB in the process entity; and the cancellation process is essentially the cancellation of the PCB in the process entity.
Note: PCB is the only sign of the existence of a process!
From different angles, a process can have different definitions. The more traditional and typical definitions are:
1. A process is an execution process of a program .
2. A process is an activity that occurs when a program and its data are executed sequentially on a processor .
3. A process is a process in which a program with independent functions runs on a data set. It is an independent unit for the system to allocate and schedule resources.
After introducing the concept of process entity, process can be defined as:
process is the running process of process entity, and it is an independent unit for system to allocate and schedule resources .
Note: Strictly speaking, process entities are not the same as processes. Process entities are static and processes are dynamic . However, unless the title specifically examines the difference between the two, it can be considered that a process entity is a process. Therefore, we can also say that "the process consists of three parts: program segment, data segment, and PCB.
2. The composition of the process
Process (process entity) consists of three parts: program segment, data segment and PCB
3. Organization
In a system, there are usually tens, hundreds or even thousands of PCBs. In order to manage them effectively, these PCBs should be organized in an appropriate way.
Note: The composition of the process discusses the question of what parts are formed within a process, while the organization of the process discusses the organization of multiple processes.
1. Link method
2. Index method
4. Characteristics of the process
5. The state of the process
Running state, ready state, blocking state, creation state, termination state .
A process is an execution of a program. In this execution process, sometimes the process is being processed by the CPU, and sometimes it needs to wait for the CPU service. It can be seen that the state of the process will change in various ways. In order to facilitate the management of each process, the operating system needs to reasonably divide the process into several states.
6. Process state transition
7. Process Control
1. What is process control
2. How to implement process control
3. Process control related primitives
Learning skill: Process control causes transitions in process state. No matter which primitive, there are three things to do:
1. Update the information in the PCB (such as modifying the process status flag, saving the running environment to the PCB, restoring the running environment from the PCB)
a. All process control primitives must be Modify the process status flag
b. Depriving the current running process of the right to use the CPU must save its running environment
c. Before a process starts running, the running environment must be restored
2. Insert the PCB into the appropriate queue
3. Allocate/recycle resources