search
HomeCommon ProblemHow does the operating system manage processes?

How does the operating system manage processes?

Dec 19, 2019 pm 02:38 PM
operating systemProcess management

How does the operating system manage processes?

#The operating system manages processes through the process control block (PCB).

Process Control Block (PCB) (a special data structure set up by the system to manage the process. It is used to record the external characteristics of the process and describe the movement change process of the process. The system uses PCB to control and Management process, so PCB is the only sign that the system perceives the existence of a process. There is a one-to-one correspondence between the process and the PCB)

The control and management mechanisms of the process are different in different operating systems, and the amount of information in the PCB varies. Different, usually the PCB should contain the following information:

1. Process identifier name: Each process must have a unique identifier, which can be a string or a number.

2. Current status of the process status: Describes the current status of the process. For the convenience of management, when the system is designed, processes in the same status will be formed into a queue, such as the ready process queue. Waiting processes will form multiple waiting queues based on the events they are waiting for, such as waiting for printer queues and waiting for disk I/O completion queues. etc.

3. The corresponding program and data addresses of the process in order to connect the PCB with its programs and data.

4. Process resource list. List the resource records owned except CPU, such as owned I/O devices, open file list, etc.

5. Process priority priority: The priority of a process reflects the urgency of the process and is usually specified by the user and set by the system.

6. CPU on-site protection zone cpustatus: When the process cannot continue to occupy the CPU for some reason (such as waiting for a printer), the CPU is released. At this time, the various status information of the CPU must be protected for future use. Get the processor again to restore various states of the CPU and continue running.

7. Process synchronization and communication mechanism is used to realize the semaphores required for mutual exclusion, synchronization and communication between processes.

8. The link word of the PCB in the queue where the process is located. According to the current state of the process, the corresponding PCB of the process joins different queues. The PCB link word indicates the first address of the PCB of the next process in the queue where the process is located.

9. Other information related to the process. Such as process accounting information, CPU time occupied by the process, etc.

The above is the detailed content of How does the operating system manage processes?. 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software