Deadlock, Livelock and Starvation:
Deadlock:
Deadlock is where a set of processes are blocked because each process is holding a resource and waiting for another resource that is doing the same thing.
An example of this is when two trains are coming toward each other on the same track. Neither of the trains can move once they are in front of each other (assuming there are no connecting tracks).
Livelock:
Livelock occurs when two or more processes continue to repeat in response to changes in other processes without achieving any productive outcome. These processes do not get placed in the waiting state but continue to run without any productive outcome. This differs from a deadlock because, in a deadlock, all processes are put in the waiting state.
Starvation:
Starvation is a problem that is closely related to both Livelock and Deadlock. This can occur as a policy is used to determine who gets access to the resource when it can lead to some processes never getting serviced even though they are not deadlocked.