Skip to main content
Log in

Fair, biased, and self-balancing merge operators: Their specification and implementation in Concurrent Prolog

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aho, A. V., Hopcroft, J. E. and Ullman, J. D.: “The Design and Analysis of Computer Algorithms” (Addison-Wesley) (1974).

  2. 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.

  3. 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.

  4. 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).

  5. Dennis, J. B.: “A Language Design for Structured Concurrency,” J. H. Williams and D. A. Fischer (eds.) LNCS,54 (Springer-Verlag) (1976) 231–242.

  6. 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.

  7. 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.

  8. Park, D.: “On the Semantics of fair parallelism,” in D. Bjorner (ed.) LNCS,86 (Springer-Verlag) (1980) 504–526.

  9. 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).

  10. Shapiro, E. and Takeuchi, A.: “Object-Oriented Programming in Concurrent Prolog,” New Generation Computing,1 (1) (1983) 25–49.

    Google Scholar 

  11. Smyth, M. B.: “Finitary Relations and Their Fair Merge,” Internal report,CSR-107-82 (Department of Computer Science, Edinburgh University) (March, 1982).

  12. Kusalik, A. J.: “Bounded-Wait Merge in Shapiro’s Concurrent Prolog,” New Generation Computing,2 (2) (1984) 157–169.

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

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

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037058

Keywords

Navigation