UML Task Collaboration DiagramsIn multi-tasking and multi-threaded systems, global and static variables present a special challenge. Sharing variables across tasks or threads can provide a mechanism for data passing and communication between the tasks. However, unintentional interference in one task's data by another task can lead to concurrency issues that are difficult to track down as well as potentially catastrophic. Careful design, including proper utilization of interrupt or semaphore protection, is critical in insuring safe, reliable execution of multi-tasking software. Imagix 4D's UML Task Collaboration Diagram view provides insight into the use of shared variables in multi-tasking, multi-threaded systems. Derived from the COMET methodology described by Hassan Gomaa, the generated diagrams form an important tool for reverse engineering existing software. The diagrams indicate how variables are set and read across tasks, and provide a means of analyzing critical region protection schemes.
Use of the UML Task Collaboration Diagram starts with the definition of tasks (or threads). Because tasks are not explicitly designated in C/C++ or Java source code, Imagix 4D provides the ability to define tasks through the Task Definitions dialog. These same task definitions are also used for the various Task Flow Check reports.