| 1. |
What do you understand about a deadlock in the context of operating systems? What are the necessary conditions for a deadlock? |
|
Answer» A deadlock occurs when a group of processes is halted because each process is holding a resource and waiting for another process to obtain it. Consider the situation when two trains are approaching each other on the same TRACK and there is only one track: once they are in front of each other, neither train can move. In operating systems, a similar situation happens when two or more processes hold some resources while waiting on resources owned by other processes (s). For example, let us assume that there are two trucks trying to cross a one-way bridge from opposite ends. NONE of the trucks is ready to move back and neither can any of them cross the bridge. In this situation, a deadlock has been obtained. Following are the necessary conditions for a deadlock :
|
|