March 2003
Intermediate to advanced
912 pages
27h 17m
English
A style of competition between processes which is more complex than simple mutual exclusion arises when many processes may be allowed to read a resource simultaneously (since they make no change to it) but writers must have exclusive access. Any solution to this problem must make an assumption about relative priorities. Here we shall assume that as soon as a writer wishes to write, all current readers are allowed to finish reading but any subsequent request to read is held up. This priority scheme is appropriate when it is important that readers read information which is as up to date as possible.
Semaphores are used to manage the situation where processes need to block:
Semaphore R = new SemaphoreImplementation ...