Implementing Ada protected objects—interface issues and optimization

E. W. Giering, Theodore P. Baker · 1995

Ada 95 protected objects are intended to provide a synchronization mechanism that is lower-level and more efficient than rendezvous. However, in their full generality they can require a rather complex implementation. To realize the original goal of providing a low-cost synchronization mechanism, compilers should recognize simple cases and optimize them. The interface between the code generated by the compiler and the runtime system affects the feasibility of such optimizations, as well as the quality of code in general. One fundamental choice that must be made in the design of this interface is between an "inline" model, where procedure calls only go from the application code into the runtime system, and a "callback" model, in which the runtime system also makes calls out to the application code, via procedure pointers. The comparative merits of these two models for the implementation of protected objects is sufficiently unclear that we have undertaken to experiment with implementation...

Read the paper · More papers on PaperTik