In this workshop by ExitCertified, we looked at how we avoid liveness hazards, how we find them and how we test that they are truly gone. You will learn several new unpublished techniques that will help you become more of a concurrency specialist. Material is from our new Concurrency Specialist Course (javaspecialists.eu/courses/concurrency.jsp). You are welcome to share this with your friends in industry.

This is part 3 of 3.

After the lecture was done, we also spent time doing an exercise and we had some interesting questions and discussions by the participants of the workshop.

Here is the outline of the workshop:

10 Avoiding Liveness Hazards

* 10.1 Deadlock
o The drinking philosophers
o Causing a deadlock amongst philosophers
o Resolving deadlocks
o Discovering deadlocks
o Lock-ordering deadlocks
o Defining a global ordering
o Dynamic lock order deadlocks
o Defining order on dynamic locks
o Checking whether locks are held
o Imposing a natural order
o Deadlock between cooperating objects
o Open calls and alien methods
+ Example in Vector
o Resource deadlocks
o Thread-starvation deadlocks

* 10.2 Avoiding and diagnosing deadlocks
o Avoiding multiple locks
o Using open calls
o Unit testing for lock ordering deadlocks
o Adding a sleep to cause deadlocks
o Verifying thread deadlocks
o Timed lock attempts
o "TryLock" with synchronized
o Deadlock analysis with thread dumps
o Stopping deadlock victims
o DeadlockArbitrator

* 10.3 Other liveness hazards
o Starvation
+ ReadWriteLock in Java 5 vs Java 6
+ Detecting thread starvation
o Poor responsiveness
o Livelock

Loading more stuff…

Hmm…it looks like things are taking a while to load. Try again?

Loading videos…