Thread Groups

 

If you send in a tip we can use or
ask a question that we can turn into a tip,
we'll send you a TotalView Memory Stick.

The previous four tips discussed process groups. This tip is the first that looks at thread groups.

TotalView automatically places your program's threads into two groups:

  • Workers Group: All of your program's threads within the current control group that are executing. These threads can reside in more than one share group.
  • Lockstep Group: All threads that are at the same PC (program counter). A lockstep group only exists for stopped threads. By definition, all members of a lockstep group are within the same workers group. That is, a lockstep group cannot have members in more than one workers group or more than one control group. A lockstep group only exists when the threads are stopped.

While TotalView doesn't make the distinction, it is sometimes helpful to distinguish the threads that are performing the actual work and threads that are performing a service. For example, you may have a thread that performs queue management functions. When you create your own threads groups- this will be discussed in a later tip-you may wish to place these kind of threads into a separately named group than other threads. In this way, you can allow these "service" threads to execute as you are stepping other threads.

Your program may also have threads that are part of the operating environment for your program and which you shouldn't control. In the Root Window, these threads are identified with a negative thread ID.

The following illustration shows the relationship of share, workers, and lockstep groups. (The control group isn't show. Assume all of what you see is in the same control group.)
 

To be continued ...


You can find tips that we've already sent out in our Tip Archive

Help us improve these tips!