Previous | Next --- Slide 18 of 62
Back to Lecture Thumbnails
cwchang

One way proposed in the class to resolve starvation is to add a random response time, but this may not fully utilize the intersection. Based on this idea, we can improve our utilization of the intersection by assigning a random number to each car as their priority. This way, we can avoid the starvation and retain fully utilization of the intersection at the same time.

holard

Some sort of alternating policy (i.e. allowing k yellow cars to go after every n green cars) may resolve this issue as well.

shhhh

This scenario reminds me of a couple of intersections I've seen in real life. The solution that's been implemented in these intersections is that the more frequented direction always has a green light until a car pulls up to the intersection in the less frequented direction, which triggers a plate underneath. The light then takes a few seconds to change to allow the potential line up of a few more cars in the less frequented direction before they are allowed to proceed.

haoala

We could also have the priorities of each color decrease the more cars of that colour are allowed to go. For instance, the more green cars go, the more their priority drops, and at some point yellow cars will have a higher priority and be allowed to go. Some kind of inverse relationship between priority and number of cars of that colour allowed to go.

paracon

One of the classic examples of starvation was covered in 213/513 : Reader-Writer Problem

anonymous

Just as @haoala says, in the real system task schedule, we will also have such scenarios. Green cars are those real-time tasks with a higher priority and yellow cars are those normal tasks. Real-time task need a prompt reply from the system to satisfy its need. This will make those low-priority tasks starving. One way to fix the issue is to use a dynamic priority instead of a static one.

l8b

Another real life example is pedestrian crosswalks. For many crosswalks, it'll be in a state of starvation until someone presses the button, because cars will be allowed to go the whole time but pedestrians aren't unless they specifically request access. This is similar to the intersection with the weight plate; one direction is the default and the other has to be triggered.