Please explain the following characteristic of suspended process

azemda picture azemda · Aug 26, 2016 · Viewed 14.7k times · Source

The following is from William Stallings "Operating systems, internals and design principles" in which he explains the characteristics of the suspended process as

The process may or may not be waiting on an event. If it is,this blocked condition is independent of the suspend condition, and occurrence of the blocking event does nor enable the process to be executed immediately.

I did not understand this point, what is blocked condition and suspend condition? Can someone please explain this point?

Answer

Am_I_Helpful picture Am_I_Helpful · Aug 26, 2016

The process may or may not be waiting on an event. If it is,this blocked condition is independent of the suspend condition, and occurrence of the blocking event does nor enable the process to be executed immediately.

Let's assume your process which has been suspended is process A which accepts incoming request from client-socket(call this as event of accepting connection request). So, this is a blocking call by nature. And, let's say this process has been suspended by user(/system); and, it is blocking in nature too.

So, even if the client were to pass the request to this process, thereby ending the process' blocking state; still, the process won't execute further as the process is in suspended state. Hence, even though the client passed request, but server won't respond as it is suspended, though the reason of blocking has been nullified by client passing the request.

As soon as the suspension is removed the process will start execution and accept the client request.

So, the withdrawal of the process from suspension is must even if the blocking reason has been served for the process, for enabling it to proceed further.

Also, from Process management (computing) on Wikipedia :

A process can be suspended from the RUNNING, READY or BLOCKED state, giving rise to two other states, namely, READY SUSPEND and BLOCKED SUSPEND.

A RUNNING process that is suspended becomes READY SUSPEND,

and a BLOCKED process that is suspended becomes BLOCKED SUSPEND. A process can be suspended for a number of reasons; the most significant of which arises from the process being swapped out of memory by the memory management system in order to free memory for other processes. Other common reasons for a process being suspended are when one suspends execution while debugging a program, or when the system is monitoring processes.

... A process in the SUSPEND BLOCKED* state is moved to the SUSPEND READY state when the event for which it has been waiting occurs.

* Note that SUSPEND BLOCKED state and BLOCKED SUSPEND state is considered same.