Dining Philosophers

Dining Philosophers is one of those classical problems to understand (and resolve) deadlocks in software. Lets look at examples were we cause deadlocks, come...

Reentrant vs NonReEntrant locks

Java 5 has a ReentrantLock implementation of the Lock interface. Meaning if the same thread tries to acquire the lock again, it will allow...

Deadlocks in java

Ok, lets start with seeing a simple example of how deadlocks can be created in java. Simple way to achieve this is to try...