what is a deadlock in os | Introduction of Deadlock in Operating System | define deadlock

preview_player
Показать описание
#deadlock #definedeadlock #operatingsystemlectures

Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for another resource acquired by some other process.
Consider an example when two trains are coming toward each other on same track and there is only one track, none of the trains can move once they are in front of each other. Similar situation occurs in operating systems when there are two or more processes hold some resources and wait for resources held by other(s). For example, in the below diagram, Process 1 is holding Resource 1 and waiting for resource 2 which is acquired by process 2, and process 2 is waiting for resource 1.

Methods for handling deadlock
There are three ways to handle deadlock
1) Deadlock prevention or avoidance: The idea is to not let the system into deadlock state.
One can zoom into each category individually, Prevention is done by negating one of above mentioned necessary conditions for deadlock.
Avoidance is kind of futuristic in nature. By using strategy of “Avoidance”, we have to make an assumption. We need to ensure that all information about resources which process WILL need are known to us prior to execution of the process. We use Banker’s algorithm (Which is in-turn a gift from Dijkstra) in order to avoid deadlock.

2) Deadlock detection and recovery: Let deadlock occur, then do preemption to handle it once occurred.

3) Ignore the problem all together: If deadlock is very rare, then let it happen and reboot the system. This is the approach that both Windows and UNIX take.
Рекомендации по теме
Комментарии
Автор

It helps more in Lockdown period to learn the subject. Especially the way you are teaching is very easy to understand the topic. Thankyou sir🤝

harshavardhanguggilla
Автор

I'm studying your lectures the day before exam but im sure I can do well hatsoff sir I've subscribed your channel and will share it to my friends thanku and keep doing what you are doing ❤🙏

adarsha
Автор

Sir, Really your videos are very helpful to us and all engineering students.Thanks a lot Sir🙏

MiniRao
Автор

Tq so much sir for easy explaintnation 😊

bbpranathi
Автор

Sir, your explanation is clear and clarity...🙏

mandapatibharath
Автор

i should appreciate your work that u made, it can be seen clearly
well explained

yelamanchilivenkataraja
Автор

My HOD sir also watching your videos before he teach us..

sumanth
Автор

Sir apko pata nhi h apne kitni help kari h meri thank you so much sir ji 🙏

myth-low-less
Автор

thank you for the video sir
saved my day

ragediablo
Автор

Thnks sir I got something in one day which i didn't got from my college from 6 months

saisrujan
visit shbcf.ru