[Operating system] Dead waiting state, busy waiting state, limited waiting, giving power to waiting

Dead state: The
process cannot enter the critical zone at all within a limited time, but has been trying to enter, falling into a state of waiting without results.
(A certain process that has not entered the critical section and is waiting cannot obtain critical resources and enters the process. This kind of waiting is fruitless, it is dead and waiting~) -> At this time, you should abandon this fruitless thing and ensure that you are waiting. Time is limited

Busy waiting state:
When a process is in a certain critical area, any process trying to enter its critical area must enter the code continuous loop and fall into a busy waiting state. Testing a variable continuously until a certain value appears is called busy etc.
(A certain process that has not entered the critical section is constantly waiting for the value of the variable in the test loop code segment, occupying the processor and not releasing it. This is a busy waiting state~) -> At this time, the processor should be released. To other processes

Limited waiting: For processes that require access to critical resources, they should ensure that they can enter their critical area within a limited time, so as not to fall into a "dead waiting" state~ (the process itself will benefit)

Give up power to wait: When a process cannot enter its own critical area, it should release the processor immediately to prevent the process from falling into a "busy waiting" state~ (other processes will benefit)

Guess you like

Origin blog.csdn.net/qq_41371349/article/details/108042666