What UML diagrams are available for modelling programs and systems that make use of concurrency/parallelism?
Several behavioral UML diagrams and some structural ones may express elements of concurrency. A quick tutorial can be found in OMG's article "Concurrency in UML".
Here the main tools for modelling concurrency:
Activity diagrams are the first diagram that comes to mind, as they are meant to express flows of activity, including cucurrent flows. They provide for example forks and joins, and even allow to highlight visually concurrency using partitions (swim lanes).
Moreover the semantics of activity diagrams is rooted in petri nets, which was the main tool for modelling concurrent algorithms and distributed systems before UML.
sequence diagrams are also a vey usefull diagram for modelling concurrency. First, if active objects are used, their lifelines is a powerful visual tool for showing interaction between concurrent threads. But combined fragments allow to specify elements of concurrency for all kind of objects, in particular with par
and critical
, but also with seq
and strict
as these impose constraints on concurrency.
Other diagrams can help as well, although they are not sufficient on their own to model concurrency: