Understanding of process concepts in operating systems

zhaozj2021-02-16  55

Understanding of process concepts in operating systems

Lift the concept of the process, so many people who often use the computer feel unfamiliar, in fact, we often deal with it, as long as you run a program on your computer, the corresponding process is born, and it is accompanied by the entire operation process until the program terminates. The process is a very abstract in the operating system, very important, very difficult to understand. The in-depth understanding of the process concept will help understand the various mechanisms in the operating system.

Why introduce process concepts

Predor this concept, everyone is also familiar, the program and process concept is not sluggling. The program is to complete a task sequence, which tells the computer how to execute, so the program is required to run. A variety of resources that need to be occupied during the program run can run. If you have only one program in the system, that is, the single-channel program system, the program is exclusively on the entire running process, and the process of running throughout the program is very simple, and it is also very easy to manage. Just like a person living through a house, he wants to watch TV to watch TV, I want to go to the bathroom to go to the bathroom, no one will seize resources. However, in order to improve resource utilization and system processing power, modern computer systems are multi-channel program systems, that is, multi-channel programs and execution. The concurrent execution of the program brings some new issues, such as resource sharing and competition, which will change the execution of the program. Just like a number of people living at the same time, when you want to go to the bathroom, if you have anyone in the bathroom, you have to wait, affect your life rhythm. If the program executes improper, it will cause the execution of the program to lose closure and reproducibility, which is we don't want to see. Therefore, measures should be taken to control, control the execution speed of each and the procedure segment. Since the program is static, what we see is stored on the storage medium, which cannot reflect the dynamic characteristics of the program execution, and the program is constantly applying for resources during the execution, and the program is the basic unit of the shared resource. Not suitable, so you need to introduce a concept that describes the execution of the program and can be used as the basic unit of shared resources. This concept is the process.

Process life cycle

The process and people are life, from birth to death to experience several phases. Generally speaking, there are three states: ready, execution, wait. By a variety of reasons, you can result in a process, such as a program starting from the deposit into memory, and the operating system is to create a process for it. Of course, there can be other reasons, such as an application process to complete a special task, Create a child process yourself. After the process is created, it is in memory. The so-called ready state is to have all resources except the CPU. Everything has, only the Dongfeng, once the CPU is occupied, turn it into an execution status, if you need to wait The peripheral input data is input, and the process falls as a wait state, and the operating system will dispatch a process from the ready state queue to occupy the CPU. After the data arrives, the process of waiting state is awakened to be ready. The conversion of these states is achieved by process control primitives. The operation of the program is manifested by the process, the operating system is managed and controlled by the process, then how the operating system understands the status of the process, how to assign resources to the process, and the process is saved when the CPU is saved? This is to say PCB (fast process control). The PCB is the unique logo of the process, which records all the information of the process, which is a recorded data structure, which is equivalent to the file file. The operating system is perceived by the PCB perceived process, through the PCB to understand the operation of the process and control process. The PCB is also placed in memory. If the PCB is too large, some systems put some unimportant information in the PCB in the deposit.

Process constraint

转载请注明原文地址:https://www.9cbs.com/read-23943.html

New Post(0)