Skip to the main content

Original scientific paper

https://doi.org/10.2498/cit.2005.01.04

Process Synchronization with Readers and Writers Revisited

Jalal Kawash


Full text: english pdf 492 Kb

page 43-51

downloads: 10.879

cite


Abstract

The readers-writers problem is one of the very well known problems in concurrency theory. It was first introduced by Courtois et.al. in 1971 [1] and requires the synchronization of processes trying to read and write a shared resource. Several readers are allowed to access the resource simultaneously, but a writer must be given exclusive access to that resource. Courtois et.al. gave semaphore-based solutions to what they called the first and second readers-writers problems. Both of their solutions are prone to starvation. The first allows readers to indefinitely lock out writers and the second allows writers to indefinitely lock out readers. This paper presents and proves correct a third semaphore-based solution, which is starvation-free for both reader and writer processes. To the best of our knowledge, this is the first fair semaphore-based solution that at the same time allows several readers to access the resource simultaneously.

Keywords

Hrčak ID:

44701

URI

https://hrcak.srce.hr/44701

Publication date:

30.3.2005.

Visits: 11.469 *