[Operating system] The status of the process

Five states of process

Create, ready ( waiting for processor CPU resources to be allocated ), executed, blocked (called blocking because it is very slow compared to the CPU, waiting for resources other than the CPU, such as I/O), and terminated.

55375a994df54371b689238e222113ee.png 

The created process is placed in the ready queue waiting for resource allocation.
There is a dedicated blocking queue (I/O queue)
to terminate the deletion process, clear the PCB, and return the empty PCB to the system.

state transition

The process from ready to execution is called process scheduling. Execution
until the ready time slice is exhausted.
Execution until blocking with io request (active) 
. io completion and blocking until ready (passive).

Hanging, all processes are in a blocked state, the CPU memory is not enough, new processes come in, internal and external memory are exchanged, and the memory processes are copied to the queue corresponding to the external memory to make space.

Both the blocking queue and the ready queue have two states: static and active, where static is in external memory and active is in memory.

The transition from active state to resting state is achieved by suspending. The opposite of suspend is activation.

Guess you like

Origin blog.csdn.net/l203018/article/details/132853790