Please explain the following characteristic of suspended process

16,861

Solution 1

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.

Solution 2

A suspended process is one that is turned off. The process exists but it does not get scheduled for execution. For example, suppose you have a server that you want to run a CPU-intensive molecular modeling program that will take two months to finish running. During the day, when everyone is at work you don't want the program to be hogging the CPU. Each morning you suspend the process and in the evening you unsuspend it.

When the process is blocked, it is waiting on something to happen to allow it to continue (i.e., I/O completion).

When the process is suspended, it is waiting on someone to unsuspend it. As the text notes, a process could be both blocked and suspended.

Share:
16,861
azemda
Author by

azemda

Updated on June 05, 2022

Comments

  • azemda
    azemda almost 2 years

    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?