Abstract
This paper describes three preprocessors that, respectively, convert conditional critical region (CCR) notation, monitor notation, and Communicating Sequential Processes (CSP) notation into equivalent programs written in the SR concurrent programming language. Our goal is to allow students to experiment and to obtain hands-on experience with these notations. Together with native SR, the three preprocessors provide a teaching tool for a wide spectrum of synchronization mechanisms. This paper also describes the favorable experience obtained in using the preprocessors in several courses. The preprocessors are part of the standard SR distribution, which runs on most UNIX systems; they are in the public domain and available via ftp.
- [1] G.R. Andrews, R.A. Olsson, M. Coffin, I. Elshoff, K. Nilsen, T. Purdin, and G. Townsend, An overview of the SR language and implementation, ACM Trans. on Prog. Languages and Systems, vol. 10, no. 1, pp. 51-86, January 1988. Google Scholar
Digital Library
- [2] G.R. Andrews, Concurrent Programming: Principles and Practice, Redwood City, CA: The Benjamin/ Cummings Publishing Company, Inc., 1991. Google Scholar
Digital Library
- [3] G.R. Andrews and R.A. Olsson, The SR Programming Language: Concurrency in Practice, Redwood City, CA: The Benjamin/Cummings Publishing Company, Inc., 1993. Google Scholar
Digital Library
- [4] P. Brinch Hansen, Structured multiprogramming. Comm. ACM, vol. 15, no. 7, pp. 574-578, July 1972. Google Scholar
Digital Library
- [5] P. Brinch Hansen, Operating System Principles, Prentice-Hall, Englewood Cliffs, NJ, 1973. Google Scholar
Digital Library
- [6] P. Brinch Hansen, Concurrent programming concepts, ACM Computing Surveys, vol. 5, no. 4, pp. 223-245, December 1973. Google Scholar
Digital Library
- [7] K.M. Chandy and J. Misra, The drinking philosophers problem, ACM Trans. on Prog. Languages and Systems, vol. 6, no. 4, pp. 632-646, October 1984. Google Scholar
Digital Library
- [8] H.M. Deitel, Operating Systems (Second Edition), Reading, MA: Addison-Wesley, 1990.Google Scholar
- [9] S.J. Hartley, Experience with the language SR in an undergraduate operating systems course, Proc. SIGCSE Technical Symposium, Kansas City, pp. 176-180, March 1992. Google Scholar
Digital Library
- [10] S.J. Hartley, Operating Systems Programming: The SR Programming Language, Oxford University Press, (to be published) 1994. Google Scholar
Digital Library
- [11] J.S. Herman, A comparison of synchronization mechanisms for concurrent programming, Master's thesis, CSE-89-26, University of California, Davis, September 1989.Google Scholar
- [12] C.A.R. Hoare, Towards a theory of parallel programming, In Operating Systems Techniques C.A.R. Hoare and R.H. Perrott, Academic Press, New York 1972.Google Scholar
- [13] C.A.R. Hoare, Monitors: an operating system structuring concept, Comm. ACM, vol. 17, no. 10, pp. 549-557, October 1974. Google Scholar
Digital Library
- [14] C.A.R. Hoare, Communicating sequential processes, Comm. ACM, vol. 21, no. 8, pp. 666-677, August 1978. Google Scholar
Digital Library
- [15] R.A. Olsson, "Implementation Notes for CCR, Monitor, and CSP Preprocessors for SR", CSE-94-10, Dept. of Computer Science, University of California, Davis, 1994.Google Scholar
- [16] R.A. Olsson, "Experience Using the C Preprocessor to Implement CCK, Monitor, and CSP Preprocessors for SR", CSE-94-11, Department of Computer Science, University of California, Davis, 1994.Google Scholar
- [17] A. Silberschatz and P.B. Galvin, Operating System Concepts (Fourth Edition), Reading, MA: Addison-Wesley, 1994. Google Scholar
Digital Library
- [18] A.S. Tanenbaum, Operating Systems: Design and Implementation, Englewood Cliffs, NJ: Prentice-Hall, 1987. Google Scholar
Digital Library
Index Terms
Tools for teaching CCRs, monitors, and CSP concurrent programming concepts
Recommendations
An SR approach to multiway rendezvous
This paper presents a new approach to programming multiway rendezvous problems in the SR language. The approach uses SR's concurrent invocation statement and rendezvous mechanism to coordinate the interacting processes. This approach is compared with ...
Processes, Tasks, and Monitors: A Comparative Study of Concurrent Programming Primitives
Three notations for concurrent programming are compared, namely CSP, Ada, and monitors. CSP is an experimental language for exploring structuring concepts in concurrent programming. Ada is a general-purpose language with concurrent programming ...
Revisiting monitors
SBLP '18: Proceedings of the XXII Brazilian Symposium on Programming LanguagesMost current programming languages do not restrict the use of the concurrency primitives they provide, leaving it to the programmer to detect data races. In this paper, we revisit the monitor concept, which guards against data races by guaranteeing that ...






Comments