This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the forth module which consists of 8 articles.
In this article we will discuss about deadlock and ways by which deadlock occurs in detail.
- If two or more processes are waiting on happening of some event, which never happen then we say these processes are involved in deadlock and then it is known as deadlock.
- Mutual exclusion
- No preemption
- Hold and wait
- Circular wait
Mutual exclusion: It means that the resource process using should be used in mutual exclusive way. It (resource) should not be used by more than one process at one time.
No pre-emption: No type/ chance of pre-emption would be there.
Hold and wait: Process
R1resource and waiting for
R2resource while on the other hand process
R2resource and waiting for
P2should not release any resource, if they do this then deadlock will not happen.
Circular wait: The above example is an example of circular wait, if there is circular wait, than deadlock can occur. Let’s see another example
So this was all about deadlock in an operating system. Hope you liked it and learned something new form it.
If you have any doubt, questions, quires related to this topic or just want to share something with me, then please feel free to contact me.