Fair Solution to the Reader-Writer-Problem with Semaphores only
Abstract
The reader-writer-problem is a standard problem in concurrent programming. A resource is shared by several processes which need either inclusive reading or exclusive writing access. The known solutions to this problem typically involve a number of global counters and queues. Here a very simple algorithm is presented which needs only two semaphores for synchronisation and no other global objects. The approach yields a fair solution without starving.
- Publication:
-
arXiv e-prints
- Pub Date:
- March 2003
- DOI:
- 10.48550/arXiv.cs/0303005
- arXiv:
- arXiv:cs/0303005
- Bibcode:
- 2003cs........3005B
- Keywords:
-
- Distributed;
- Parallel;
- and Cluster Computing;
- D.1.3
- E-Print:
- 2 pages