I've learned about three solutions to Reader's Writer's Problem.
Considering the time efficiency, I think three of them are all usable in modern OS file system.
I'd like to get some clarification on how linux handles this problem. (NO ONE made a question about this before!)
For example, if the accesses are like, R R W R R, how does linux order these access?
- (R R ) W (R R) / no starvation (sol 3)
- (R R R R ) W / reader preference
- (R) (R) (W) (R) (R) / once at a time
Thank you!