Home >Common Problem >Why is the concept of process introduced in the operating system?
In order to enable programs to be executed concurrently in a multi-program environment and to control and describe concurrently executed programs, the process concept is introduced in the operating system. The purpose of introducing processes is to clearly describe the inherent laws of dynamic systems and effectively manage and schedule programs that enter the main memory of the computer system to run.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
Narrow definition: A process is an instance of a computer program that is being executed.
Broad definition: A process is a running activity of a program with certain independent functions on a certain data collection. It is the basic unit of dynamic execution of the operating system. In traditional operating systems, the process is both the basic allocation unit and the basic execution unit.
The concept of process has two main points: First, the process is an entity. Each process has its own address space, which generally includes a text region, a data region, and a stack region. The text area stores the code executed by the processor; the data area stores variables and dynamically allocated memory used during process execution; and the stack area stores instructions and local variables for active procedure calls. Second, a process is an "executing program." A program is an inanimate entity. Only when the processor gives life to the program (executed by the operating system) can it become an active entity. We call it a process. [3]
Process is the most basic and important concept in the operating system. It is a concept introduced after the emergence of multi-programming systems in order to describe the dynamic conditions within the system and describe the activity rules of each program within the system. All multi-programming operating systems are based on processes.
Reason
The reason why the operating system introduces the concept of process:
From a theoretical point of view, it is to Abstraction of program process;
From an implementation perspective, it is a data structure that aims to clearly depict the inherent laws of a dynamic system and effectively manage and schedule the processes that enter the main memory of the computer system to run. program.
Features
Dynamicity: The essence of a process is an execution process of a program in a multi-programming system. The process is generated dynamically. Perishable.
Concurrency: Any process can execute concurrently with other processes
Independence: A process is a basic unit that can run independently, and it is also an independent unit for system allocation and scheduling;
Asynchronicity: Due to the mutual constraints between processes, the process has intermittent execution, that is, the processes advance at independent and unpredictable speeds
Structural features: The process consists of programs, It consists of three parts: data and process control blocks.
Multiple different processes can contain the same program: a program constitutes different processes in different data sets and can obtain different results; but during execution, the program cannot change.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of Why is the concept of process introduced in the operating system?. For more information, please follow other related articles on the PHP Chinese website!