Core Java with OCJP/SCJP: Multi Threading Part-12 || DeadLock || Starvation

  Рет қаралды 217,395

Durga Software Solutions

Durga Software Solutions

Күн бұрын

Пікірлер: 96
@pandit-jee-bihar
@pandit-jee-bihar 5 жыл бұрын
He is the only person who can go and ask a thread "why are you waiting ?". Shows the close bonding between the two. :)
@businessgamerprb5398
@businessgamerprb5398 9 ай бұрын
Legends say that they were in a relationship long ago... They have broken up but both are still in love.. Hence the bonding
@unknownhacker8152
@unknownhacker8152 Жыл бұрын
This is called true love, everyone waiting for forever for each other😂😂... Btw very great video,sir, thaank u so much for the great videos🥰
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@sunayanagonuru5231
@sunayanagonuru5231 8 жыл бұрын
Thanks to the camera man who took the videos very clearly..
@neshakkumar
@neshakkumar 4 жыл бұрын
For the first time, I am seeing some who is appreciating the cameraman for his work. Impressed ...really impressed
@shubhendrasingh9921
@shubhendrasingh9921 3 жыл бұрын
Yes
@sanjanamekan3351
@sanjanamekan3351 4 жыл бұрын
He is the best java teacher. He is my dhronacharya.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Sanjan. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@mahesh_kok
@mahesh_kok 7 жыл бұрын
Sir in Deadlock class create instances of A and B inside main method then there would be no need to create new method m1. students might get confused because till now in each and every video of Thread you were fabulous in giving real time examples and creating the simplest code to make students understand ....Hats off to u sir
@sathyareddy3272
@sathyareddy3272 7 жыл бұрын
before correcting sir, you should have read the code properly.If u create both the instances inside the static main method then you would not be able to run two different threads and there will be no deadlock situation in the program ever.
@HarshalGad
@HarshalGad 2 жыл бұрын
Thank you very much Sir for making these valuable videos free. Just to make things look perfect from your side and help other viewers. I would like to point out that this video is missing the starvation part. Thanks Again! for being so generous. God Bless You Sir! ❤
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Harshal. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@javashashavali
@javashashavali Жыл бұрын
Durga sir ante Durga sare👌👌👌👌👌
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@NEHASINGH-lq2lw
@NEHASINGH-lq2lw 4 ай бұрын
Shouldn't we make m1() method a static method as we're calling it from main method which is static. Why didn't it give error?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
92th video completed🎉❤
@dinushachathuranga7657
@dinushachathuranga7657 Жыл бұрын
Bunch of thanks for very clear explanation❤
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@sasikalac3119
@sasikalac3119 3 жыл бұрын
Hatts off sir your teaching...........
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Sasikala. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@Ervaibhav75
@Ervaibhav75 3 жыл бұрын
Sir deserves a Nobel prize...
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Vaibhav. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@usamaalioffical
@usamaalioffical 5 жыл бұрын
One of the best videos on Deadlock Bohat kamal ka smjaya Sir ap ne. One suggestion I would like to give you sir for future Kindly try to make length of videos short and also your english accent is little bit difficult to understand.I hope you will not mind these suggestions and will be more better in future. Again Thanks for giving great videos
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Usama Ali. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@mdrahilshahzad8242
@mdrahilshahzad8242 7 жыл бұрын
Thanks to Durgasoft team.
@vinaygiri861
@vinaygiri861 5 жыл бұрын
awesome work sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Vinay. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@ranveervaghela7030
@ranveervaghela7030 5 ай бұрын
Completed watching on 08-08-2024 at 3.30 PM :)
@rockbrand753
@rockbrand753 3 жыл бұрын
Thank you sir.. thank you so much sir for clearing all concepts in depth
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@rohituppal8426
@rohituppal8426 8 жыл бұрын
Thanks a lot Sir. Sir I am waiting for your videos on concurrency topics like Barrier synchronization, countdown latch , cyclic barrier.
@mdrahilshahzad8242
@mdrahilshahzad8242 7 жыл бұрын
Rohit Uppal have you got video for the same?
@sumitbadugu417
@sumitbadugu417 4 ай бұрын
Please Make video on DSA
@JohnWick-zc5li
@JohnWick-zc5li 6 жыл бұрын
Great job sir...thanks a lots
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello John. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@PandeyRavindra1
@PandeyRavindra1 8 жыл бұрын
very nice explanation ..
@madhusudhankamalapuram7608
@madhusudhankamalapuram7608 3 жыл бұрын
For each class for ever 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
@03_afshanahmedkhan39
@03_afshanahmedkhan39 3 жыл бұрын
Looks like deadlock == corona :) For both prevention is the only best possibility !!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@priyalagdhir9693
@priyalagdhir9693 2 жыл бұрын
Sir while explaining join() method you said if one thread calls join method on second thread and second thread calls join method on first thread that condition can also cause deadlock This deadlock occurs even though we are not using synchronised. Can you please explain
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Priya. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@chettiannanannan1486
@chettiannanannan1486 2 жыл бұрын
@Priya Lagdhir..Did u get any answers?
@rizwanshahid1447
@rizwanshahid1447 7 жыл бұрын
Thanks so much, Durga Sir.
@madhusudhankamalapuram7608
@madhusudhankamalapuram7608 3 жыл бұрын
Thanks sir...................
@nagasrinivasrayana1178
@nagasrinivasrayana1178 4 жыл бұрын
In the concept of starvation, if the dead lock situation occurs among the high priority threads itself, then what will happen to the low priority thread ?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Nagasrinivas. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@MyMayankgoyal
@MyMayankgoyal 3 жыл бұрын
when deadlock appears among high priority thread they will be in waiting state and low priority thread will eventually get processer time once all high priority thread goes to waiting state
@राजनगोंगल
@राजनगोंगल Жыл бұрын
👍👍👍👍👍👍
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@batchubharath6951
@batchubharath6951 6 жыл бұрын
Deadlock will also come when we call join method on two threads each other
@gauravjaiswar5667
@gauravjaiswar5667 5 жыл бұрын
or if you call join() on Executing Thread Object..!!
@malharjajoo7393
@malharjajoo7393 8 жыл бұрын
In the example in the video , what happens if you just try and use wait( ) method before accessing b's lock ? ( and same before "a's" lock )
@prabhudeepsingh4236
@prabhudeepsingh4236 7 жыл бұрын
To get all the programs of Multi Threading give a star to the following repository: github.com/PrabhudeepSingh/Java-07-MultiThreading Follow github.com/PrabhudeepSingh for more such code.
@ShubhamDhingra27
@ShubhamDhingra27 7 ай бұрын
Why did we not discuss ways to avoid deadlock?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 7 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@tusharshukla7215
@tusharshukla7215 5 жыл бұрын
Hello Sir Just want to confirm can we set below example of Deadlock situation: public class Deadlock { public static void main(String[] args) { String ary[] = { "abc", "cde" }; Deadlock.main(ary); System.out.println(ary); } } Thanks Tushar Shukla
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Tushar Shukla. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@kumaranil181
@kumaranil181 5 жыл бұрын
Its recursion with no exit condition which will ultimately cause java.lang.StackOverflowError and hence not deadlock
@manasadiki7576
@manasadiki7576 5 жыл бұрын
Thank you sir👌👌
@eadunuripranay5977
@eadunuripranay5977 4 жыл бұрын
sir in deadlock example without sleep() method also i'm able to achieve deadlock? so can we think that sleep() method is optional?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Pranay. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@eadunuripranay5977
@eadunuripranay5977 4 жыл бұрын
yes but wt i understood is if we place sleep() method then we can have a clear understanding of execution of each thread.
@chandralekha7717
@chandralekha7717 6 жыл бұрын
Thanks sir , concepts are very clear now
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Chandra Lekha. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@AnjaneyuluGoud9
@AnjaneyuluGoud9 6 жыл бұрын
Hi sir, why do we need to kill a program if we get deadlock situation, can't we make changes in the program?
@eknoor292
@eknoor292 4 жыл бұрын
Hello Durga Sir, Can you clear the following doubt? Is the following scenario possible? 1. Main thread calls m1() on Deadlock class. 2. m1() calls this. start(); 3. New thread created by this.start() is not scheduled by JVM and only main() thread keeps executing 4. main thread calls a.d1(b); 5. d1 calls b.last() and is successful since this.start() thread is not yet allocated by JVM and doesnot have b's lock 6. b.last() completes 7. Since b.last() completed a.d1() also completes and a's lock is released. 8. Now this.start() is allocated by thread scheduler and given b's lock. It also calls a.last() and since a's lock is now free. It also completed successfully. In above case there will be no deadlock. Is this possible?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@anelchori9469
@anelchori9469 8 жыл бұрын
calling join method on main and child thread it goes to deadlock situation I think as you said, but we can go to deadlock without synchronized keyword right!!
@icecream-pq5uy
@icecream-pq5uy 7 жыл бұрын
yes!!
@dhanushkaweragoda3534
@dhanushkaweragoda3534 8 жыл бұрын
If two threads call join() method on the each other thread, that also cause for deadlock isn't it ?
@vishalaggarwal1573
@vishalaggarwal1573 8 жыл бұрын
join() internally calls sleep() which results in releasing of lock that's why not considered as deadlock.
@vishalaggarwal1573
@vishalaggarwal1573 8 жыл бұрын
sry join calls wait method not sleep().
@prashantchougule9603
@prashantchougule9603 4 жыл бұрын
The above code if you are debug then it will run successful. without deadlock.
@abantichattopadhyay3183
@abantichattopadhyay3183 7 жыл бұрын
if I put this.start(); after a.methodA(b); then it is not in deadlock. Unable to understand the cause. Please help. Thanks in advance.
@Pushpendrasingh-gc4jh
@Pushpendrasingh-gc4jh 7 жыл бұрын
when you put { a.methodA(b); //line 1 this.start(); //line 2 } than main thread came to line 1 and after this it will go to execute a.methodA(b); after completing it and release all locks(a,b) ,main thread came and go to line 2 and start thread this thread will do it's task and all lock is available so he complete it's task....So no Deadlock I hope you will understand!!!!!
@sumitjain3526
@sumitjain3526 6 жыл бұрын
heads of u sir.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Sumit. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@NexusGFXCo
@NexusGFXCo Жыл бұрын
DeadLock Situation is like Give me your password of Gaming ID Immediately I'll pay you !! And from other side, Give me money Immediately I'll give you password of my gaming id😂
@ArunraajSingh
@ArunraajSingh 8 жыл бұрын
sir why did we have to implement a.d1(b) and b.d2(a) in separate methods? Why not together?
@sathyareddy3272
@sathyareddy3272 7 жыл бұрын
the reason is a.d1(b) is executed by the child thread i.e., Deadlock thread while b.d2(a) is executed by main thread. if we don't call them from their respective blocks then they will be executed by only one thread there would be no deadlock situation ever......
@paramchand7327
@paramchand7327 7 жыл бұрын
If a thread call join() on himself will it not be a deadlock situation ... like I am calling Thread.currentThread().join(); Now my current thread is waiting for forever.
@falseys
@falseys 7 жыл бұрын
It will be, also if two threads call join() on each other.
@vivekbudge9706
@vivekbudge9706 4 жыл бұрын
thank so much sir :)
@shashavalijava9
@shashavalijava9 Жыл бұрын
Durga is Durga sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@ajitupadhyay5550
@ajitupadhyay5550 6 жыл бұрын
Sir, Could you please share some more points to avoid deadlock without removing synchronized keyword ?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Ajit. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627,7207212427/28
@avinashjha7393
@avinashjha7393 7 жыл бұрын
Where to find Durga sir's Java notes
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 7 жыл бұрын
Hi Avinash. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627
@Rahulkumar-rp8hf
@Rahulkumar-rp8hf 3 жыл бұрын
who else watching this in 2021.
@growtogether8014
@growtogether8014 6 жыл бұрын
i am watching the video at speed 2.0
@Sushobhit333
@Sushobhit333 7 жыл бұрын
i don't understand :/
Core Java with OCJP/SCJP: Multi Threading Part-13 || Daemon Threads
50:20
Durga Software Solutions
Рет қаралды 178 М.
Avoiding Java Deadlocks: Real-life Examples | Best Practices | Threads and Concurrency
13:21
요즘유행 찍는법
0:34
오마이비키 OMV
Рет қаралды 12 МЛН
Core Java with OCJP/SCJP: Multi Threading Part-10 || Inter Thread Communication Part-1
1:18:26
Core Java With OCJP/SCJP: Innerclass  Part- 1||Introduction
1:21:59
Durga Software Solutions
Рет қаралды 187 М.
Core Java with OCJP/SCJP: Multi Threading Part-2 || The ways of defining a Thread Part-1
1:44:56
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 959 М.
Java Tutorials || Java OOPS  || Java Method Overriding || by Durga Sir
2:12:06
Durga Software Solutions
Рет қаралды 40 М.