Abstract
The problem of allowing a dynamically changing set of processes fair access to a shared resource is considered, in the context of communication-stream based systems. It is argued that fair binary merge operators alone cannot solve this problem satisfactorily. Two solutions are proposed. One employs binary merge operators with a programmable bias; the other binary and ternary fair merge operators capable of self-balancing, using the concept of 2–3 trees. A Concurrent Prolog implementation of these operators is described. The implementation of the self-balancing merge operators illustrates the expressive power of incomplete messages, a programming technique that supports messages that contain communication channels as arguments. In the course of implementing the self-balancing merge operator, it was necessary to develop a distributed variant of the 2–3 tree deletion algorithm.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Aho, A. V., Hopcroft, J. E. and Ullman, J. D.: “The Design and Analysis of Computer Algorithms” (Addison-Wesley) (1974).
Arvind, Gostelow, K. and Plouffe, W.: “Indeterminacy, Monitors and Dataflow,” in Proceedings of the Sixth ACM Symposium on Operating Systems Principles; Operating Systems Reviews,11 (5) (1977) 159–169.
Brok, J. D. and Ackerman, W. B.: “Scenarios: A Model of Non-determinate computations,” in Formalization of Programming Concepts, Dias and Ramos (eds.) LNCS.107 (Springer-Verlag) (1981) 252–259.
Clark, K. L. and Gregory, S.: “A relational language for parallel programming,” in Proceedings of the ACM Conference on Functional Languages and Computer Architecture (ACM) (October, 1981).
Dennis, J. B.: “A Language Design for Structured Concurrency,” J. H. Williams and D. A. Fischer (eds.) LNCS,54 (Springer-Verlag) (1976) 231–242.
Kahn, G. and MacQueen, D.: “Coroutines and Networks of Parallel Processes,” in Information Processing,77; Proceedings of the IFIP Congress 1977, B. Gilchrist (ed.) (1977) 993–998.
Komorowski, H. J.: “Partial evaluation as a means for inferencing data-structures in an applicative language: a theory and implementation in the case of Prolog,” in Conference Record of the Ninth Annual ACM Symposium on Principles of Programming Languages (ACM) (1982) 255–268.
Park, D.: “On the Semantics of fair parallelism,” in D. Bjorner (ed.) LNCS,86 (Springer-Verlag) (1980) 504–526.
Shapiro, E. Y.: “A Subset of Concurrent Prolog and its Interpreter,” ICOT Technical Report,Tr-003 (February, 1983). Also available as Research Report,CS83-06 (Department of Applied Mathematics, Weizmann Institute of Science) (1983).
Shapiro, E. and Takeuchi, A.: “Object-Oriented Programming in Concurrent Prolog,” New Generation Computing,1 (1) (1983) 25–49.
Smyth, M. B.: “Finitary Relations and Their Fair Merge,” Internal report,CSR-107-82 (Department of Computer Science, Edinburgh University) (March, 1982).
Kusalik, A. J.: “Bounded-Wait Merge in Shapiro’s Concurrent Prolog,” New Generation Computing,2 (2) (1984) 157–169.
Author information
Authors and Affiliations
Additional information
This is a revised and extended version of the paper presented at the 1984 International Symposium on Logic Programming, Atlantic City. U. S. A., February 1984.
About this article
Cite this article
Shapiro, E., Mierowsky, C. Fair, biased, and self-balancing merge operators: Their specification and implementation in Concurrent Prolog. NGCO 2, 221–240 (1984). https://doi.org/10.1007/BF03037058
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF03037058