A process being awakened means that the process becomes ready. The process status reflects the changes in the execution process of the process. When the process is awakened, it activates the process, which means that it becomes the ready state. It also means that the process has the running conditions and is waiting for the system to allocate a processor for running; but it does not move immediately after entering the ready state. Go to the head of the ready queue, but join the queue at the end of the queue.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
A process being awakened means that the process becomes ready.
Process: The basic unit for allocating and managing resources during the execution of concurrently executed programs.
Process status reflects changes in process execution. These states transition as the process executes and external conditions change.
In the three-state model, the process state is divided into three basic states, namely running state, ready state and blocking state.
In the five-state model, the process is divided into new state, terminated state, running state, ready state and blocked state.
Three-state model
During the entire life of a process from creation to cancellation and death, sometimes it occupies Processor execution, sometimes although it can run, but no processor is allocated, sometimes although there is an idle processor, it cannot be executed because it is waiting for an event to occur. All of this shows that a process is different from a program. It is active and has state. Changing, this can be characterized by a set of states. In order to facilitate the management of processes, generally speaking, at least three different process states must be defined according to different situations during the execution of the process:
(1) Running state: The process occupies the processor and is running.
(2) Ready state: The process has running conditions and is waiting for the system to allocate a processor for running.
(3) Wait state: Also known as blocked state or sleep state, it means that the process does not have running conditions and is waiting for the completion of an event.
Normally, a process will be in the ready state after it is created. During the execution of each process, it must be in one of the above three states at any time. At the same time, during the execution of a process, its state will change. The specific reasons that cause process state transition are as follows:
(1) Running state-waiting state: waiting for resources to be used or an event to occur, such as waiting for peripheral transmission; waiting for manual intervention.
(2) Waiting state - ready state: resources are met or an event has occurred, such as peripheral transmission ending; manual intervention is completed.
(3) Running state - ready state: The running time slice is up, or a higher priority process appears.
(4) Ready state - running state: When the CPU is idle, a ready process is scheduled to be selected for execution.
Five-state model
In an actual system, the state of the process and its transition are more complicated than those described in the previous section. For example, the introduction Special new state (new) and termination state (exit).
The introduction of new state and termination state is very useful for process management. The new state corresponds to the state in which the process has just been created. Creating a process requires two steps. First, create the necessary management information for a new process; then, let the process enter the ready state. At this time, the process will be in a new state. It has not been submitted for execution, but is waiting for the operating system to complete the necessary operations to create the process. It must be noted that the operating system will sometimes delay the submission of newly created processes based on system performance or main memory capacity limitations.
Similarly, the termination of the process also needs to go through two steps. First, wait for the operating system to deal with the aftermath; then, exit the main memory. When a process reaches its natural end point, or an insurmountable error occurs, or it is terminated by the operating system, or by other processes that have the right to terminate, it will enter the termination state. The process that enters the terminated state will no longer be executed, but it will still remain in the operating system waiting for aftermath. Once other processes have completed extracting information about the terminated process, the operating system will delete the process. The specific reasons that cause process state transition are as follows:
(1) NULL one-to-one new state: execute 1 program and create a child process.
(2) New state - ready state: When the operating system has completed the necessary operations for process creation, and the current system performance and memory capacity allow it.
(3) Running state one-by-one termination state: When a process reaches the natural end point, or an insurmountable error occurs, or is terminated by the operating system, or is terminated by other processes with the right to terminate The process ends.
(4) Termination status - NULL: Complete the aftermath operations.
(5) Ready state one-by-one termination state: Not shown in the state transition diagram, but some operating systems allow the parent process to terminate the child process.
(6) Waiting state one-by-one termination state: Not shown in the state transition diagram, but some operating systems allow the parent process to terminate the child process.
For more related knowledge, please visit the FAQ column!
The above is the detailed content of What does it mean when a process is awakened. For more information, please follow other related articles on the PHP Chinese website!