1) Time controlled orders, such as followed by random access, sequential access, FIFO, and FCFS
schemes, are appropriate for light access traffic.
2) Process/resource controlled orders, such as used by FDM and resource pre-allocation
mechanisms, are appropriate for uniformly high traffic. So are TDM, round robin, and traffic
lights, although they modify the process/resource order by turns.
3) For non-uniform traffic distribution, conflict (as signaled in Ada by the count attribute) is used to
alternate between ordering schemes. We can choose to provide preferential treatment (as the
WRITE’COUNT attribute does to halt Readers, similar to the use of stop signs) or fair treatment
(as the use of a flag does to assist Readers during heavy traffic, similar to the use of traffic lights).
In the latter case, when the WRITE’COUNT attribute evaluates to 0, signaling no contention,
Readers do not have to wait for the flag to signal their turn (similar to Dekker’s and a Right Turn
on Red).
Conflict resolution for cooperation synchronization clearly is based on only the first two types of
mechanisms. This type of conflict requires the abortion of one of the request sets, not an ordering to
resolve the contention.
6. Summary
We have presented several versions of the Readers/Writers problems, chiefly for the purpose of
championing the use of Ada for the illustration of concurrency issues. We have suggested a minor
modification of previously published solutions to satisfy requirements for the use of a critical section.
This suggestion is not original. The implementation with Ada’s count attribute, however, is seen to be
particularly useful in illuminating conflict resolution in mutual exclusion concurrency control.
REFERENCES:
Barnes, J. Programming in Ada95, Addison-Wesley Publishing Co., Wokingham, 1995.
Burns, A., Concurrent Programming in Ada, Cambridge University Press, Cambridge,1985.
Dijkstra, E. W., “Cooperating Sequential Processes,” Technological University, Eindhoven, Netherlands,
1965.
Deitel, H.M., An Introduction to Operating Systems, Addison-Wesley Publishing Co., Reading, 1984.
Hoare, C.A.R., “Monitors: An Operating System Structuring Concept,” CACM, 17(10) October 1974,
549-57.
Levine, G. “The Control of Starvation,” International Journal of General Systems, 15, 1989, 113-127.
Silberschatz, A. and Galvin, P. Operating System Concepts, 5
th
edition, Addison-Wesley, Reading, Mass.
1998.
Stallings, W. Operating Systems, Prentice Hall, Upper Saddle River, NJ, 2001.