Previous | Next --- Slide 15 of 57
Back to Lecture Thumbnails
kayvonf

Question: why do you think this condition is called starvation? (Explain the metaphor.)

bwf

For humans, starvation is caused by a deficiency of calories. Calories are provided by resources(usually food). For programs, rather than being denied food/calories, programs are not given access to processors(resource for programs).

For humans, the state of starvation is characterized by a lack of access to food, whereas for computer programs it is characterized by a lock of access to processors. The state of starvation ends, when the appropriate resource is acquired.

aznshodan

I don't think it has to do with the access to processors. In fact both processes seem to be running but one of the processes is stalled(but still running) due to the scheduler that prioritizes certain tasks/processes over others.

landuo

I think for humans, starvation is lack of energy source (food, drink, etc.). For processes, the "energy" comes from getting scheduled and run on processor. If a process waits forever to get scheduled and executed on a processor is similar to the situation when a person is kept away from food for a long time.

sanchuah

Because the processes which wait forever do not have any resources to consume, the situation is similar to that a human has nothing to eat.

ak47

I think a key to the "starvation" analogy is that WHEN the food arrives matters. Getting five months of food five months late doesn't do any good.

I some settings, running a job late is just as good as running on time, but for some jobs, if they aren't performed quickly they can't be salvaged.

skywalker

"Starvation" refers to being deprived on energy / food.

In this condition, we're having some threads that are deprived of CPU time or resources for an elongated period of time hence the analogy.

Sherry

In the example, the priority of green cars are higher than the yellow cars. Yellow cars have to wait/ no movement unless no green cars there. If green cars are always there, yellow cars will be in "starvation" that means no resources offered to yellow cars to operate.