homework-2 Version 0 |
|
👤 Author: by 819755696qqcom 2019-09-18 10:56:41 |
Describe the life circle of process
The life circle of each process include five basic states:
1.New
When a process is created, it needs to apply for a blank PCB, fill in the information of controlling and managing the process, and complete resource allocation. If the creation can not be completed, such as resources can not be satisfied, it can not be scheduled to run. The state of the process at this time is called the creation state.
2.Ready
The process is ready, allocated to the required resources, and can run immediately as long as it is allocated to the CPU
3.Running
After the process is scheduled in the ready state, the process enters the execution state.
4.Waiting
The executing process is temporarily unable to run due to certain events (I/O requests, application cache failures), and the process is blocked. Enter Ready State to Wait for System Call when Request is Satisfied
5.Terminated
The process terminates, or an error occurs, or is terminated by the system, and enters the termination state. Unable to execute again
Why each process must have one PCB?
PCB is part of the process entity and the most important recorded data structure in the operating system.During the whole life cycle of a process, the system always controls the process through its PCB.