deadlock prevention in os | deadlock prevention in operating system

  Рет қаралды 72,702

Sudhakar Atchala

Sudhakar Atchala

4 жыл бұрын

#deadlockpreventioninos #operatingsystemlectures #operatingsystemplaylist
Deadlock Prevention
If we simulate deadlock with a table which is standing on its four legs then we can also simulate four legs with the four conditions which when occurs simultaneously, cause the deadlock.
However, if we break one of the legs of the table then the table will fall definitely. The same happens with deadlock, if we can be able to violate one of the four necessary conditions and don't let them occur together then we can prevent the deadlock.
Let's see how we can prevent each of the conditions.
1. Mutual Exclusion
Mutual section from the resource point of view is the fact that a resource can never be used by more than one process simultaneously which is fair enough but that is the main reason behind the deadlock. If a resource could have been used by more than one process at the same time then the process would have never been waiting for any resource.
However, if we can be able to violate resources behaving in the mutually exclusive manner then the deadlock can be prevented.
2. Hold and Wait
Hold and wait condition lies when a process holds a resource and waiting for some other resource to complete its task. Deadlock occurs because there can be more than one process which are holding one resource and waiting for other in the cyclic order.
However, we have to find out some mechanism by which a process either doesn't hold any resource or doesn't wait. That means, a process must be assigned all the necessary resources before the execution starts. A process must not wait for any resource once the execution has been started.
3. No Preemption
Deadlock arises due to the fact that a process can't be stopped once it starts. However, if we take the resource away from the process which is causing deadlock then we can prevent deadlock.
This is not a good approach at all since if we take a resource away which is being used by the process then all the work which it has done till now can become inconsistent.
Consider a printer is being used by any process. If we take the printer away from that process and assign it to some other process then all the data which has been printed can become inconsistent and ineffective and also the fact that the process can't start printing again from where it has left which causes performance inefficiency.
4. Circular Wait
To violate circular wait, we can assign a priority number to each of the resource. A process can't request for a lesser priority resource. This ensures that not a single process can request a resource which is being utilized by some other process and no cycle will be formed.

