While debugging an issue with our system, I have discovered a thread contention that is causing a bottleneck. I need to explain the phenomenon to other people involved in handling this issue. Some of them are not from development team (yet, they are reasonably technical). So what type of diagrams can be used to depict threading issues such as contentions, deadlocks etc? Some examples would be very useful.
Doug Lea (concurrent programming in Java) uses A vertical time-line with columns for the threads, then a row in the column captures state at any given time.
A succession of rows captures a sequence of events.
The problem is that much of the discssion needs to consider various permutations of possible state changes.
I wonder whether a PowerPoint animated version of these diagrams would help for the audience you have in mind.
The same way one diagrams network communication at the datagram level.
Eg, you draw one timeline for each thread, and then your cross-thread communication consists of lines which connect those timelines at the points of sending on one, and receiving on the other.
Doug Lea (concurrent programming in Java) uses A vertical time-line with columns for the threads, then a row in the column captures state at any given time.
A succession of rows captures a sequence of events.
The problem is that much of the discssion needs to consider various permutations of possible state changes.
I wonder whether a PowerPoint animated version of these diagrams would help for the audience you have in mind.
Wait-for graphs can be useful, which help to diagram the dependencies between resources and threads.
If it doesn't have to be a diagram you could write simple (verbose) programs. Just like the way any textbooks teach concurrency/deadlock issues.
Sequence diagrams from UML are probably the best choice. To show multiple threads, each thread has a vertical bar showing the start and termination (termination is an X at the bottom of the bar), of the thread. Arrows between the vertical bars show messages passed between threads, while an arrow that points back to itself shows the thread making a call on itself.
For some examples, see: http://www.agilemodeling.com/artifacts/sequenceDiagram.htm
© 2022 - 2024 — McMap. All rights reserved.