Home  >  Article  >  What is a process?

What is a process?

青灯夜游
青灯夜游Original
2020-07-16 13:28:388508browse

In a narrow sense: a process is an instance of a running program. Broadly speaking: it is a running activity of a program in a computer on a certain data set. It is the basic unit of resource allocation and scheduling in the system and the basis of the operating system structure. In traditional operating systems, processes are both the basic allocation unit and the basic execution unit.

What is a process?

#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.

In the early process-oriented computer architecture, the process was the basic execution entity of the program; in the contemporary thread-oriented computer architecture, the process was the container of threads. A program is a description of instructions, data and their organization, and a process is the entity of the program.

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.

The reason why the operating system introduces the concept of process:

From a theoretical perspective, it is an abstraction of the running program process;

From an implementation perspective From a perspective, it is a data structure that aims to clearly describe the inherent laws of a dynamic system and effectively manage and schedule programs that enter the main memory of the computer system to run.

Features

Dynamicity: The essence of a process is an execution process of a program in a multi-programming system. The process is dynamically generated and dies dynamically.

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 related knowledge, please visit: PHP Chinese website!

The above is the detailed content of What is a process?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is a disk?Next article:What is a disk?