A Comparison of the Concurrency Ada 95 and Java Benjamin M. Brosgol Aonix 200 Wheeler Road Burlington, MA 01803 USA + 1.781.221.7317 (Phone) + 1.781.270.6882 (FAX) Features of brosgol@aonix.com 1. ABSTRACT Both Ada and Java support concurrent programming, but through quite different approaches. Ada has built-in tasking features with concurrency semantics, independent of the language s OOP model, whereas Java s thread support is based on special execution properties of methods in several predefined classes. Ada achieves mutual exclusion through protected objects with encapsulated components; Java relies on the classical monitor construct with synchronized methods. Ada models condition-based synchronization and communication through protected entries or through rendezvous; Java provides the somewhat low-level wait / notification methods. Both languages offer timing control; Ada additionally provides user-specifiable scheduling policies. Compared to Java, Ada s concurrency model is more reliable, better-structured, more completely defined, more efficient, and more appropriate for real-time applications. 1.1 Keywords Ada, Java, concurrency, threads, tasking, anomaly, Object-Oriented Programming inheritance 2. INTRODUCTION Ada [l] and Java [2] [3] are unusual in providing direct language support for concurrency: the task in Ada and the thread in Java. Although they offer roughly equivalent functionality - the
/lp/association-for-computing-machinery/a-comparison-of-the-concurrency-features-of-ada-95-and-java-VHMx6IjhyF