Пікірлер: 54
@kirthikakamalesh8793
@kirthikakamalesh8793 3 жыл бұрын
You are doing this great sir.Concepts are all understanding.Please continue this only in English and not in other languages, because all may not knew hindi including me.Take lectures in English kindly ❤️
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
Thank you, I will Kamalesh. Plz subscribe to the channel and if possible share with your friends. Thanks
@PushpalathaBadagala
@PushpalathaBadagala 2 ай бұрын
Sir explaination is really outstanding and I am listening his videos from my 2-1 thankyou very much sir for your contributions for us
@SudhakarAtchala
@SudhakarAtchala 2 ай бұрын
Thanks and welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@PushpalathaBadagala
@PushpalathaBadagala 2 ай бұрын
Already subscribed sir
@vasavishala2299
@vasavishala2299 2 жыл бұрын
Sir iam thank full to u by watching your videos I can attempt most of the question sir
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
All the best vishala. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@lakshmimadhanmohansriramse4258
@lakshmimadhanmohansriramse4258 3 жыл бұрын
Thank you for giving this video and explanation is very well sir
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
So nice of you mohan. Plz subscribe to the channel and if possible share with your friends. Thanks
@anandspark1651
@anandspark1651 3 жыл бұрын
Tq very much sir this is very helpful for me
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
Most welcome Anand. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@radhareddy7716
@radhareddy7716 Жыл бұрын
Excellent explanation sir.thanks sir
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@peravalirishe4242
@peravalirishe4242 Жыл бұрын
Sir you are amazing i subscribed to you sir and i shared to my friends
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Many many thanks
@kavyachoragudi885
@kavyachoragudi885 3 жыл бұрын
Excellent explanation sir.
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
Thanks and welcome kavya. plz subscribe to the channel and if possible share with your friends. Thanks
@meherchaitanyavanacharla2241
@meherchaitanyavanacharla2241 4 жыл бұрын
Nice explanation, at understandable mode of language, pls do these kind of videos, more. SPECTACULAR
@SudhakarAtchala
@SudhakarAtchala 4 жыл бұрын
Hai Vijayasree, plz go through my videos once. Definitely you will like more videos. Thanks for your encouragement and support towards our channel. Share my sessions with your friends and subscribe to our channel.Keep on following my sessions. Thank you so much.
@tummarekha8583
@tummarekha8583 3 жыл бұрын
@@SudhakarAtchala uml unda mee deggara
@tummarekha8583
@tummarekha8583 3 жыл бұрын
@@SudhakarAtchala can u plz send uml vedios and notes sir
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
@@tummarekha8583 ledu
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
@@tummarekha8583 levu.
@abhinavksp4155
@abhinavksp4155 2 ай бұрын
sir meeru devudu sir🙏
@SudhakarAtchala
@SudhakarAtchala Ай бұрын
So nice of you.
@pavani1275
@pavani1275 3 жыл бұрын
Nice video I pass my exam because of u sir
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
Congrats Pavani. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@neerajkumarreddysuravaram438
@neerajkumarreddysuravaram438 3 жыл бұрын
thank you
@SudhakarAtchala
@SudhakarAtchala 3 жыл бұрын
You're welcome Neeraj. Plz subscribe to the channel and if possible share with your friends. Thanks
@ukeditz3
@ukeditz3 Ай бұрын
thank you sir
@SudhakarAtchala
@SudhakarAtchala Ай бұрын
So nice of you. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@mastermonvamsimon4510
@mastermonvamsimon4510 3 ай бұрын
Very good explanation sir
@SudhakarAtchala
@SudhakarAtchala 2 ай бұрын
Thanks and welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance...
@ayeshasiddiqua1821
@ayeshasiddiqua1821 2 жыл бұрын
Ur rocking sir
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@vasavilakshmipalavalasa4032
@vasavilakshmipalavalasa4032 Жыл бұрын
Good explanation ❤️
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Thank you 🙂 Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@sunnyreddy5780
@sunnyreddy5780 4 жыл бұрын
Nice sir✨
@SudhakarAtchala
@SudhakarAtchala 4 жыл бұрын
Hai Sunny Reddy, plz go through my playlists once. Definitely you will like more videos. Thanks for your encouragement and support towards our channel.Share my sessions with your friends and subscribe to our channel.Keep on following my sessions. Thank you so much.
@noahmaxi934
@noahmaxi934 4 жыл бұрын
awesome
@SudhakarAtchala
@SudhakarAtchala 4 жыл бұрын
Hai Noah 217, plz go through my playlists once. Definitely you will like more videos. Thanks for your encouragement and support towards our channel.Share my sessions with your friends and subscribe to our channel.Keep on following my sessions. Thank you so much.
@saianil1688
@saianil1688 4 жыл бұрын
good !
@SudhakarAtchala
@SudhakarAtchala 4 жыл бұрын
Hai Anil , plz go through my videos once. Definitely you will like more videos. Thanks for your encouragement and support towards our channel. Share my sessions with your friends and subscribe to our channel.Keep on following my sessions. Thank you so much.
@mrunknown1211
@mrunknown1211 Жыл бұрын
Niceeee
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Thanks. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@user-sg2po4bt6w
@user-sg2po4bt6w 3 ай бұрын
You are teaching is under standable
@SudhakarAtchala
@SudhakarAtchala 3 ай бұрын
Thanks. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@charithakuntamukkala1933
@charithakuntamukkala1933 8 ай бұрын
In this video you draw same diagram for both hold and wait and circular wait is it ok sir
@SudhakarAtchala
@SudhakarAtchala 8 ай бұрын
Both are related. yes ok. Plz subscribe to the channel and if possible share with your friends. Thanks in advance...
@middollasreelatha3225
@middollasreelatha3225 Жыл бұрын
is there any have banker algorithm for deadlock prevention
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
No. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@freethinkers3680
@freethinkers3680 4 жыл бұрын
sir also make this video in hindi language
@SudhakarAtchala
@SudhakarAtchala 4 жыл бұрын
K
@SudhakarAtchala
@SudhakarAtchala 4 жыл бұрын
Hai , plz go through my videos once. Definitely you will like more videos. Thanks for your encouragement and support towards our channel. Share my sessions with your friends and subscribe to our channel.Keep on following my sessions. Thank you so much.
Deadlock Recovery in operating system
6:10
Sudhakar Atchala
Рет қаралды 75 М.
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 35 МЛН
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 7 МЛН
Why is this "Fundamental" to arithmetic? #SoMEpi
22:45
PolyaMath
Рет қаралды 1,2 М.
L-4.4: Deadlock Handling Methods and Deadlock Prevention | Operating System
24:49
Methods For Handling Deadlocks
34:36
Sudhakar Atchala
Рет қаралды 37 М.
Monitors in Operating Systems || Process Synchronization
9:35
Sudhakar Atchala
Рет қаралды 42 М.
deadlock characterization part 1 | necessary conditions for deadlock
6:55