Process and State Conversion

Source: Internet
Author: User

1. Basic Process status

(1) Execution status (running): Processes occupy the processor, ProcessesProgramExecuting. Only one process in a single-processor system is in the execution state, and multiple processes in a multi-processor system may be in the execution state.

(2) blocked: it is also called a waiting or sleep state. A process is in the paused State because it waits for an event. For example, a process waits for the completion of I/O and the buffer space.

(3) Ready: all necessary resources other than the processor have been allocated to the process and all the conditions for execution have been met. Multiple processes may be in a ready queue.

2. New status and termination status

(1) New State: the state in which the process has just been established and has not been sent to the ready queue.

(2) termination status: A process has ended normally or abnormally. The OS has removed it from the ready queue and has not undone it.

3.Process status
Conversion

A process can be in the ready and running status multiple times during execution, or blocked for multiple times, but only once in the new status.

(1) New state-> ready state: When the ready queue allows accepting new processes, the system will move the processes in the new State to the ready queue.

(2) ready state-> execution state: After the process scheduler assigns a processor to a ready process, the process enters the execution state.

(3) Execution state-> blocking state: the process being executed cannot be executed because it needs to wait for an event.

(4) blocking state-> readiness state: when an event waits for a process, the process enters the readiness state from the blocking state.

(5) Execution state-> readiness state: the process being executed is suspended because the time slice is used up. Or, after a process with a high priority arrives in the preemptible scheduling mode, A low-priority process being executed is forcibly removed from the processor and switched to the ready state.

(6) Execution state-> termination state: if a process is completed or a special event occurs, the process changes to termination state.

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.