NetLogo User Community Models
by Katerina Seifarthova (Submitted: 10/18/2009)
WHAT IS IT?
The problem of Readers and Writers describes a computing problem with concurrency. This problem was described for the first time by P. J. Courtois et al. in their work from 1971.
Suppose we have a shared document. There are two types of agents in this model - readers, who access the document only for reading and writers, who access the document for modification. The problem is with the agents accessing this document at the same time.
HOW IT WORKS
SECOND TYPE OF R/W PROBLEM - writers-preference:
The main rule of this model is that no writer in the queue, shall be kept waiting longer than absolutely necessary.
HOW TO USE IT
THINGS TO NOTICE
From the number of writers in the system (unprocessed writers) you can see that in the second readers-writers problem the readers are starving.
THINGS TO TRY
Try moving the sliders. For example, if you set the "probability-writer-comes" to a very low value and "probability-writer-leaves" to a very high value, the readers won't starve.
(back to the NetLogo User Community Models)