All threads aren’t the same. Figure 22 shows a program with three threads.
Assume that all these threads are user threads; that is, they are threads that perform some activity that you’ve programmed.
Other threads can also be executing. For example, there are always threads that are part of the operating environment. These threads are called
manager threads. Manager threads exist to help your program get its work done. In
Figure 23, the horizontal threads at the bottom are user-created manager threads.
All threads are not created equal, and all threads do not execute equally. Many programs also create manager-like threads. Since these user-created manager threads perform services for other threads, they are called
service threads,
Figure 24.
These service threads are also worker threads. For example, the sole function of a user service thread might be to send data to a printer in response to a request from the other two threads.
One reason you need to know which of your threads are service threads is that a service thread performs different types of activities than your other threads. Because their activities are different, they are usually developed separately and, in many cases, are not involved with the fundamental problems being solved by the program. Here are two examples:
Being able to distinguish between the two kinds of threads means that you can focus on the threads and processes that actively participate in an activity, rather than on threads performing subordinate tasks.
Although Figure 24 shows five threads, most of your debugging effort will focus on just two threads.