Operating System Process status

Source: Internet
Author: User

Operating System Process status

Next we will detail several statuses of processes in the operating system.

Process status
Ready (Ready) Status

When a process has been allocated to all necessary resources except the CPU, it can be immediately executed as long as the CPU is obtained. The state of the process is called the ready state. There may be multiple processes in the ready state in a system. They are usually arranged in a queue called the ready queue.

 

The execution status process has obtained the CPU and its program is being executed. In a single-processor system, only one process is in the execution state. In a multi-processor system, multiple processes are in the execution state.

 

 

When a process in the blocking status is temporarily unable to continue execution due to an event, it gives up the processor and is paused. That is, the execution of the process is blocked. The process in the blocking status is called a blocking status, it is also called the waiting or blocking status. Typical events that cause process congestion include request I/O and Request Buffer space. This blocking process is usually arranged in a queue. Some systems arrange blocked processes into multiple queues based on different blocking causes.

 

The Conversion Diagram of the three elements is as follows:

 

Pending status

 

In many systems, the process only has the preceding three states, but in other systems, some new states are added, and the most important is the pending state. Reasons for introducing the pending status include:

(1) end user requests. When an end user finds a suspicious problem during his/her program running, he/she wants to temporarily stop his/her program. That is, to suspend the execution of a running process. If the user process is in the ready state but not executed, the process will not be scheduled for the moment, this allows the user to study the execution or modify the program. We call this static state a pending state.

(2) parent process request. Sometimes the parent process wants to suspend a child process of its own to examine and modify the child process, or to coordinate the activities of the Child process.

(3) Load Adjustment needs. When the real-time system has a heavy workload and may affect the control of real-time tasks, the system can suspend unimportant processes to ensure the normal operation of the system.

(4) operating system requirements. The operating system sometimes wants to suspend some processes to check the usage of resources in the running state or to keep accounts.

Conversion chart with pending status

 

To create a process in the creation status, follow these two steps:

 

(1) create a PCB for a new process and fill in necessary management information.

(2) Transfer the process to the ready status and insert it into the ready queue. When a new process is created, the system has allocated a PCB for it and filled in information such as the process ID. However, because the required resources or other information of the process, for example, if the primary storage resources have not been allocated, the current process already has its own PCB, but the process itself has not yet entered the primary storage, that is, the creation is not completed, and the process cannot be scheduled to run, the status is the creation status. The creation status is introduced to ensure that the process scheduling must be completed after the creation is completed to ensure the integrity of the process control block operation. At the same time, the introduction of the Creation status also increases the flexibility of management. The operating system can postpone the submission of the Creation status process based on the system performance or the limitation of the primary storage capacity. For a process in the creation state, the necessary resources are obtained, and after the PCB Initialization is complete, the Process status can be transferred from the creation state to the ready state.

Termination status

 

Wait for the operating system to handle the problem, then clear the PCB and return the PCB space to the system. When a process reaches a natural end point, an insurmountable error occurs, the process is terminated by the operating system, or other processes with the right to terminate, it enters the terminated state. Processes that enter the terminated state cannot be executed again, but a record is retained in the operating system. The status code and some timing statistics are saved for other processes to collect. Once information about the terminated process is extracted from other processes, the operating system deletes the process.

After the creation and termination statuses are added, the three basic statuses of the process and the conversion graph are changed to five statuses and the conversion Graph

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.