[KPE06] Comparing Java, C# and Ada Monitors queuing policies : a case study and its refinement

Revue Internationale avec comité de lecture : Journal ACM Ada Letters, vol. 26(2), pp. 23-37, 2006
Résumé: Abstract. Learning concurrency paradigms is necessary but it is not sufficient since the choice of run-time semantics may introduce subtle programming errors. It is the aim of this paper to exemplify the importance of process queuing and awaking policies resulting from possible choices of the monitor concept implementation. The first part of the paper compares the behaviour of concurrent processes sharing a unique waiting queue for condition synchronization when implemented in Java or in Ada. A particular solution of the dining philosophers paradigm will be used to show how the difference in the monitor semantics may lead or not to deadlock. This comparison provides insight for deriving a correct Java implementation. The second part of the paper shows how the implementation can be refined when using Ada entry families and requeue with requeue once restriction. The result is elegant, safe and fair, and deterministic. This paper ends with quantitative comparisons of concurrency complexity and of concurrency effectiveness. We conclude that Java and C# multithreading need defensive concurrent programming while Ada allows more latitude for developing correct concurrent programs.

Commentaires: Related material available on the Quasar Website


@article {
title="{Comparing Java, C# and Ada Monitors queuing policies : a case study and its refinement}",
author="C. Kaiser and J. Pradat-Peyre and S. Evangelista and P. Rousseau",
journal="ACM Ada Letters",
note="{Related material available on the Quasar Website}",