Five state of process Version 0 |
|
๐ค Author: by tsangzlfoxmailcom 2018-10-07 13:35:48 |
Explain the five states of process , ย and why the states are divided into 5, not 4, or 7?
1.New:When a process is created, it needs to apply for a blank PCB to fill in the control and management process information to complete resource allocation. If the creation cannot be completed, such as if the resources are not met, the process cannot be scheduled to run, and the state in which the process is located is called the new state.
2.Ready:The process is ready and allocated to the required resources. Once allocated to CPU, it will be able to run immediately.
3.Running:After the process is in a ready state, the process enters into execution state.
4.Waiting:The process being executed is temporarily unable to run due to certain events (I/O requests, application cache failures), and the process is blocked. Enter the ready state when the request is satisfied, waiting for system call.
5.Terminated:The process ends, or an error occurs, or is terminated by the system. No more execution
A process is different from a program in that it is active and stateful This can be characterized by a set of states. To facilitate process management, in general, five states need to be defined for different situations in the execution process.This five states can completely describe the different situations of a process.