Deadlock is a situation that can occur when two or more threads are blocked indefinitely trying to obtain access to a resource locked by the other threads in the deadlock. Thus, the deadlocked threads are blocked, waiting for each other to release a resource which neither of them can release because they are blocked waiting for the other thread to release its resource first.
Such resources can be Java Locks, Java synchronized blocks (Java monitor objects), files, database tables and / or records etc.
Chapters:
0:00 Deadlock defintion
1:04 Deadlock code example using two Lock instances in Java
5:43 Deadlock code example using two synchronized blocks in Java
7:19 Deadlock can occur with any mutually exclusive access / lockable resource
7:57 Deadlock fix via lock ordering
8:54 More complex deadlock scenario
11:14 A deadlock will block all threads trying to lock a resource involved in the deadlock
12:50 The four conditions required for a deadlock to occur
15:44 Other problems similar to deadlock
Deadlock in Java - text:
http://tutorials.jenkov.com/java-conc...
Deadlock Prevention in Java - video:
• Deadlock in Java
Java Concurrency Tutorial - text / video
http://tutorials.jenkov.com/java-conc...
• Java Concurrency and Multithreading
Starvation and Fairness - text:
http://tutorials.jenkov.com/java-conc...
Nested Monitor Lockout - text:
http://tutorials.jenkov.com/java-conc...
Reentrance Lockout - text:
http://tutorials.jenkov.com/java-conc...
Java Lock - text / video
http://tutorials.jenkov.com/java-util...
• Java Lock
Auf dieser Seite können Sie das Online-Video Deadlock in Java mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Jakob Jenkov 01 January 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 23,257 Mal angesehen und es wurde von 614 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!