'Please explain the following characteristic of suspended process
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?
Solution 1:[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.
Solution 2:[2]
- Swapped back to secondary memory from primary memory
- Most probably is waiting for an event to happen for a very long time
- Was unnessacerily wasting cpu cycles
- Send to this state by an agent: itself, by os, by parent process.
- Upon happening of event or signal from agent it will be swap back in primary memory for execution.
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user3344003 |
| Solution 2 | Samrat Arora |
| Solution 3 | Rob Liban |
