Watch low-priority threads wait forever while high-priority ones dominate
Starvation occurs when a thread is perpetually denied access to resources because higher-priority threads keep cutting in line. The thread is technically ready to run but never gets a chance.
In unfair mode, low-priority threads starve and turn red. In fair mode, wait-time boosts priority so everyone gets a turn!
Start demo to see events...
Unfair: High priority threads always get the lock first.
Low priority threads keep waiting... and waiting... never getting a chance.
This is starvation!