[cs33211] CS33211 How to ensure threads won't starve?

Mikhail Nesterenko mikhail at cs.kent.edu
Thu Oct 11 15:20:32 EDT 2012


> So when there are pedestrians crossing, other pedestrians wishing to cross
> must request the lock?

Only a single process can hold a lock (mutex). Multiple pedestrians,
and, possibly, multiple cars may cross construction zone at the same
time. So the car/participant cannot hold the lock while they are in
the construction zone, but they may need it to update the variables
that keep track of which cars and pedestrians are currently crossing
the construction zone or waiting to cross.

Thanks,
--
Mikhail


More information about the cs33211 mailing list