Starvation
Starvation
Starvation happens when a low priority program requests a system resource but cannot
run because a higher priority program has been employing that resource for a long
time. When a process is ready to start executing, it waits for the CPU to allocate the
necessary resources. However, because other processes continue to block the required
resources, the process must wait indefinitely.
In most priority scheduling algorithms, the problem of starvation arises. The resource is
frequently assigned to the higher priority process in a priority scheduling method, which
helps to prevent the lower priority process from obtaining the requested resource.
Starvation is an issue that can be solved through aging. Aging raises the priority of a
procedure that has been waiting for resources for a long period. It also helps to prevent
a low-priority procedure from waiting indefinitely for resources.
1. Starvation may occur if there aren't enough resources to provide to every process as
needed.
2. Starvation can occur if a process is never given the resources it needs for execution due
to faulty resource allocation decisions.
3. If higher priority operations constantly monopolize the processor, a lower priority
process may have to wait indefinitely.
1. The resource allocation priority scheme should contain concepts such as aging, in which
the priority of a process increases the longer it waits. It prevents starvation.
2. An independent manager may be used for the allocation of resources. This resource
manager distributes resources properly and tries to prevent starvation.
3. Random process selection for resource allocation or processor allocation should be
avoided since it promotes starvation.
1. Deadlock happens when every process holds a resource and waits for another
process to hold another resource. In contrast, starvation happens when a low
priority program requests a system resource but cannot run because a higher
priority program has been employing that resource for a long time.
2. In a deadlock, none of the processes can proceed to execution; instead, each
process is blocked while waiting for resources to be acquired by another process.
On the other hand, starvation is a situation in which higher-priority processes
have an infinite ability to acquire resources. Moreover, lower-priority processes
are prevented from getting resources, resulting in their indefinite blocking.
3. Deadlock happens when four conditions exist simultaneously: mutual exclusion,
hold and wait, no preemption, and circular wait. In contrast, starvation happens
when process priorities are enforced while distributing resources or when
resource management is unmanaged.
4. In a deadlock situation, the process blocks resources. In contrast, high-priority
processes continue to use the requested resources in starvation.
5. Deadlock is also known as circular wait, whereas starvation is known as a Lived
lock.