What is starvation?

Some conditions can prevent the progress of execution of processes or threads, two of these conditions are called dead-lock and live-lock, where what I extracted from information was that, dead-lock refers to processes that are blocking each other, preventing execution from flowing and live-lock refers to processes that prevent each other from progressing, but that do not interrupt execution.

It was not very clear to me, and I think it would be interesting to touch on the subject, maybe more people you guys be interested, and that's why I brought the question here.

  • How does this work?
  • in what scenario is this useful? or can it even get in the way?
  • Can you give any examples of this?
Author: Vinicius Brasil, 2018-09-04

1 answers

Starvation is a concept that does not directly refer to deadlock / livelock.

Starvation is when a process cannot be executed at all, as there are always higher priority processes to be executed, so that the "hungry" process never gets processing time.

Follows the process state diagram in Linux.

insert the description of the image here

When you run a process, it starts in the initial State and then goes to the ready.

Starvation occurs when higher priority processes appear whenever you have a lower priority process active and wanting to call the kernel. In this case, the most priority processes get access to the kernel and the other process is just waiting for permission, which never arrives.

It can't Act and stands still, doing nothing, taking up memory and processing time (since the OS has to scale processes!) of the processor without doing Nothing.

Starvation always gets in the way, because it is processor time/kernel time / scattered memory, because it is a process that wants to be executed and that stays in memory, but can never definitively complete its flow.

The Windows process scheduler, if I'm not mistaken, it makes use of a dynamic priority system, where the process starts with its normal priority, but as it gets stuck, its priority starts to increase so that he eventually sees a kernel time.

(any error, please correct)

 4
Author: mutlei, 2020-06-11 14:45:34