What type of diagram is best suited for visualizing threading issues such as contentions?
Asked Answered
K

5

5

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.

Kibosh answered 9/7, 2009 at 20:16 Comment(2)
What language and platform? Visual Studio 2010 beta 1 has new features around performance debugging and visualization for threads.Festival
This is a Java app. Thanks for the pointer on VS 2010 though. I will be sure to check it out.Kibosh
I
3

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.

Indelicacy answered 9/7, 2009 at 20:32 Comment(0)
V
3

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.

Vivianna answered 9/7, 2009 at 20:25 Comment(2)
@John - Yes, I was not aware that was a popular term for such a drawing.Vivianna
@NotSure could you please provide an example?Jointure
I
3

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.

Indelicacy answered 9/7, 2009 at 20:32 Comment(0)
D
1

Wait-for graphs can be useful, which help to diagram the dependencies between resources and threads.

Dirichlet answered 9/7, 2009 at 20:31 Comment(0)
E
0

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.

Everyone answered 9/7, 2009 at 20:30 Comment(0)
F
0

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

Fourposter answered 9/7, 2009 at 22:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.