2

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?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
azemda
  • 79
  • 1
  • 1
  • 8

4 Answers4

2

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.

Community
  • 1
  • 1
Am_I_Helpful
  • 18,735
  • 7
  • 49
  • 73
1

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.

user3344003
  • 20,574
  • 3
  • 26
  • 62
0
  1. Swapped back to secondary memory from primary memory
  2. Most probably is waiting for an event to happen for a very long time
  3. Was unnessacerily wasting cpu cycles
  4. Send to this state by an agent: itself, by os, by parent process.
  5. Upon happening of event or signal from agent it will be swap back in primary memory for execution.
0

A runnig process may be suspended when an interrupt occurs. An interrupt occurs when a process makes I/O request. The process requires input device or output to complete execution, such process is suspended until the requested device is ready to satisfy the process' request.