Starvation is a problem, where a process is perpetually denied necessary resources. Without those resources, the program can never finish its task. Starvation is related to deadlock. Deadlock occurs when two programs each hold resources the other needs to finish, and neither is willing to give them up. Starvation occurs when one program holds resources the other needs, but is unwilling to give them up.
Starvation describes a situation where a thread is unable to gain regular access to shared resources and is unable to make progress. This happens when shared resources are made unavailable for long periods by "greedy" threads. For example, suppose an object provides a synchronized method that often takes a long time to return. If one thread invokes this method frequently, other threads that also need frequent synchronized access to the same object will often be blocked. Starvation occurs when one thread cannot access the CPU because one or more other threads are monopolizing the CPU. In Java, thread starvation can be caused by setting thread priorities inappropriately. A lower-priority thread can be starved by higher-priority threads if the higher-priority threads do not yield control of the CPU from time to time.