| ![]() | |||||||||
one application remains unchanged for a family of different implementations that can run in sequential or concurrent form. Also, several synchronization schemes can be tested without modifying the implementation of the operations. At the same time, one particular synchronization scheme may be reused by several applications. Additionally, compatibility with the existing programming environment is maintained, because the result of this method is an ordinary object-oriented program. An overview of our approach can be seen in Fig. 1. The generation of object-oriented programs from high level descriptions of their parts can be automated.
12AObject-Oriented
program
Object-Oriented
program
Object-Oriented
program
1A2A2BSynchronization
Scheme
Synchronization
Scheme
BBasic Behavior(data + operations)Basic Behavior(data + operations)
Fig. 1. Separating concurrency schemes from programs.
In this paper we want to address two questions. One first question is whether concurrency can be abstracted from applications at all. Arguments may be raised stating that some applications are inherently concurrent, and it will be impossible to separate their basic behavior from the fact that their execution includes several competing components. We think that in all cases concurrency can and should, in fact, be abstracted. The second question is how this abstraction can be implemented; that is, to find a convenient high-level language, which must be able to describe the synchronization scheme and the application algorithms at the same time, without imposing a totally new programming model at the object-oriented level.
1.1 Concurrency Revisited
Concurrency includes two opposite forces: collaboration and competition. On the one hand, concurrent applications allow the existence of a set of collaborating processes3 , and this collaboration represents performance gains, high availability, group work, etc. On the other hand, collaborating processes will eventually share resources, and therefore conflict; as a consequence, synchronization mechanisms
3 Many words have been used in the literature: heavy-weight or light-weight process, task, thread, etc. Our concept of process includes all of those terms.