Should steps be taken in the implementation of RW locks to avoid starvation?


(Achuth Narayan Rajagopal) #1

Should fairness be a parameter when it comes to testing the RW Locks that we implement? Will this be tested in test161 when we submit the code?


(Geoffrey Challen) #2

Yes. And yes. You need to make sure that, regardless of the continuous presence of waiting readers (or writers), writers (or readers) will eventually make some progress. Most ways to accomplish this are a bit hacky.